XdmfSet.hpp 1.73 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#ifndef XDMFSET_HPP_
#define XDMFSET_HPP_

// Includes
#include "XdmfDataItem.hpp"
#include "XdmfSetType.hpp"

/**
 * @brief Holds a collection of individual nodes, cells, faces, or edges that are part of an XdmfGrid.
 *
 * An XdmfSet holds a collection of nodes, cells, faces, or edges that are part of an XdmfGrid.  For instance,
12 13 14
 * a simulation may want to hold a set of nodes along a boundary.  The individual elements making up the
 * set are determined by their id.  An XdmfSet can have XdmfAttributes attached that contain extra values
 * attached to the elements in the set.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
 */
class XdmfSet : public XdmfDataItem {

public:

	XdmfNewMacro(XdmfSet);
	LOKI_DEFINE_VISITABLE(XdmfSet, XdmfDataItem)
	static std::string ItemTag;

	/**
	 * Get the XdmfSetType associated with this set.
	 *
	 * @return XdmfSetType of this set.
	 */
	XdmfSetType getSetType() const;

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

	std::string getItemTag() const;

	/**
	 * Get the name of the set.
	 *
	 * @return a string containing the name of the set.
	 */
	std::string getName() const;

	/**
	 * Set the name of the set.
	 *
	 * @param name a string containing the name to set.
	 */
	void setName(const std::string & name);

	/**
	 * Set the XdmfSetType associated with this set.
	 *
	 * @param setType the XdmfSetType to set.
	 */
	void setSetType(const XdmfSetType & setType);

protected:

	XdmfSet();
	virtual ~XdmfSet();
	virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);

private:

	XdmfSet(const XdmfSet & set);  // Not implemented.
	void operator=(const XdmfSet & set);  // Not implemented.

	std::string mName;
	XdmfSetType mSetType;
};

#endif /* XDMFSET_HPP_ */