MUQ
0.4.3
Attributes.cpp
Go to the documentation of this file.
1
#include "
MUQ/Utilities/HDF5/Attributes.h
"
2
3
muq::Utilities::Attribute
&
muq::Utilities::Attribute::operator=
(std::string
const
& val)
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
19
muq::Utilities::Attribute
&
muq::Utilities::AttributeList::operator[]
(std::string
const
& attrName)
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
};
Attributes.h
muq::Utilities::AttributeList::operator[]
Attribute & operator[](std::string const &attrName)
Definition:
Attributes.cpp:19
muq::Utilities::Attribute
Definition:
Attributes.h:17
muq::Utilities::Attribute::file
std::shared_ptr< HDF5File > file
Definition:
Attributes.h:75
muq::Utilities::Attribute::path
std::string path
Definition:
Attributes.h:77
muq::Utilities::Attribute::name
std::string name
Definition:
Attributes.h:78
muq::Utilities::Attribute::operator=
Attribute & operator=(ScalarType val)
Definition:
Attributes.h:36
doxygen_prep
modules
Utilities
src
HDF5
Attributes.cpp
Generated on Wed Jun 12 2024 00:48:28 for MUQ by
1.9.1