16#ifndef __albaTagItem_h
17#define __albaTagItem_h
57 albaTagItem(
const char *name,
const double *value,
int numcomp);
58 albaTagItem(
const char *name,
const std::vector<double> &values,
int numcomp);
66 virtual void Print(std::ostream& os,
const int indent=0)
const;
80 void SetValue(
const double value ,
int component=0);
90 void SetValues(
const std::vector<albaString> values);
122 const std::vector<albaString> *
GetComponents()
const {
return &m_Components;};
#define EXPORT_STL_VECTOR(declspec_, T_)
albaStorable is an interface for serializable objects.
Abstract class representing the interface for the unit of information stored in the storage.
albaString - performs common string operations on c-strings.
an utility class for storing <key-type-array of values> information.
void GetTypeAsString(albaString &value) const
return the type of this tag item as a string.
albaTagItem(const char *name, const char *value, int t=ALBA_STRING_TAG)
Constructors for with implicit Tag type...
void SetComponents(const std::vector< double > components)
Set array of components at a once, specifying an array of numeric values.
const char * GetComponent(int comp) const
same as GetValue()
void SetComponent(const double value, int component=0)
Set Tag value converting automatically to string and setting the type to NUMERIC.
void GetValueAsSingleString(std::string &str) const
albaTagItem(const char *name, const char **values, int numcomp, int t=ALBA_STRING_TAG)
void SetNumberOfComponents(int n)
Set the NumberOfComponents of the value corresponding to this Tag.
void operator=(const albaTagItem &p)
virtual int InternalRestore(albaStorageElement *node)
This is called by Restore() and must be reimplemented by subclasses The element from which the object...
std::vector< albaString > m_Components
void SetComponents(const std::vector< albaString > components)
Set array of components at a once.
void SetName(const char *name)
Set/Get the name of this Tag.
const char * GetName() const
albaTagItem(const char *name, const double value)
albaTagItem(const char *name, const std::vector< albaString > &values, int numcomp, int t=ALBA_STRING_TAG)
bool operator!=(const albaTagItem &p) const
void SetComponents(const char **values, int numcomp)
Set array of components at a once.
void GetTypeAsString(std::string &value) const
void SetValue(const double value, int component=0)
Set Tag value converting automatically to string and setting the type to NUMERIC.
bool operator==(const albaTagItem &p) const
void SetValue(const albaString value, int component=0)
Set the Value of this Tag.
void SetValues(const double *values, int numcomp)
Set array of components at a once, specifying an array of numeric values.
double GetValueAsDouble(int component=0) const
return the value stored in this item converting to a double.
const char * GetValue(int component=0) const
return the value stored in this item.
albaTagItem(const char *name, const double *value, int numcomp)
albaTagItem(const char *name, const std::vector< double > &values, int numcomp)
virtual void Print(std::ostream &os, const int indent=0) const
void RemoveValue(int component)
Remove a value
int GetType() const
return the type of this tag.
void SetComponents(const double *components, int numcomp)
Set array of components at a once, specifying an array of numeric values.
void SetValues(const std::vector< albaString > values)
same as SetComponents()
void SetValues(const char **values, int numcomp)
same as SetComponents()
virtual int InternalStore(albaStorageElement *parent)
This is called by Store() and must be reimplemented by subclasses.
void DeepCopy(const albaTagItem *item)
copy contents of the given tag item
void GetValueAsSingleString(albaString &str) const
return the array of values as a single string, representing the array of components as a tuple of the...
std::vector< double > GetComponentsAsDoubles() const
return vector of values as doubles
albaTagItem(const albaTagItem &p)
void SetType(int t)
Set the type of this Tag.
double GetComponentAsDouble(int comp) const
void SetComponent(const albaString value, int component=0)
same as SetValue()
const std::vector< albaString > * GetComponents() const
return all the array of values
bool Equals(const albaTagItem *item) const
Compare two Tag items.
int GetNumberOfComponents() const
void SetValues(const std::vector< double > values)
Set array of components at a once, specifying an array of numeric values.
albaUtility - the pourpose of this class is just to groups utilities classes