27 #ifndef GMODELASSOCIATION_HPP
28 #define GMODELASSOCIATION_HPP
66 const std::string&
name(
void)
const;
67 void name(
const std::string& name);
68 const std::string&
value(
const std::string& name)
const;
69 const std::string&
error(
const std::string& name)
const;
70 void property(
const std::string& name,
71 const std::string& value,
72 const std::string& error =
"");
82 int get_index(
const std::string& name)
const;
84 const std::string& name)
const;
102 return (
"GModelAssociation");
std::string m_name
Association name.
int size(void) const
Return number of association properties.
void clear(void)
Clear model association.
bool is_empty(void) const
Signals if there are no association properties.
Definition of interface for all GammaLib classes.
const std::string & value(const std::string &name) const
Return property value.
GXmlElement * get_property_xml(GXmlElement &xml, const std::string &name) const
Return pointer to property with given name in XML element.
std::string print(const GChatter &chatter=NORMAL) const
Print model association.
virtual ~GModelAssociation(void)
Destructor.
std::vector< std::string > m_names
Property names.
std::vector< std::string > m_values
Property values.
GModelAssociation(void)
Void constructor.
void read(const GXmlElement &xml)
Read model association from XML document.
Interface class for all GammaLib classes.
const std::string & error(const std::string &name) const
Return property error.
std::vector< std::string > m_errors
Property errors.
GModelAssociation * clone(void) const
Clone model association.
std::string classname(void) const
Return class name.
int get_index(const std::string &name) const
Return property index by name.
GModelAssociation & operator=(const GModelAssociation &association)
Assignment operator.
void copy_members(const GModelAssociation &association)
Copy class members.
const std::string & name(void) const
Return association name.
void init_members(void)
Initialise class members.
void free_members(void)
Delete class members.
void write(GXmlElement &xml) const
Write model association into XML element.
void property(const std::string &name, const std::string &value, const std::string &error="")
Set property value and (optionally) error.