5 #ifndef BPP_SEQ_CONTAINER_NAMEDCONTAINER_H
6 #define BPP_SEQ_CONTAINER_NAMEDCONTAINER_H
36 virtual const std::shared_ptr<T>
getObject(
const std::string& name)
const = 0;
38 virtual std::shared_ptr<T>
getObject(
const std::string& name) = 0;
40 virtual const T&
object(
const std::string& name)
const = 0;
42 virtual T&
object(
const std::string& name) = 0;
52 virtual bool hasObject(
const std::string& name)
const = 0;
60 virtual std::shared_ptr<T>
removeObject(
const std::string& name) = 0;
A Container template for objects that are accessible through names.
virtual std::vector< std::string > getObjectNames() const =0
Get all the names of the objects in the container.
virtual T & object(const std::string &name)=0
virtual ~NamedContainerInterface()
virtual bool hasObject(const std::string &name) const =0
Check if a object with a given name is present in the container.
virtual const std::shared_ptr< T > getObject(const std::string &name) const =0
Retrieve an object from the container.
NamedContainerInterface()
virtual size_t getSize() const =0
Get the number of objects in the container.
virtual const T & object(const std::string &name) const =0
virtual std::shared_ptr< T > removeObject(const std::string &name)=0
Extract and remove a object from the container.
virtual std::shared_ptr< T > getObject(const std::string &name)=0
virtual void clear()=0
Delete all objects in the container.
virtual void deleteObject(const std::string &name)=0
Remove a object from the container.
This alphabet is used to deal NumericAlphabet.