16#ifndef __albaTagArray_h
17#define __albaTagArray_h
110 virtual void Print(std::ostream& os,
const int tabs=0)
const;
122template <
class TType>
126 if (variable==unset_value)
130 variable = item->GetValueAsDouble();
134 variable = default_value;
142template <
class TType>
146 if (variable==unset_value)
150 variable = item->GetValue();
154 variable = default_value;
#define EXPORT_STL_MAP(declspec_, K_, V_)
TType albaRestoreNumericFromTag(albaTagArray *array, const char *name, TType &variable, TType unset_value, TType default_value)
TType albaRestoreStringFromTag(albaTagArray *array, const char *name, TType &variable, const char *unset_value, const char *default_value)
An abstract class for objects representing an attribute for albaVMEs.
void operator=(const albaAttribute &a)
attributes must define a copy rule
Abstract class representing the interface for the unit of information stored in the storage.
An attribute used to store an associtive array of <key,value> pairs, where value is multi component.
void GetTagList(std::vector< std::string > &list)
Return the list of Tag names as an array of strings.
int GetNumberOfTags() const
return the number of tags stored in this object
std::map< std::string, albaTagItem > mmuTagsMap
bool GetTag(const char *name, albaTagItem &item)
Get a particular tag item.
bool IsTagPresent(const char *name)
return true if the give TAG exists.
void DeepCopy(const albaTagArray *a)
copy the content of another array
void DeleteTag(const char *name)
Remove an item from the array.
void SetTag(const albaTagItem &value)
This function searches for an item with same Tag name of the given one and if it doesn't exist append...
bool Equals(const albaTagArray *array) const
Compare two tag arrays.
albaTagItem * GetTag(const char *name)
provide access to vector items.
virtual void Print(std::ostream &os, const int tabs=0) const
dump tags stored into this array
virtual int InternalStore(albaStorageElement *parent)
This is called by Store() and must be reimplemented by subclasses.
void GetTagsByType(int type, std::vector< albaTagItem * > &array)
Search the tag array for tags of a given type and put in the array pointers to them
bool operator==(const albaTagArray &a) const
mmuTagsMap * GetTagsContainer()
return the container of the tags stored in this attribute
albaTypeMacro(albaTagArray, albaAttribute) void operator
attributes must define a copy rule
virtual int InternalRestore(albaStorageElement *node)
This is called by Restore() and must be reimplemented by subclasses The element from which the object...
void SetTag(const char *name, const char *value, int type=ALBA_MISSING_TAG)
This function searches for an item with given name and if it doesn't exist append a new one to the Ar...
void DeepCopy(const albaAttribute *a)
copy the content of the given attribute.
an utility class for storing <key-type-array of values> information.