37 #ifndef H_OGF_META_TYPES_META_TYPE_H
38 #define H_OGF_META_TYPES_META_TYPE_H
41 #include <OGF/gom/services/life_cycle.h>
71 return custom_attributes_.nb_args() ;
81 return (i < nb_custom_attributes())
82 ? custom_attributes_.ith_arg_name(i)
93 return (i < nb_custom_attributes())
94 ? custom_attributes_.ith_arg_value(i).as_string()
105 return custom_attributes_.has_arg(name) ;
115 const std::string& name,
const std::string& value
117 custom_attributes_.create_arg(name, value) ;
127 const std::string& name,
const std::string& value
129 custom_attributes_.set_arg(name, value) ;
140 has_custom_attribute(name) ?
141 custom_attributes_.get_arg(name) : std::string();
148 custom_attributes_.clear();
159 gom_attribute(
abstract,
"true")
171 const std::string& needle,
const std::string& path =
""
179 size_t nb_custom_attributes()
const;
205 const std::string& name,
const std::string& value
212 const std::string& name,
const std::string& value
220 gom_attribute(
abstract,
"true")
241 const std::string&
name()
const {
251 typeid_name_ = typeid_name ;
259 return typeid_name_ ;
277 life_cycle_ = life_cycle;
316 virtual bool is_subtype_of(
const MetaType* other)
const;
324 const std::string& get_name()
const {
331 std::string typeid_name_;
Generic arguments and argument lists.
Represents a list of name-value pairs.
Stores a set of custom attributes, i.e. name-value pairs attached to the objects.
void set_custom_attribute(const std::string &name, const std::string &value)
Sets the value of a new custom attribute.
void create_custom_attribute(const std::string &name, const std::string &value)
Creates a new custom attribute.
std::string custom_attribute_value(const std::string &name) const
Gets the value of a new custom attribute.
void clear_custom_attributes()
Clears the custom attributes.
std::string ith_custom_attribute_name(index_t i) const
Gets the name of a custom attribute by index.
bool has_custom_attribute(const std::string &name) const
Tests whether a given custom attribute exists.
size_t nb_custom_attributes() const
Gets the number of custom attributes.
std::string ith_custom_attribute_value(index_t i) const
Gets the value of a custom attribute by index.
Manages the life cycle of an object.
Base class for all objects in the GOM system.
Abstract base class for reading and writing values from/to streams.
geo_index_t index_t
The type for storing and manipulating indices.
Global Graphite namespace.
SmartPointer< MetaType > MetaType_var
Automatic reference-counted pointer to a MetaType.
The base class for all objects in the GOM system.
Implementation of generic object lifecycle service.
Definitions common to all include files in the gom library.