XdmfGridCollectionType.hpp 1.83 KB
Newer Older
1 2 3 4
#ifndef XDMFGRIDCOLLECTIONTYPE_HPP_
#define XDMFGRIDCOLLECTIONTYPE_HPP_

// Includes
5
#include "Xdmf.hpp"
6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include "XdmfItemProperty.hpp"

/**
 * @brief Property describing the type of an XdmfGridCollection.
 *
 * XdmfGridCollectionType is a property used by XdmfGridCollection to specify what type of collection the
 * XdmfGridCollection contains.  A specific XdmfGridCollectionType can be created by calling one of the static methods
 * in the class, i.e. XdmfGridCollectionType::Temporal().
 *
 * Xdmf supports the following collection types:
 * 	NoCollectionType
 * 	Spatial
 * 	Temporal
 */
20
class XDMF_EXPORT XdmfGridCollectionType : public XdmfItemProperty {
21 22 23

public:

24 25
	virtual ~XdmfGridCollectionType();

26 27 28
	friend class XdmfGridCollection;

	// Supported XdmfGridCollectionTypes
29 30 31
	static boost::shared_ptr<const XdmfGridCollectionType> NoCollectionType();
	static boost::shared_ptr<const XdmfGridCollectionType> Spatial();
	static boost::shared_ptr<const XdmfGridCollectionType> Temporal();
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

	void getProperties(std::map<std::string, std::string> & collectedProperties) const;

protected:

	/**
	 * Protected constructor for XdmfGridCollectionType.  The constructor is protected because all collection types supported
	 * by Xdmf should be accessed through more specific static methods that construct XdmfGridCollectionType - i.e.
	 * XdmfGridCollectionType::Temporal().
	 *
	 * @param name the name of the XdmfGridCollectionType to construct.
	 */
	XdmfGridCollectionType(const std::string & name);

private:

48 49 50 51
	XdmfGridCollectionType(const XdmfGridCollectionType & collectionType); // Not implemented.
	void operator=(const XdmfGridCollectionType & collectionType); // Not implemented.

	static boost::shared_ptr<const XdmfGridCollectionType> New(const std::map<std::string, std::string> & itemProperties);
52 53 54 55 56

	std::string mName;
};

#endif /* XDMFGRIDCOLLECTIONTYPE_HPP_ */