XdmfAttribute.hpp 1.96 KB
Newer Older
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
1
2
3
#ifndef XDMFATTRIBUTE_HPP_
#define XDMFATTRIBUTE_HPP_

Ken Leiter (Civ ARL/CISD) kleiter's avatar
ENH:  
Ken Leiter (Civ ARL/CISD) kleiter committed
4
// Includes
5
#include "XdmfAttributeCenter.hpp"
6
#include "XdmfAttributeType.hpp"
7
#include "XdmfDataItem.hpp"
8

9
10
11
12
13
14
/**
 * @brief Handles computed values attached to an XdmfGrid.
 *
 * XdmfAttribute contains two properties that should be set, XdmfAttributeCenter and XdmfAttributeType.
 * XdmfAttribute is a subclass of XdmfDataItem, meaning it contains an XdmfArray to store values.
 */
15
class XdmfAttribute : public XdmfDataItem {
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
16

17
18
public:

Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
19
	XdmfNewMacro(XdmfAttribute);
20
	LOKI_DEFINE_VISITABLE(XdmfAttribute, XdmfDataItem)
21

22
	/**
23
	 * Get the XdmfAttributeCenter associated with this attribute.
24
	 *
25
	 * @return XdmfAttributeCenter of the attribute.
26
	 */
27
	XdmfAttributeCenter getAttributeCenter() const;
28
29

	/**
30
	 * Get the XdmfAttributeType associated with this attribute.
31
	 *
32
	 * @return XdmfAttributeType of the attribute.
33
34
35
	 */
	XdmfAttributeType getAttributeType() const;

36
37
	std::map<std::string, std::string> getItemProperties() const;

38
	/**
39
	 * Get the name of the attribute.
40
	 *
41
	 * @return a string containing the name of the attribute.
42
	 */
43
	std::string getName() const;
44

45
	/**
46
	 * Set the XdmfAttributeCenter associated with this attribute.
47
	 *
48
	 * @param attributeCenter the XdmfAttributeCenter to set.
49
	 */
50
	void setAttributeCenter(const XdmfAttributeCenter & attributeCenter);
51
52

	/**
53
	 * Set the XdmfAttributeType associated with this attribute.
54
	 *
55
	 * @param attributeType XdmfAttributeType to set.
56
	 */
57
	void setAttributeType(const XdmfAttributeType & attributeType);
58
59

	/**
60
	 * Set the name of the attribute.
61
	 *
62
	 * @param name a string containing the name to set.
63
	 */
64
	void setName(const std::string & name);
65
66
67
68
69
70
71
72

protected:

	XdmfAttribute();
	virtual ~XdmfAttribute();

private:

73
74
	XdmfAttribute(const XdmfAttribute & attribute);  // Not implemented.
	void operator=(const XdmfAttribute & attribute);  // Not implemented.
75
76
77

	std::string mName;
	XdmfAttributeType mAttributeType;
78
	XdmfAttributeCenter mAttributeCenter;
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
79
80
81
};

#endif /* XDMFATTRIBUTE_HPP_ */