XdmfTopology.hpp 1.79 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::map<std::string, std::string> getItemProperties() const;

35 36
	std::string getItemTag() const;

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

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

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

protected:

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

Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
63 64
private:

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

68
	boost::shared_ptr<const XdmfTopologyType> mType;
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
69 70 71
};

#endif /* XDMFTOPOLOGY_HPP_ */