bpp-seq3  3.0.0
PositionedNamedContainer.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_POSITIONEDNAMEDCONTAINER_H
6 #define BPP_SEQ_CONTAINER_POSITIONEDNAMEDCONTAINER_H
7 
8 
9 #include "NamedContainer.h"
10 #include "PositionedContainer.h"
11 
12 // From the STL library:
13 #include <string>
14 #include <vector>
15 #include <iostream>
16 
17 namespace bpp
18 {
25 template<class T>
27  public virtual PositionedContainerInterface<T>,
28  public virtual NamedContainerInterface<T>
29 {
30 public:
37 
41 
42 public:
43  virtual void addObject(std::shared_ptr<T> object, size_t objectIndex, const std::string& name, bool check = false) = 0;
44 
45  virtual void insertObject(std::shared_ptr<T> object, size_t objectIndex, const std::string& name) = 0;
46 
52  virtual size_t getObjectPosition(const std::string& name) const = 0;
53 
54  virtual const std::string& getObjectName(size_t objectIndex) const = 0;
55 };
56 } // end of namespace bpp.
57 #endif // BPP_SEQ_CONTAINER_POSITIONEDNAMEDCONTAINER_H
A Container template for objects that are accessible through names.
The PositionedContainer interface.
The template PositionedNamedContainer interface, that links position & name containers.
virtual size_t getObjectPosition(const std::string &name) const =0
Link between position & name.
virtual PositionedNamedContainerInterface< T > * clone() const =0
virtual const std::string & getObjectName(size_t objectIndex) const =0
virtual void insertObject(std::shared_ptr< T > object, size_t objectIndex, const std::string &name)=0
virtual void addObject(std::shared_ptr< T > object, size_t objectIndex, const std::string &name, bool check=false)=0
This alphabet is used to deal NumericAlphabet.