45 #include <Bpp/Text/TextTools.h> 115 comments_(s.getComments())
121 comments_(s.getComments())
157 if (newSize == seqSize)
return;
159 if (newSize < seqSize)
176 if (newSize == seqSize)
return;
178 if (newSize < seqSize)
196 for (
size_t i = 0; i < content.size(); i++)
197 if(!getAlphabet()->isIntInAlphabet(content[i]))
198 throw BadIntException(content[i],
"BasicSequence::append", getAlphabet());
200 for (
size_t i = 0; i < content.size(); i++)
201 content_.push_back(content[i]);
207 for (
size_t i = 0; i < content.size(); i++)
208 if(!getAlphabet()->isCharInAlphabet(content[i]))
212 for (
size_t i = 0; i < content.size(); i++)
213 content_.push_back(getAlphabet()->charToInt(content[i]));
const Comments & getComments() const
Get the comments associated to this sequence.
An alphabet exception thrown when trying to specify a bad char to the alphabet.
std::vector< std::string > Comments
Declaration of Comments type.
BasicSymbolList & operator=(const SymbolList &list)
The generic assignment operator.
This alphabet is used to deal NumericAlphabet.
virtual void setToSizeL(size_t newSize)
Set up the size of a sequence from the left side.
virtual int getGapCharacterCode() const =0
virtual const std::string & getName() const =0
Get the name of this sequence.
Comments comments_
The sequence comments.
std::string name_
The sequence name.
A basic SymbolList object.
virtual void setContent(const std::string &sequence)
Set the whole content of the sequence.
virtual const Comments & getComments() const =0
Get the comments associated to this sequence.
BasicSequence & operator=(const Sequence &s)
The Sequence generic assignment operator. This does not perform a hard copy of the alphabet object...
BasicSequence(const Alphabet *alpha)
Empty constructor: build a void Sequence with just an Alphabet.
A basic implementation of the Sequence interface.
std::vector< int > content_
The list content.
const std::string & getName() const
Get the name of this sequence.
virtual void append(const std::vector< int > &content)
Append the specified content to the sequence.
An alphabet exception thrown when trying to specify a bad int to the alphabet.
virtual const Alphabet * getAlphabet() const
Get the alphabet associated to the list.
virtual void setToSizeR(size_t newSize)
Set up the size of a sequence from the right side.