40 #ifndef _ABSTRACTSEQUENCECONTAINER_H_ 41 #define _ABSTRACTSEQUENCECONTAINER_H_ 43 #include "../Alphabet/Alphabet.h" 44 #include "../Sequence.h" 47 #include <Bpp/Exceptions.h> 162 virtual const std::string&
getName(
size_t sequenceIndex)
const throw (IndexOutOfBoundsException)
167 virtual const std::vector<int>&
getContent(
size_t sequenceIndex)
const throw (IndexOutOfBoundsException)
172 virtual std::string
toString(
size_t sequenceIndex)
const throw (IndexOutOfBoundsException)
182 virtual void setComments(
size_t sequenceIndex,
const Comments& comments)
throw (IndexOutOfBoundsException) = 0;
189 #endif // _ABSTRACTSEQUENCECONTAINER_H_
Exception thrown when a sequence is not found The sequence not found exception base class...
std::vector< std::string > Comments
Declaration of Comments type.
void setComments(const std::string &name, const Comments &comments)
Set the comments of a particular sequence.
const std::vector< int > & getContent(const std::string &name) const
Get the content of a sequence.
The OrderedSequenceContainer interface.
This alphabet is used to deal NumericAlphabet.
const Alphabet * getAlphabet() const
Get sequence container's alphabet.
AbstractSequenceContainer(const AbstractSequenceContainer &sc)
virtual const Comments & getComments(size_t sequenceIndex) const
Get comments of a particular sequence.
void deleteGeneralComments()
Delete the comments associated to this container.
AbstractSequenceContainer & operator=(const AbstractSequenceContainer &sc)
Partial implementation of the OrderedSequenceContainer interface.
virtual const std::string & getName() const =0
Get the name of this sequence.
const Comments & getGeneralComments() const
Get the comments of this container.
virtual const Sequence & getSequence(size_t sequenceIndex) const =0
Retrieve a sequence object from the container.
virtual std::string toString(size_t sequenceIndex) const
Convert a particular sequence to a string.
virtual const std::vector< int > & getContent(size_t sequenceIndex) const
Get the content of a sequence.
virtual const Comments & getGeneralComments() const =0
Get the comments of this container.
virtual const Comments & getComments() const =0
Get the comments associated to this sequence.
AbstractSequenceContainer(const Alphabet *alpha)
This constructor initialize the alphabet pointer.
virtual const std::string & getName(size_t sequenceIndex) const
Get the name of a particular sequence.
virtual ~AbstractSequenceContainer()
virtual const std::vector< int > & getContent() const =0
Get the whole content of the list as a vector of int.
Comments comments_
The container's comments.
virtual std::string toString() const =0
Convert the list as a string.
AbstractSequenceContainer(const SequenceContainer &sc)
Copy constructor from any SequenceContainer object.
virtual const Alphabet * getAlphabet() const =0
Get sequence container's alphabet.
std::string toString(const std::string &name) const
Convert a particular sequence to a string.
const Alphabet * alphabet_
The container's alphabet.
The SequenceContainer interface.
void setGeneralComments(const Comments &comments)
Set the comments of this container.
AbstractSequenceContainer & operator=(const SequenceContainer &sc)
Assignation operator from any SequenceContainer object.
const Comments & getComments(const std::string &name) const
Get comments of a particular sequence.