XdmfDomain.hpp 1.58 KB
Newer Older
Kenneth Leiter's avatar
Kenneth Leiter committed
1 2 3 4
#ifndef XDMFDOMAIN_HPP_
#define XDMFDOMAIN_HPP_

// Forward Declarations
5
class XdmfGridCollection;
6 7 8 9
class XdmfGridCurvilinear;
class XdmfGridRectilinear;
class XdmfGridRegular;
class XdmfGridUnstructured;
Kenneth Leiter's avatar
Kenneth Leiter committed
10 11

// Includes
12
#include "XdmfItem.hpp"
Kenneth Leiter's avatar
Kenneth Leiter committed
13

14 15 16 17 18 19
/**
 * @brief The root XdmfItem that contains XdmfGrids.
 *
 * XdmfDomain is the top XdmfItem in an Xdmf structure.  It can store a number of grids and
 * provides methods to insert, retrieve, and remove these grids.
 */
20
class XdmfDomain : public virtual XdmfItem {
Kenneth Leiter's avatar
Kenneth Leiter committed
21 22 23

public:

24 25 26 27 28
	/**
	 * Create a new XdmfDomain.
	 *
	 * @return constructed XdmfDomain.
	 */
29
	static boost::shared_ptr<XdmfDomain> New();
30 31
	virtual ~XdmfDomain();

32
	LOKI_DEFINE_VISITABLE(XdmfDomain, XdmfItem)
33
	XDMF_CHILDREN(XdmfGridCollection, GridCollection, Name)
34 35 36 37
	XDMF_CHILDREN(XdmfGridCurvilinear, GridCurvilinear, Name)
	XDMF_CHILDREN(XdmfGridRectilinear, GridRectilinear, Name)
	XDMF_CHILDREN(XdmfGridRegular, GridRegular, Name)
	XDMF_CHILDREN(XdmfGridUnstructured, GridUnstructured, Name)
38
	static const std::string ItemTag;
39

40
	std::map<std::string, std::string> getItemProperties() const;
Kenneth Leiter's avatar
Kenneth Leiter committed
41

42
	virtual std::string getItemTag() const;
43

44 45
	using XdmfItem::insert;

46
	virtual void traverse(const boost::shared_ptr<XdmfBaseVisitor> visitor);
Kenneth Leiter's avatar
Kenneth Leiter committed
47 48 49 50

protected:

	XdmfDomain();
51
	virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
Kenneth Leiter's avatar
Kenneth Leiter committed
52 53 54

private:

55 56
	XdmfDomain(const XdmfDomain & domain);  // Not implemented.
	void operator=(const XdmfDomain & domain);  // Not implemented.
Kenneth Leiter's avatar
Kenneth Leiter committed
57 58 59 60

};

#endif /* XDMFDOMAIN_HPP_ */