bpp-seq3  3.0.0
SequencedValuesContainer.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_SEQ_CONTAINER_SEQUENCEDVALUESCONTAINER_H
6 #define BPP_SEQ_CONTAINER_SEQUENCEDVALUESCONTAINER_H
7 
8 #include <Bpp/Clonable.h>
9 
10 #include "../Alphabet/Alphabet.h"
11 #include "../Commentable.h"
13 
14 // From the STL:
15 #include <string>
16 
17 namespace bpp
18 {
28 class Sequence;
29 
31  public virtual Clonable
32 {
33 // public:
34 // SequencedValuesContainer() {}
35 // virtual ~SequencedValuesContainer() {}
36 
37 public:
43  virtual const Alphabet* getAlphabet() const = 0;
44 
52  virtual std::string toString(const std::string& name) const = 0;
53 
60  virtual bool hasSequence(const std::string& name) const = 0;
61 
67  virtual size_t getNumberOfSequences() const = 0;
68 
74  virtual std::vector<std::string> getSequenceNames() const = 0;
75 
86  virtual void setSequenceNames(const std::vector<std::string>& names, bool checkNames) = 0;
87 
95  virtual double getStateValueAt(size_t siteIndex, const std::string& sequenceName, int state) const = 0;
96 
97  virtual double operator()(size_t siteIndex, const std::string& sequenceName, int state) const = 0;
98 
107  virtual const Comments& getComments(const std::string& name) const = 0;
108 
117  virtual void setComments(const std::string& name, const Comments& comments) = 0;
118 
125  virtual const Comments& getGeneralComments() const = 0;
126 
133  virtual void setGeneralComments(const Comments& comments) = 0;
134 
138  virtual void deleteGeneralComments() = 0;
139 
143  virtual void clear() = 0;
144 
155 };
156 } // end of namespace bpp.
157 #endif // BPP_SEQ_CONTAINER_SEQUENCEDVALUESCONTAINER_H
The Alphabet interface.
Definition: Alphabet.h:99
virtual void setSequenceNames(const std::vector< std::string > &names, bool checkNames)=0
Set all sequence names.
virtual const Alphabet * getAlphabet() const =0
Get container's alphabet.
virtual double operator()(size_t siteIndex, const std::string &sequenceName, int state) const =0
virtual void setComments(const std::string &name, const Comments &comments)=0
Set the comments of a particular sequence.
virtual void clear()=0
Delete all data in the container.
virtual const Comments & getComments(const std::string &name) const =0
Get comments of a particular sequence.
virtual void setGeneralComments(const Comments &comments)=0
Set the comments of this container.
virtual std::string toString(const std::string &name) const =0
Convert a particular sequence to a string.
virtual size_t getNumberOfSequences() const =0
Get the number of sequences in the container.
virtual SequencedValuesContainer * createEmptyContainer() const =0
Return a copy of this container, but with no data inside.
virtual std::vector< std::string > getSequenceNames() const =0
Get all the names of the sequences in the container.
virtual void deleteGeneralComments()=0
Delete the comments associated to this container.
virtual bool hasSequence(const std::string &name) const =0
Check if a sequence with a given name is present in the container.
virtual double getStateValueAt(size_t siteIndex, const std::string &sequenceName, int state) const =0
get value of a state in a position
virtual const Comments & getGeneralComments() const =0
Get the comments of this container.
This alphabet is used to deal NumericAlphabet.
std::vector< std::string > Comments
Declaration of Comments type.
Definition: Commentable.h:21