bpp-seq  2.1.0
bpp::SiteContainer Class Reference

The SiteContainer interface. More...

#include <Bpp/Seq/Container/SiteContainer.h>

+ Inheritance diagram for bpp::SiteContainer:
+ Collaboration diagram for bpp::SiteContainer:

List of all members.

Public Member Functions

 SiteContainer ()
virtual ~SiteContainer ()
SiteContainerclone () const =0
virtual const SitegetSite (size_t siteIndex) const =0 throw (IndexOutOfBoundsException)
 Get a site from the container.
virtual void setSite (size_t siteIndex, const Site &site, bool checkPosition)=0 throw (Exception)
 Set a site in the container.
virtual void addSite (const Site &site, bool checkPosition)=0 throw (Exception)
 Add a site in the container.
virtual void addSite (const Site &site, int position, bool checkPosition)=0 throw (Exception)
 Add a site in the container.
virtual void addSite (const Site &site, size_t siteIndex, bool checkPosition)=0 throw (Exception)
 Add a site in the container.
virtual void addSite (const Site &site, size_t siteIndex, int position, bool checkPosition)=0 throw (Exception)
 Add a site in the container.
virtual SiteremoveSite (size_t siteIndex)=0 throw (IndexOutOfBoundsException, Exception)
 Remove a site from the container.
virtual void deleteSite (size_t siteIndex)=0 throw (IndexOutOfBoundsException, Exception)
 Delete a site in the container.
virtual void deleteSites (size_t siteIndex, size_t length)=0 throw (IndexOutOfBoundsException, Exception)
 Delete a continuous range of sites in the container.
virtual size_t getNumberOfSites () const =0
 Get the number of sites in the container.
virtual void reindexSites ()=0
 Set all positions attributes.
virtual Vint getSitePositions () const =0
 Get all position attributes of sites.
virtual const std::vector< int > & getContent (size_t sequenceIndex) const =0 throw (IndexOutOfBoundsException)
 Get the content of a sequence.
virtual std::string toString (size_t sequenceIndex) const =0 throw (IndexOutOfBoundsException)
 Convert a particular sequence to a string.
virtual const SequencegetSequence (size_t sequenceIndex) const =0 throw (IndexOutOfBoundsException)
 Retrieve a sequence object from the container.
virtual void setSequence (size_t sequenceIndex, const Sequence &sequence, bool checkName)=0 throw (Exception)
 Replace a sequence in the container.
virtual SequenceremoveSequence (size_t sequenceIndex)=0 throw (IndexOutOfBoundsException, Exception)
 Extract (and remove) a sequence from the container.
virtual void deleteSequence (size_t sequenceIndex)=0 throw (IndexOutOfBoundsException, Exception)
 Delete a sequence of the container.
virtual const std::string & getName (size_t sequenceIndex) const =0 throw (IndexOutOfBoundsException)
 Get the name of a particular sequence.
virtual const Comments & getComments (size_t sequenceIndex) const =0 throw (IndexOutOfBoundsException)
 Get comments of a particular sequence.
virtual void setComments (size_t sequenceIndex, const Comments &comments)=0 throw (IndexOutOfBoundsException)
 Set the comments of a particular sequence.
virtual size_t getSequencePosition (const std::string &name) const =0 throw (SequenceNotFoundException)
 Get the position of a sequence in sequence container from its name.
virtual const AlphabetgetAlphabet () const =0
 Get sequence container's alphabet.
virtual bool hasSequence (const std::string &name) const =0
 Check if a sequence with a given name is present in the container.
virtual void addSequence (const Sequence &sequence, bool checkName)=0 throw (Exception)
 Add a sequence to the container.
virtual const Comments & getGeneralComments () const =0
 Get the comments of this container.
virtual void setGeneralComments (const Comments &comments)=0
 Set the comments of this container.
virtual void deleteGeneralComments ()=0
 Delete the comments associated to this container.
virtual void clear ()=0
 Delete all sequences in the container.
virtual SequenceContainercreateEmptyContainer () const =0
 Return a copy of this container, but with no sequence inside.
