XdmfTime.hpp 1.27 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef XDMFTIME_HPP_
#define XDMFTIME_HPP_

// Includes
#include "XdmfItem.hpp"

/**
 * @brief Time specification for an XdmfGrid Item.
 *
 * An XdmfTime sets a time value for an XdmfGrid item.
 */
class XdmfTime : public XdmfItem {

public:

	/**
	 * Create a new XdmfTime.
	 *
	 * @param timeValue the value of the XdmfTime to create.
	 * @return the new XdmfTime.
	 */
22
	static boost::shared_ptr<XdmfTime> New(const double & value = 0);
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
49
50
51
52
53
54
55
56
57
58
59
60

	virtual ~XdmfTime();

	LOKI_DEFINE_VISITABLE(XdmfTime, XdmfItem)
	static const std::string ItemTag;

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

	std::string getItemTag() const;

	/**
	 * Get the time value associated with this XdmfTime.
	 *
	 * @return a double containing the time value.
	 */
	double getValue() const;

	/**
	 * Set the time value associated with this XdmfTime.
	 *
	 * @return a double containing the time value.
	 */
	void setValue(const double & time);

protected:

	XdmfTime(const double & value);
	virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);

private:

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

	double mValue;
};

#endif /* XDMFTIME_HPP_ */