XdmfAttribute.hpp 2.08 KB
Newer Older
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
1
2
3
4
5
6
7
8
9
10
/*
 * XdmfAttribute.hpp
 *
 *  Created on: Jan 25, 2010
 *      Author: kleiter
 */

#ifndef XDMFATTRIBUTE_HPP_
#define XDMFATTRIBUTE_HPP_

11
#include "XdmfAttributeCenter.hpp"
12
#include "XdmfAttributeType.hpp"
13
#include "XdmfDataItem.hpp"
14

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
20
	XdmfNewMacro(XdmfAttribute);

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
	/**
	 * Get the name of the attribute.
	 *
	 * @return a string containing the name of the attribute.
	 */
	std::string getName() const;

	/**
	 * Set the name of the attribute.
	 *
	 * @param a string containing the name to set.
	 */
	void setName(const std::string&);

	/**
	 * Get the XdmfAttributeType associated with this Attribute.
	 *
	 * @return XdmfAttributeType.
	 */
	XdmfAttributeType getAttributeType() const;

42
43
44
45
46
	/**
	 * Set the XdmfAttributeType associated with this Attribute.
	 *
	 * @param XdmfAttributeType to set.
	 */
47
	void setAttributeType(const XdmfAttributeType& attributeType);
48

49
50
51
52
53
54
55
56
	/**
	 * Get the name of the AttributeType associated with this Attribute.
	 *
	 * @return std::string containing name of the AttributeType.
	 */
	std::string getAttributeTypeAsString() const;

	/**
57
	 * Get the XdmfAttributeCenter associated with this Attribute.
58
	 *
59
	 * @return XdmfAttributeCenter.
60
	 */
61
62
63
64
65
66
67
	XdmfAttributeCenter getAttributeCenter() const;

	/**
	 * Set the XdmfAttributeCenter associated with this Attribute.
	 *
	 * @param XdmfAttributeCenter to set.
	 */
68
	void setAttributeCenter(const XdmfAttributeCenter& attributeCenter);
69
70

	/**
Kenneth Leiter's avatar
Kenneth Leiter committed
71
	 * Get the name of the XdmfAttributeCenter associated with this Attribute.
72
73
74
75
	 *
	 * @return std::string containing name of the AttributeCenter.
	 */
	std::string getAttributeCenterAsString() const;
76
77
78

	void write(boost::shared_ptr<XdmfVisitor> visitor) const;

79
	virtual std::string printSelf() const;
80

81
82
	void setNumberValues(int numValues);

83
84
85
86
87
88
89
90
91
92
93
94
protected:

	XdmfAttribute();
	virtual ~XdmfAttribute();

private:

	XdmfAttribute(const XdmfAttribute&);  // Not implemented.
	void operator=(const XdmfAttribute&);  // Not implemented.

	std::string mName;
	XdmfAttributeType mAttributeType;
95
	XdmfAttributeCenter mAttributeCenter;
96

Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
97
98
99
100
};


#endif /* XDMFATTRIBUTE_HPP_ */