XdmfTopology.hpp 1.86 KB
Newer Older
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
1 2 3
#ifndef XDMFTOPOLOGY_HPP_
#define XDMFTOPOLOGY_HPP_

4 5 6
// Forward Declarations
class XdmfTopologyType;

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

10 11 12
/**
 * @brief Handles the connectivity information in an XdmfGrid.
 *
13
 * XdmfTopology is a required part of an XdmfGrid.  It stores the connectivity information
14 15 16
 * between all points contained in an XdmfGrid.  XdmfTopology contains an XdmfTopologyType property
 * which should be set that specifies the element type stored.
 */
17
class XdmfTopology : public XdmfArray {
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
18 19 20

public:

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

28 29
	virtual ~XdmfTopology();

30
	LOKI_DEFINE_VISITABLE(XdmfTopology, XdmfArray)
31
	static const std::string ItemTag;
32

33 34
	std::string getDimensions() const;

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

37 38
	std::string getItemTag() const;

39 40 41 42 43
	/**
	 * Get the number of elements this Topology contains.
	 *
	 * @return int of number elements in the Topology.
	 */
44
	virtual unsigned int getNumberElements() const;
45

46
	/**
47
	 * Get the XdmfTopologyType associated with this topology.
48
	 *
49
	 * @return XdmfTopologyType of the topology.
50
	 */
51
	boost::shared_ptr<const XdmfTopologyType> getType() const;
52

53
	/**
54
	 * Set the XdmfTopologyType associated with this topology.
55
	 *
56
	 * @param type the XdmfTopologyType to set.
57
	 */
58
	void setType(const boost::shared_ptr<const XdmfTopologyType> type);
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
59 60 61 62

protected:

	XdmfTopology();
63
	virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
64

Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
65 66
private:

67 68
	XdmfTopology(const XdmfTopology & topology);  // Not implemented.
	void operator=(const XdmfTopology & topology);  // Not implemented.
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
69

70
	std::string mDimensions;
71
	boost::shared_ptr<const XdmfTopologyType> mType;
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
72 73 74
};

#endif /* XDMFTOPOLOGY_HPP_ */