XdmfGeometry.hpp 1.76 KB
Newer Older
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
1 2 3
#ifndef XDMFGEOMETRY_HPP_
#define XDMFGEOMETRY_HPP_

4 5 6
// Forward Declarations
class XdmfGeometryType;

7
// Includes
8
#include "XdmfDataItem.hpp"
9

10 11 12 13 14 15 16
/**
 * @brief Handles the coordinate positions of points in an XdmfGrid.
 *
 * XdmfGeometry is a required part of an XdmfGrid.  It stores the coordinate values
 * of all points contained in an XdmfGrid.  XdmfGeometry contains an XdmfGeometryType property
 * which should be set that specifies the types of coordinate values stored.
 */
17
class XdmfGeometry : public XdmfDataItem {
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
18 19 20

public:

21 22 23 24 25
	/**
	 * Create a new XdmfGeometry.
	 *
	 * @return constructed XdmfGeometry.
	 */
26
	static boost::shared_ptr<XdmfGeometry> New();
27

28 29
	virtual ~XdmfGeometry();

30
	LOKI_DEFINE_VISITABLE(XdmfGeometry, XdmfDataItem)
31
	static const std::string ItemTag;
32

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

35 36
	std::string getItemTag() const;

37 38 39 40 41
	/**
	 * Get the number of points stored in this geometry.
	 */
	unsigned int getNumberPoints() const;

42 43 44 45 46 47 48
	/**
	 * Get the XdmfGeometryType associated with this geometry.
	 *
	 * @return XdmfGeometryType of this geometry.
	 */
	boost::shared_ptr<const XdmfGeometryType> getType() const;

49
	/**
50
	 * Set the XdmfGeometryType associated with this geometry.
51
	 *
52
	 * @param geometryType the XdmfGeometryType to set.
53
	 */
54
	void setType(const boost::shared_ptr<const XdmfGeometryType> geometryType);
55

Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
56 57 58
protected:

	XdmfGeometry();
59
	virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
60 61 62

private:

63 64
	XdmfGeometry(const XdmfGeometry & geometry);  // Not implemented.
	void operator=(const XdmfGeometry & geometry);  // Not implemented.
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
65

66
	boost::shared_ptr<const XdmfGeometryType> mGeometryType;
67
	int mNumberPoints;
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
68 69 70
};

#endif /* XDMFGEOMETRY_HPP_ */