|
Mantid
|
#include <NexusClasses.h>
Public Member Functions | |
| std::size_t | n () const |
| number of attributes | |
| std::vector< std::string > | names () const |
| Returns the list of attribute names. | |
| std::string | operator() (const std::string &name) const |
| returns the value of attribute with name name | |
| void | set (const std::string &name, const std::string &value) |
| set the attribute's value from string | |
| template<typename T > | |
| void | set (const std::string &name, T value) |
| set the attribute's value from type | |
| std::vector< std::string > | values () const |
| Returns the list of attribute values. | |
Private Attributes | |
| std::map< std::string, std::string > | m_values |
| the list of attributes | |
Nexus attributes.
The type of each attribute is NX_CHAR
Definition at line 68 of file NexusClasses.h.
|
inline |
number of attributes
Definition at line 70 of file NexusClasses.h.
| std::vector< std::string > Mantid::Nexus::NXAttributes::names | ( | ) | const |
Returns the list of attribute names.
Definition at line 26 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 46 of file NexusClasses.cpp.
| void Mantid::Nexus::NXAttributes::set | ( | const std::string & | name, |
| const std::string & | value | ||
| ) |
set the attribute's value from string
Sets the value of the attribute.
| name | :: The name of the attribute |
| value | :: The new value of the attribute |
Definition at line 57 of file NexusClasses.cpp.
References m_values, name, and value.
Referenced by Mantid::Nexus::NXDataSet::getAttributes().
| void Mantid::Nexus::NXAttributes::set | ( | const std::string & | name, |
| T | value | ||
| ) |
set the attribute's value from type
Sets the value of the attribute from typed value.
| name | :: The name of the attribute |
| value | :: The new value of the attribute |
Definition at line 63 of file NexusClasses.cpp.
References m_values, name, std::to_string(), and value.
| std::vector< std::string > Mantid::Nexus::NXAttributes::values | ( | ) | const |
Returns the list of attribute values.
Definition at line 34 of file NexusClasses.cpp.
|
private |
the list of attributes
Definition at line 77 of file NexusClasses.h.
Referenced by names(), operator()(), set(), set(), and values().