XdmfAttributeType.hpp 1.59 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 * XdmfAttributeType.hpp
 *
 *  Created on: Jan 25, 2010
 *      Author: kleiter
 */

#ifndef XDMFATTRIBUTETYPE_HPP_
#define XDMFATTRIBUTETYPE_HPP_

#include <string>

class XdmfAttributeType {

public:

	// Supported Xdmf Attribute Types
	static XdmfAttributeType NoAttributeType();
	static XdmfAttributeType Scalar();
	static XdmfAttributeType Vector();
	static XdmfAttributeType Tensor();
	static XdmfAttributeType Matrix();
	static XdmfAttributeType Tensor6();
	static XdmfAttributeType GlobalId();

	/**
	 * Get the name of this attribute type
	 *
	 * @return a string containing the name.
	 */
	std::string getName() const;

	/*
	 * Compare two XdmfAttributeTypes for equality.
	 *
	 * @param an XdmfAttributeType to compare equality to.
	 * @return true iff the XdmfAttributeTypes are equal.
	 */
	bool operator==(const XdmfAttributeType& attributeType) const;

	/**
	 * Compare two XdmfAttributeTypes for inequality.
	 *
	 * @param XdmfAttributeType to compare inequality to.
	 * @return true iff the XdmfAttributeTypes are not equal.
	 */
	bool operator!=(const XdmfAttributeType& top) const;

49
50
	XdmfAttributeType(const XdmfAttributeType& attributeType);
	XdmfAttributeType& operator=(const XdmfAttributeType& attributeType);
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

protected:

	/**
	 * Protected constructor for XdmfAttributeType.  The constructor is protected because all attribute types supported
	 * by Xdmf should be accessed through more specific static methods that construct XdmfAttributeTypes - i.e. XdmfAttributeType::Scalar().
	 */
	XdmfAttributeType(const std::string& name);

private:

	std::string mName;
};

#endif /* XDMFATTRIBUTETYPE_HPP_ */