MUQ  0.4.3
Attributes.cpp
Go to the documentation of this file.
2 
4 {
5  assert(file);
6  file->WriteStringAttribute(path, name, val);
7  return *this;
8 }
9 
10 
11 
12 muq::Utilities::Attribute::operator std::string() const
13 {
14  assert(file);
15  return file->GetStringAttribute(path,name);
16 };
17 
18 
20 {
21  assert(file);
22 
23  // If the attribute doesn't exist, create it and return the reference
24  if( attributes.find(attrName) == attributes.end() )
25  attributes[attrName] = Attribute(file, path, attrName);
26 
27  return attributes[attrName];
28 };
Attribute & operator[](std::string const &attrName)
Definition: Attributes.cpp:19
std::shared_ptr< HDF5File > file
Definition: Attributes.h:75
Attribute & operator=(ScalarType val)
Definition: Attributes.h:36