# MI - Fimex: MetNoFimex::CDMAttribute Class Reference

# MetNoFimex::CDMAttribute Class Reference

`#include <CDMAttribute.h>`

Inheritance diagram for MetNoFimex::CDMAttribute:

List of all members.

## Public Member Functions

| CDMAttribute ()
| CDMAttribute (std::string name, std::string value)
| create a string attribute
| CDMAttribute (std::string name, char value)
| create a char attribute with a char array of length 1
| CDMAttribute (std::string name, int value)
| create a int attribute with a int array of length 1
| CDMAttribute (std::string name, short value)
| create a short attribute with a short array of length 1
| CDMAttribute (std::string name, float value)
| create a float attribute with a float array of length 1
| CDMAttribute (std::string name, double value)
| create a double attribute with a double array of length 1
| CDMAttribute (std::string name, CDMDataType datatype, boost::shared_ptr< Data > data)
| create a attribute with the low level information
| CDMAttribute (const std::string &name, const std::string &datatype, const std::string &value) throw (CDMException)
| create a attribute from a string representation
| CDMAttribute (const std::string &name, CDMDataType datatype, const std::vector< std::string > &values) throw (CDMException)
| create a attribute with a vector of values in string representation
virtual | ~CDMAttribute ()
const std::string & | getName () const
| retrieve the name of the attribute
void | setName (std::string newName)
| set the name of the attribute
const std::string | getStringValue () const
| retrieve the stringified value of the attribute
const boost::shared_ptr< Data > | getData () const
| retrieve the data-pointer of the attribute
void | setData (boost::shared_ptr< Data > data)
| set the data for this attribute
const CDMDataType | getDataType () const
| retrieve the datatype of the attribute
void | toXMLStream (std::ostream &out) const

## Constructor & Destructor Documentation

MetNoFimex::CDMAttribute::CDMAttribute | ( |  | ) |

MetNoFimex::CDMAttribute::CDMAttribute | ( | std::string | name,
|  | std::string | value |
| ) |  |  | `[explicit]`

create a string attribute

MetNoFimex::CDMAttribute::CDMAttribute | ( | std::string | name,
|  | char | value |
| ) |  |  | `[explicit]`

create a char attribute with a char array of length 1

MetNoFimex::CDMAttribute::CDMAttribute | ( | std::string | name,
|  | int | value |
| ) |  |  | `[explicit]`

create a int attribute with a int array of length 1

MetNoFimex::CDMAttribute::CDMAttribute | ( | std::string | name,
|  | short | value |
| ) |  |  | `[explicit]`

create a short attribute with a short array of length 1

MetNoFimex::CDMAttribute::CDMAttribute | ( | std::string | name,
|  | float | value |
| ) |  |  | `[explicit]`

create a float attribute with a float array of length 1

MetNoFimex::CDMAttribute::CDMAttribute | ( | std::string | name,
|  | double | value |
| ) |  |  | `[explicit]`

create a double attribute with a double array of length 1

MetNoFimex::CDMAttribute::CDMAttribute | ( | std::string | name,
|  | CDMDataType | datatype,
|  | boost::shared_ptr< Data > | data |
| ) |  |  | `[explicit]`

create a attribute with the low level information

MetNoFimex::CDMAttribute::CDMAttribute | ( | const std::string & | name,
|  | const std::string & | datatype,
|  | const std::string & | value |
| ) |  |  | throw (CDMException)`[explicit]`

create a attribute from a string representation

MetNoFimex::CDMAttribute::CDMAttribute | ( | const std::string & | name,
|  | CDMDataType | datatype,
|  | const std::vector< std::string > & | values |
| ) |  |  | throw (CDMException)`[explicit]`

create a attribute with a vector of values in string representation

virtual MetNoFimex::CDMAttribute::~CDMAttribute | ( |  | ) | `[virtual]`

## Member Function Documentation

const std::string& MetNoFimex::CDMAttribute::getName | ( |  | ) | const`[inline, virtual]`

retrieve the name of the attribute

Implements MetNoFimex::CDMNamedEntity.

void MetNoFimex::CDMAttribute::setName | ( | std::string | newName | ) | `[inline]`

set the name of the attribute

const std::string MetNoFimex::CDMAttribute::getStringValue | ( |  | ) | const

retrieve the stringified value of the attribute

const boost::shared_ptr<Data> MetNoFimex::CDMAttribute::getData | ( |  | ) | const`[inline]`

retrieve the data-pointer of the attribute

void MetNoFimex::CDMAttribute::setData | ( | boost::shared_ptr< Data > | data | ) | `[inline]`

set the data for this attribute

const CDMDataType MetNoFimex::CDMAttribute::getDataType | ( |  | ) | const`[inline]`

retrieve the datatype of the attribute

void MetNoFimex::CDMAttribute::toXMLStream | ( | std::ostream & | out | ) | const

The documentation for this class was generated from the following file:

- include/fimex/CDMAttribute.h