bpp-seq3  3.0.0
SiteContainer.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_SITECONTAINER_H
6 #define BPP_SEQ_CONTAINER_SITECONTAINER_H
7 
8 #include "AlignmentData.h"
9 #include "SequenceContainer.h"
10 #include "../Site.h"
11 #include "../ProbabilisticSite.h"
12 
13 // From the STL:
14 #include <string>
15 
16 namespace bpp
17 {
25 template<class SiteType, class SequenceType, class HashType>
27  public virtual TemplateAlignmentDataInterface<HashType>,
28  public virtual TemplateSequenceContainerInterface<SequenceType, HashType>
29 {
30 public:
33 
35 
37 
38 public:
46  virtual const SiteType& site(size_t sitePosition) const override = 0;
47 
56  virtual void setSite(size_t sitePosition, std::unique_ptr<SiteType>& site, bool checkCoordinate = true) = 0;
57 
65  virtual void addSite(std::unique_ptr<SiteType>& site, bool checkCoordinate) = 0;
66 
75  virtual void addSite(std::unique_ptr<SiteType>& site, size_t sitePosition, bool checkCoordinate) = 0;
76 
87  virtual std::unique_ptr<SiteType> removeSite(size_t sitePosition) = 0;
88 
97  virtual void deleteSite(size_t sitePosition) = 0;
98 
106  virtual void deleteSites(size_t sitePosition, size_t length) override = 0;
107 
113  virtual size_t getNumberOfSites() const override = 0;
114 
118  virtual void reindexSites() override = 0;
119 };
120 
121 // Aliases:
124 } // end of namespace bpp.
125 #endif // BPP_SEQ_CONTAINER_SITECONTAINER_H
The Container of Aligned Values interface.
Definition: AlignmentData.h:26
The SequenceContainer interface.
The SiteContainer interface.
Definition: SiteContainer.h:29
virtual void deleteSite(size_t sitePosition)=0
Delete a site from the container.
virtual void setSite(size_t sitePosition, std::unique_ptr< SiteType > &site, bool checkCoordinate=true)=0
Set a site in the container.
virtual void addSite(std::unique_ptr< SiteType > &site, bool checkCoordinate)=0
Add a site in the container.
TemplateSiteContainerInterface< SiteType, SequenceType, HashType > * clone() const override=0
TemplateSiteContainerInterface< SiteType, SequenceType, HashType > * createEmptyContainer() const override=0
Return a copy of this container, but with no data inside.
virtual const SiteType & site(size_t sitePosition) const override=0
Get a site from the container.
virtual void deleteSites(size_t sitePosition, size_t length) override=0
Remove a continuous range of sites in the container.
virtual void reindexSites() override=0
Set all coordinate attributes.
virtual size_t getNumberOfSites() const override=0
Get the number of aligned positions in the container.
virtual void addSite(std::unique_ptr< SiteType > &site, size_t sitePosition, bool checkCoordinate)=0
Add a site in the container.
virtual std::unique_ptr< SiteType > removeSite(size_t sitePosition)=0
Remove a site from the container.
This alphabet is used to deal NumericAlphabet.