SequenceContainer methods.
virtual const std::vector< int > & getContent (const std::string &name) const =0 throw (SequenceNotFoundException)
 Get the content of a sequence.
virtual std::string toString (const std::string &name) const =0 throw (SequenceNotFoundException)
 Convert a particular sequence to a string.
virtual const SequencegetSequence (const std::string &name) const =0 throw (SequenceNotFoundException)
 Retrieve a sequence object from the container.
virtual void setSequence (const std::string &name, const Sequence &sequence, bool checkName)=0 throw (Exception)
 Replace a sequence in the container.
virtual SequenceremoveSequence (const std::string &name)=0 throw (SequenceNotFoundException, Exception)
 Extract (and remove) a sequence from the container.
virtual void deleteSequence (const std::string &name)=0 throw (SequenceNotFoundException, Exception)
 Delete a sequence of the container.
virtual const Comments & getComments (const std::string &name) const =0 throw (SequenceNotFoundException)
 Get comments of a particular sequence.
virtual void setComments (const std::string &name, const Comments &comments)=0 throw (SequenceNotFoundException)
 Set the comments of a particular sequence.
virtual size_t getNumberOfSequences () const =0
 Get the number of sequences in the container.
virtual std::vector< std::string > getSequencesNames () const =0
 Get all the names of the sequences in the container.
virtual void setSequencesNames (const std::vector< std::string > &names, bool checkNames)=0 throw (Exception)
 Set all sequence names.
Provide direct access to sequences content.
Warning:
These operators allow you to modifiy the content of the sequences. No checking is performed for your modifications, so use with care, or consider using the setContent() methods.
virtual int & valueAt (size_t sequenceIndex, size_t elementIndex)=0 throw (IndexOutOfBoundsException)
 Element access operator.
virtual const int & valueAt (size_t sequenceIndex, size_t elementIndex) const =0 throw (IndexOutOfBoundsException)
 Element access operator.
