bpp-seq3  3.0.0
OrderedSequenceContainer.h
Go to the documentation of this file.
1 //
2 // File: OrderedSequenceContainer.h
3 // Authors:
4 // Guillaume Deuchst
5 // Julien Dutheil
6 // Last modified: 2003-08-07 00:00:00
7 //
8 
9 /*
10  Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
11 
12  This software is a computer program whose purpose is to provide classes
13  for sequences analysis.
14 
15  This software is governed by the CeCILL license under French law and
16  abiding by the rules of distribution of free software. You can use,
17  modify and/ or redistribute the software under the terms of the CeCILL
18  license as circulated by CEA, CNRS and INRIA at the following URL
19  "http://www.cecill.info".
20 
21  As a counterpart to the access to the source code and rights to copy,
22  modify and redistribute granted by the license, users are provided only
23  with a limited warranty and the software's author, the holder of the
24  economic rights, and the successive licensors have only limited
25  liability.
26 
27  In this respect, the user's attention is drawn to the risks associated
28  with loading, using, modifying and/or developing or reproducing the
29  software by the user in light of its specific status of free software,
30  that may mean that it is complicated to manipulate, and that also
31  therefore means that it is reserved for developers and experienced
32  professionals having in-depth computer knowledge. Users are therefore
33  encouraged to load and test the software's suitability as regards their
34  requirements in conditions enabling the security of their systems and/or
35  data to be ensured and, more generally, to use and operate it in the
36  same conditions as regards security.
37 
38  The fact that you are presently reading this means that you have had
39  knowledge of the CeCILL license and that you accept its terms.
40 */
41 
42 #ifndef BPP_SEQ_CONTAINER_ORDEREDSEQUENCECONTAINER_H
43 #define BPP_SEQ_CONTAINER_ORDEREDSEQUENCECONTAINER_H
44 
45 
46 #include "../Sequence.h"
47 #include "OrderedValuesContainer.h"
48 #include "SequenceContainer.h"
49 
50 namespace bpp
51 {
59  public virtual SequenceContainer,
60  public virtual OrderedValuesContainer
61 {
62 public:
65 
66 public:
74  virtual const Sequence& getSequence(size_t sequenceIndex) const = 0;
75 
85  virtual void setSequence(size_t sequenceIndex, const Sequence& sequence, bool checkName) = 0;
86 
93  virtual std::shared_ptr<Sequence> removeSequence(size_t sequenceIndex) = 0;
94 
105  virtual int& valueAt(const std::string& sequenceName, size_t elementIndex) = 0;
106 
107  virtual const int& valueAt(const std::string& sequenceName, size_t elementIndex) const = 0;
108 
117  virtual int& valueAt(size_t sequenceIndex, size_t elementIndex) = 0;
118 
127  virtual const int& valueAt(size_t sequenceIndex, size_t elementIndex) const = 0;
128 
140  virtual int& operator()(size_t sequenceIndex, size_t elementIndex) = 0;
141 
153  virtual const int& operator()(size_t sequenceIndex, size_t elementIndex) const = 0;
156 public:
168 
169  /*
170  * @brief For backward compatibility
171  *
172  */
173 
177 };
178 } // end of namespace bpp.
179 #endif // BPP_SEQ_CONTAINER_ORDEREDSEQUENCECONTAINER_H
The OrderedSequenceContainer interface.
virtual int & valueAt(const std::string &sequenceName, size_t elementIndex)=0
Element access function.
virtual const Sequence & getSequence(size_t sequenceIndex) const =0
Retrieve a sequence object from the container.
virtual int & valueAt(size_t sequenceIndex, size_t elementIndex)=0
Element access operator.
virtual const int & operator()(size_t sequenceIndex, size_t elementIndex) const =0
Element access operator.
virtual void setSequence(size_t sequenceIndex, const Sequence &sequence, bool checkName)=0
Replace a sequence in the container.
virtual const int & valueAt(const std::string &sequenceName, size_t elementIndex) const =0
Element access function.
virtual int & operator()(size_t sequenceIndex, size_t elementIndex)=0
Element access operator.
virtual const int & valueAt(size_t sequenceIndex, size_t elementIndex) const =0
Element access operator.
virtual std::shared_ptr< Sequence > removeSequence(size_t sequenceIndex)=0
Extract (and remove) a sequence from the container.
The Container of Ordered Values interface.
virtual const Comments & getComments(const std::string &name) const=0
Get comments of a particular sequence.
virtual void setComments(const std::string &name, const Comments &comments)=0
Set the comments of a particular sequence.
virtual std::string toString(const std::string &name) const=0
Convert a particular sequence to a string.
The SequenceContainer interface.
virtual std::shared_ptr< Sequence > removeSequence(const std::string &name)=0
Extract (and remove) a sequence from the container.
virtual const Sequence & getSequence(const std::string &name) const =0
Retrieve a sequence object from the container.
virtual void setSequence(const std::string &name, const Sequence &sequence, bool checkName)=0
Replace a sequence in the container.
The sequence interface.
Definition: Sequence.h:71
virtual void setSequenceNames(const std::vector< std::string > &names, bool checkNames)=0
Set all sequence names.
virtual std::vector< std::string > getSequenceNames() const =0
Get all the names of the sequences in the container.
This alphabet is used to deal NumericAlphabet.