XdmfTime.hpp 1.34 KB
Newer Older
1
2
3
4
#ifndef XDMFTIME_HPP_
#define XDMFTIME_HPP_

// Includes
5
#include "Xdmf.hpp"
6
7
8
9
10
11
12
#include "XdmfItem.hpp"

/**
 * @brief Time specification for an XdmfGrid Item.
 *
 * An XdmfTime sets a time value for an XdmfGrid item.
 */
13
class XDMF_EXPORT XdmfTime : public XdmfItem {
14
15
16
17
18
19

public:

	/**
	 * Create a new XdmfTime.
	 *
20
	 * @param value the timeValue of the XdmfTime to create.
21
22
	 * @return the new XdmfTime.
	 */
23
	static boost::shared_ptr<XdmfTime> New(const double & value = 0);
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

	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.
	 *
44
	 * @param time a double containing the time value.
45
46
47
48
49
50
	 */
	void setValue(const double & time);

protected:

	XdmfTime(const double & value);
51
	virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
52
53
54
55
56
57
58
59
60
61

private:

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

	double mValue;
};

#endif /* XDMFTIME_HPP_ */