virtual int & operator() (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.
Provide direct access to sequences content.
Warning:
These operators allow you to modifiy the content of the sequences. No checking is performed for your modifications, so use with care, or consider using the setContent() methods.
virtual int & valueAt (const std::string &sequenceName, size_t elementIndex)=0 throw (SequenceNotFoundException, IndexOutOfBoundsException)
 Element access function.
virtual const int & valueAt (const std::string &sequenceName, size_t elementIndex) const =0 throw (SequenceNotFoundException, IndexOutOfBoundsException)
 Element access function.
virtual int & operator() (const std::string &sequenceName, size_t elementIndex)=0
 Element access operator.
virtual const int & operator() (const std::string &sequenceName, size_t elementIndex) const =0
 Element access operator.

Detailed Description

The SiteContainer interface.

Container implementing the SiteContainer interface deal with aligned sequences. This interface provides methods to retrieve, add or set sites in the alignment. As for SequenceContainers, the maintenance of Sites is up to the container. All site objects are cloned befored being added and retrieved. All sites stored are deleted in the destructor of the container or after having called the deleteSite() method.

Definition at line 63 of file SiteContainer.h.


Constructor & Destructor Documentation

Definition at line 67 of file SiteContainer.h.

virtual bpp::SiteContainer::~SiteContainer ( ) [inline, virtual]

Definition at line 68 of file SiteContainer.h.


Member Function Documentation

virtual void bpp::SequenceContainer::addSequence ( const Sequence sequence,
bool  checkName 
) throw (Exception) [pure virtual, inherited]

Add a sequence to the container.

Parameters:
sequenceThe sequence to add.
checkNameTell if the container must check if the name of the sequence is already used in the container before adding it.
Exceptions:
ExceptionAny other kind of exception, if the name of the sequence is already used, are whatever else depending on the implementation.

Implemented in bpp::VectorSequenceContainer, bpp::CompressedVectorSiteContainer, bpp::VectorSiteContainer, bpp::AlignedSequenceContainer, and bpp::MapSequenceContainer.

Referenced by bpp::SequenceContainerTools::append(), and bpp::NexusIOSequence::appendAlignmentFromStream().

virtual void bpp::SiteContainer::addSite ( const Site site,
bool  checkPosition 
) throw (Exception) [pure virtual]

Add a site in the container.

Parameters:
siteThe site to add.
checkPositionLook if the position of the new site match a position attribute in the container.
Exceptions:
ExceptionIf the specified site does not exists or is not correct.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::SiteContainerTools::merge().

virtual void bpp::SiteContainer::addSite ( const Site site,
int  position,
bool  checkPosition 
) throw (Exception) [pure virtual]

Add a site in the container.

Parameters:
siteThe site to add.
positionThe new position of the site, to superseed the one in 'site'.
checkPositionLook if the position of the new site match a position attribute in the container.
Exceptions:
ExceptionIf the specified site does not exists or is not correct.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual void bpp::SiteContainer::addSite ( const Site site,
size_t  siteIndex,
bool  checkPosition 
) throw (Exception) [pure virtual]

Add a site in the container.

Parameters:
siteThe site to add.
siteIndexThe position where to insert the site.
checkPositionLook if the position of the new site match a position attribute in the container.
Exceptions:
ExceptionIf the specified site does not exists or is not correct.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual void bpp::SiteContainer::addSite ( const Site site,
size_t  siteIndex,
int  position,
bool  checkPosition 
) throw (Exception) [pure virtual]

Add a site in the container.

Parameters:
siteThe site to add.
siteIndexThe position where to insert the site.
positionThe new position of the site, to superseed the one in 'site'.
checkPositionLook if the position of the new site match a position attribute in the container.
Exceptions:
ExceptionIf the specified site does not exists or is not correct.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual void bpp::SequenceContainer::clear ( ) [pure virtual, inherited]
virtual SequenceContainer* bpp::SequenceContainer::createEmptyContainer ( ) const [pure virtual, inherited]

Return a copy of this container, but with no sequence inside.

This method creates a new SequenceContainer objet. The class of this container depends on the derivative class.

Returns:
A new empty container, with the same alphabet as this one.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, bpp::MapSequenceContainer, and bpp::AlignedSequenceContainer.

virtual void bpp::SequenceContainer::deleteGeneralComments ( ) [pure virtual, inherited]

Delete the comments associated to this container.

Implemented in bpp::AbstractSequenceContainer.

virtual void bpp::OrderedSequenceContainer::deleteSequence ( size_t  sequenceIndex) throw (IndexOutOfBoundsException, Exception) [pure virtual, inherited]

Delete a sequence of the container.

Parameters:
sequenceIndexThe position of the sequence.
Exceptions:
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::VectorSequenceContainer, bpp::MapSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::SequenceContainerTools::keepOnlySelectedSequences().

virtual void bpp::OrderedSequenceContainer::deleteSequence ( const std::string &  name) throw (SequenceNotFoundException, Exception) [pure virtual, inherited]

Delete a sequence of the container.

Parameters:
nameThe name of the sequence.
Exceptions:
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual void bpp::SiteContainer::deleteSite ( size_t  siteIndex) throw (IndexOutOfBoundsException, Exception) [pure virtual]
virtual void bpp::SiteContainer::deleteSites ( size_t  siteIndex,
size_t  length 
) throw (IndexOutOfBoundsException, Exception) [pure virtual]

Delete a continuous range of sites in the container.

Parameters:
siteIndexThe position of the first site in the container.
lengthThe length of the region to delete, starting at pposition siteIndex.
Exceptions:
IndexOutOfBoundsExceptionIf the specified range is not valid.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::SiteContainerTools::removeGapOnlySites(), and bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites().

virtual const Comments& bpp::OrderedSequenceContainer::getComments ( size_t  sequenceIndex) const throw (IndexOutOfBoundsException) [pure virtual, inherited]

Get comments of a particular sequence.

Parameters:
sequenceIndexThe position of the sequence.
Returns:
The comments associated to sequence at position 'sequenceIndex'.
Exceptions:
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::AbstractSequenceContainer.

Referenced by bpp::CompressedVectorSiteContainer::CompressedVectorSiteContainer(), bpp::VectorSiteContainer::operator=(), bpp::CompressedVectorSiteContainer::operator=(), and bpp::VectorSiteContainer::VectorSiteContainer().

virtual const Comments& bpp::OrderedSequenceContainer::getComments ( const std::string &  name) const throw (SequenceNotFoundException) [pure virtual, inherited]

Get comments of a particular sequence.

Parameters:
nameThe name of the sequence.
Returns:
The comments associated to sequence with name 'name'.
Exceptions:
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::AbstractSequenceContainer.

virtual const std::vector<int>& bpp::OrderedSequenceContainer::getContent ( size_t  sequenceIndex) const throw (IndexOutOfBoundsException) [pure virtual, inherited]

Get the content of a sequence.

Parameters:
sequenceIndexThe position of the sequence.
Returns:
The content of the sequence as a vector of integers.
Exceptions:
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::AbstractSequenceContainer.

virtual const std::vector<int>& bpp::OrderedSequenceContainer::getContent ( const std::string &  name) const throw (SequenceNotFoundException) [pure virtual, inherited]

Get the content of a sequence.

Parameters:
nameThe name of the sequence.
Returns:
The content of the sequence as a vector of integers.
Exceptions:
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::AbstractSequenceContainer.

virtual const Comments& bpp::SequenceContainer::getGeneralComments ( ) const [pure virtual, inherited]

Get the comments of this container.

Returns:
The comments associated to this container.

Implemented in bpp::AbstractSequenceContainer.

Referenced by bpp::SiteContainerTools::getSelectedSites(), bpp::AbstractSequenceContainer::operator=(), and bpp::VectorSequenceContainer::VectorSequenceContainer().

virtual const std::string& bpp::OrderedSequenceContainer::getName ( size_t  sequenceIndex) const throw (IndexOutOfBoundsException) [pure virtual, inherited]

Get the name of a particular sequence.

Parameters:
sequenceIndexThe position of the sequence.
Returns:
The name of the sequence at position 'sequenceIndex'.
Exceptions:
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::AbstractSequenceContainer.

virtual const Sequence& bpp::OrderedSequenceContainer::getSequence ( const std::string &  name) const throw (SequenceNotFoundException) [pure virtual, inherited]

Retrieve a sequence object from the container.

Parameters:
nameThe name of the sequence.
Returns:
A reference toward the Sequence with corresponding name.
Exceptions:
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual size_t bpp::OrderedSequenceContainer::getSequencePosition ( const std::string &  name) const throw (SequenceNotFoundException) [pure virtual, inherited]

Get the position of a sequence in sequence container from its name.

Parameters:
nameThe name of the sequence.
Returns:
The position of the sequence with name 'name', if it exists.
Exceptions:
SequenceNotFoundExceptionIf no sequence with name 'name' could be found.

Implemented in bpp::VectorSequenceContainer, bpp::MapSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual Vint bpp::SiteContainer::getSitePositions ( ) const [pure virtual]

Get all position attributes of sites.

Returns:
A vector with all site positions.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

Referenced by bpp::AlignedSequenceContainer::operator=().

virtual bool bpp::SequenceContainer::hasSequence ( const std::string &  name) const [pure virtual, inherited]

Check if a sequence with a given name is present in the container.

Parameters:
nameThe name of the sequence.
Returns:
True if a sequence with the given name is present in the container.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual int& bpp::OrderedSequenceContainer::operator() ( size_t  sequenceIndex,
size_t  elementIndex 
) [pure virtual, inherited]

Element access operator.

Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!

Parameters:
sequenceIndexThe sequence position.
elementIndexThe element position within the sequence.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual const int& bpp::OrderedSequenceContainer::operator() ( size_t  sequenceIndex,
size_t  elementIndex 
) const [pure virtual, inherited]

Element access operator.

Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!

Parameters:
sequenceIndexThe sequence position.
elementIndexThe element position within the sequence.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual int& bpp::SequenceContainer::operator() ( const std::string &  sequenceName,
size_t  elementIndex 
) [pure virtual, inherited]

Element access operator.

Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!

Parameters:
sequenceNameThe sequence name.
elementIndexThe element position within the sequence.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual const int& bpp::SequenceContainer::operator() ( const std::string &  sequenceName,
size_t  elementIndex 
) const [pure virtual, inherited]

Element access operator.

Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!

Parameters:
sequenceNameThe sequence name.
elementIndexThe element position within the sequence.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual void bpp::SiteContainer::reindexSites ( ) [pure virtual]
virtual Sequence* bpp::OrderedSequenceContainer::removeSequence ( size_t  sequenceIndex) throw (IndexOutOfBoundsException, Exception) [pure virtual, inherited]

Extract (and remove) a sequence from the container.

Parameters:
sequenceIndexThe position of the sequence.
Exceptions:
IndexOutOfBoundsExceptionIf the name does not match any sequence in the container.

Implemented in bpp::VectorSequenceContainer, bpp::MapSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual Sequence* bpp::OrderedSequenceContainer::removeSequence ( const std::string &  name) throw (SequenceNotFoundException, Exception) [pure virtual, inherited]

Extract (and remove) a sequence from the container.

Parameters:
nameThe name of the sequence.
Exceptions:
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::MapSequenceContainer, and bpp::VectorSiteContainer.

virtual Site* bpp::SiteContainer::removeSite ( size_t  siteIndex) throw (IndexOutOfBoundsException, Exception) [pure virtual]

Remove a site from the container.

The site is not deleted, a pointer toward it is returned.

Parameters:
siteIndexThe position of the site in the container.
Returns:
A pointer toward site i in the alignment.
Exceptions:
IndexOutOfBoundsExceptionIf the specified site does not exists.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual void bpp::OrderedSequenceContainer::setComments ( size_t  sequenceIndex,
const Comments &  comments 
) throw (IndexOutOfBoundsException) [pure virtual, inherited]

Set the comments of a particular sequence.

Parameters:
sequenceIndexThe position of the sequence.
commentsThe comments to set to sequence with position 'i'.
Exceptions:
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::VectorSequenceContainer, bpp::MapSequenceContainer, bpp::AbstractSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual void bpp::OrderedSequenceContainer::setComments ( const std::string &  name,
const Comments &  comments 
) throw (SequenceNotFoundException) [pure virtual, inherited]

Set the comments of a particular sequence.

Parameters:
nameThe name of the sequence.
commentsThe comments to set to sequence with name 'name'.
Exceptions:
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::VectorSequenceContainer, and bpp::AbstractSequenceContainer.

virtual void bpp::SequenceContainer::setGeneralComments ( const Comments &  comments) [pure virtual, inherited]

Set the comments of this container.

Parameters:
commentsThe comments to be associated to this container.

Implemented in bpp::AbstractSequenceContainer.

virtual void bpp::OrderedSequenceContainer::setSequence ( size_t  sequenceIndex,
const Sequence sequence,
bool  checkName 
) throw (Exception) [pure virtual, inherited]

Replace a sequence in the container.

Parameters:
sequenceIndexThe position of the sequence.
sequenceThe sequence to add.
checkNameTell if the container must check if the name of the sequence is already used in the container before adding it.
Exceptions:
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.
ExceptionAny other kind of exception.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, bpp::MapSequenceContainer, and bpp::AlignedSequenceContainer.

virtual void bpp::OrderedSequenceContainer::setSequence ( const std::string &  name,
const Sequence sequence,
bool  checkName 
) throw (Exception) [pure virtual, inherited]

Replace a sequence in the container.

Parameters:
nameThe name of the sequence.
sequenceThe sequence to add.
checkNameTell if the container must check if the name of the sequence is already used in the container before adding it.
Exceptions:
SequenceNotFoundExceptionIf the name does not match any sequence in the container.
ExceptionAny other kind of exception, if the name of the sequence is already used, are whatever else depending on the implementation.

Implements bpp::SequenceContainer.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSiteContainer, bpp::AlignedSequenceContainer, bpp::VectorSequenceContainer, and bpp::MapSequenceContainer.

virtual void bpp::OrderedSequenceContainer::setSequencesNames ( const std::vector< std::string > &  names,
bool  checkNames 
) throw (Exception) [pure virtual, inherited]

Set all sequence names.

Parameters:
namesA vector of strings with all sequence names. Its size must be strictly equal to the the size of the container (the number of sequences).
checkNamesTell if the container must check if the name of the sequence is already used in the container before adding it.
Exceptions:
ExceptionIf there are redundant names in the input vector.

Implements bpp::SequenceContainer.

Implemented in bpp::MapSequenceContainer, bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, and bpp::VectorSiteContainer.

virtual void bpp::SiteContainer::setSite ( size_t  siteIndex,
const Site site,
bool  checkPosition 
) throw (Exception) [pure virtual]

Set a site in the container.

Parameters:
siteIndexThe position of the site in the container.
siteThe site to set.
checkPositionLook if the position of the new site match a position attribute in the container.
Exceptions:
ExceptionIf the specified site does not exists or is not correct.

Implemented in bpp::AlignedSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::VectorSiteContainer.

virtual std::string bpp::OrderedSequenceContainer::toString ( size_t  sequenceIndex) const throw (IndexOutOfBoundsException) [pure virtual, inherited]

Convert a particular sequence to a string.

Parameters:
sequenceIndexThe position of the sequence.
Returns:
A string describing the content of the sequence.
Exceptions:
IndexOutOfBoundsExceptionIf the position does not match any sequence in the container.

Implemented in bpp::AbstractSequenceContainer.

virtual std::string bpp::OrderedSequenceContainer::toString ( const std::string &  name) const throw (SequenceNotFoundException) [pure virtual, inherited]

Convert a particular sequence to a string.

Parameters:
nameThe name of the sequence.
Returns:
A string describing the content of the sequence.
Exceptions:
SequenceNotFoundExceptionIf the name does not match any sequence in the container.

Implements bpp::SequenceContainer.

Implemented in bpp::AbstractSequenceContainer.

virtual int& bpp::OrderedSequenceContainer::valueAt ( size_t  sequenceIndex,
size_t  elementIndex 
) throw (IndexOutOfBoundsException) [pure virtual, inherited]

Element access operator.

Allows direct access to the data stored in the container.

Parameters:
sequenceIndexThe sequence position.
elementIndexThe element position within the sequence.
Exceptions:
IndexOutOfBoundsExceptionIf a position is not valid.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual const int& bpp::OrderedSequenceContainer::valueAt ( size_t  sequenceIndex,
size_t  elementIndex 
) const throw (IndexOutOfBoundsException) [pure virtual, inherited]

Element access operator.

Allows direct access to the data stored in the container.

Parameters:
sequenceIndexThe sequence position.
elementIndexThe element position within the sequence.
Exceptions:
IndexOutOfBoundsExceptionIf a position is not valid.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual int& bpp::SequenceContainer::valueAt ( const std::string &  sequenceName,
size_t  elementIndex 
) throw (SequenceNotFoundException, IndexOutOfBoundsException) [pure virtual, inherited]

Element access function.

Allows direct access to the data stored in the container.

Parameters:
sequenceNameThe sequence name.
elementIndexThe element position within the sequence.
Exceptions:
SequenceNotFoundExceptionIf no corresponding sequence is found in the container.
IndexOutOfBoundsExceptionIf the element position is not valid.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.

virtual const int& bpp::SequenceContainer::valueAt ( const std::string &  sequenceName,
size_t  elementIndex 
) const throw (SequenceNotFoundException, IndexOutOfBoundsException) [pure virtual, inherited]

Element access function.

Allows direct access to the data stored in the container.

Parameters:
sequenceNameThe sequence name.
elementIndexThe element position within the sequence.
Exceptions:
SequenceNotFoundExceptionIf no corresponding sequence is found in the container.
IndexOutOfBoundsExceptionIf the element position is not valid.

Implemented in bpp::CompressedVectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorSiteContainer, and bpp::MapSequenceContainer.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends