Mantid
|
Nexus attributes. More...
#include <NexusClasses.h>
Public Member Functions | |
int | n () const |
number of attributes More... | |
std::vector< std::string > | names () const |
Returns the list of attribute names. More... | |
std::string | operator() (const std::string &name) const |
returns the value of attribute with name name More... | |
void | set (const std::string &name, const std::string &value) |
set the attribute's value More... | |
void | set (const std::string &name, double value) |
set the attribute's value as a double More... | |
std::vector< std::string > | values () const |
Returns the list of attribute values. More... | |
Private Attributes | |
std::map< std::string, std::string > | m_values |
the list of attributes More... | |
Nexus attributes.
The type of each attribute is NX_CHAR
Definition at line 73 of file NexusClasses.h.
|
inline |
number of attributes
Definition at line 75 of file NexusClasses.h.
std::vector< std::string > Mantid::NeXus::NXAttributes::names | ( | ) | const |
Returns the list of attribute names.
Definition at line 16 of file NexusClasses.cpp.
std::string Mantid::NeXus::NXAttributes::operator() | ( | const std::string & | name | ) | const |
returns the value of attribute with name name
Returns the value of an attribute.
name | :: The name of the attribute |
Definition at line 37 of file NexusClasses.cpp.
References m_values.
void Mantid::NeXus::NXAttributes::set | ( | const std::string & | name, |
const std::string & | value | ||
) |
set the attribute's value
Sets the value of the attribute.
name | :: The name of the attribute |
value | :: The new value of the attribute |
Definition at line 48 of file NexusClasses.cpp.
References m_values, and value.
Referenced by Mantid::NeXus::NXObject::getAttributes().
void Mantid::NeXus::NXAttributes::set | ( | const std::string & | name, |
double | value | ||
) |
set the attribute's value as a double
Sets the value of the attribute as a double.
name | :: The name of the attribute |
value | :: The new value of the attribute |
Definition at line 54 of file NexusClasses.cpp.
std::vector< std::string > Mantid::NeXus::NXAttributes::values | ( | ) | const |
Returns the list of attribute values.
Definition at line 24 of file NexusClasses.cpp.
|
private |
the list of attributes
Definition at line 84 of file NexusClasses.h.
Referenced by names(), operator()(), set(), and values().