27 #ifndef GMODELASSOCIATIONS_HPP
28 #define GMODELASSOCIATIONS_HPP
74 void remove(
const int& index);
75 void remove(
const std::string& name);
78 bool contains(
const std::string& name)
const;
88 int get_index(
const std::string& name)
const;
90 const std::string& name)
const;
105 return (
"GModelAssociations");
int size(void) const
Return number of associations in container.
GModelAssociations & operator=(const GModelAssociations &associations)
Assignment operator.
GModelAssociation & insert(const int &index, const GModelAssociation &association)
Insert model association into container.
void clear(void)
Clear object.
std::string print(const GChatter &chatter=NORMAL) const
Print model associations.
void write(GXmlElement &xml) const
Write models into XML element.
bool contains(const std::string &name) const
Signals if model association name exists.
GModelAssociation & append(const GModelAssociation &association)
Append model association to container.
void init_members(void)
Initialise class members.
virtual ~GModelAssociations(void)
Destructor.
GModelAssociation & operator[](const int &index)
Return reference to association.
void copy_members(const GModelAssociations &associations)
Copy class members.
GModelAssociations(void)
Void constructor.
int get_index(const std::string &name) const
Return model association index by name.
GModelAssociations * clone(void) const
Clone instance.
void read(const GXmlElement &xml)
Read model associations from XML document.
bool is_empty(void) const
Signals if there are no associations in container.
Model association class definition.
std::string classname(void) const
Return class name.
void reserve(const int &num)
Reserves space for associations in container.
Model associations container class.
Definition of interface for container classes.
GXmlElement * get_association_xml(GXmlElement &xml, const std::string &name) const
Return pointer to model association with given name in XML element.
std::vector< GModelAssociation > m_associations
List of associations.
void extend(const GModelAssociations &associations)
Append model association container.
Interface class for container classes.
GModelAssociation & at(const int &index)
Return reference to model association.
void free_members(void)
Delete class members.