XdmfCoreItemFactory.hpp 980 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#ifndef XDMFCOREITEMFACTORY_HPP_
#define XDMFCOREITEMFACTORY_HPP_

// Forward Declarations
class XdmfItem;

// Includes
#include <map>
#include "XdmfObject.hpp"

/**
12
 * @brief Factory that constructs XdmfItems using tags and properties.
13 14 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
 *
 * XdmfCoreItemFactory is an abstract base class.
 */
class XdmfCoreItemFactory : public XdmfObject {

public:

	virtual ~XdmfCoreItemFactory();

	/**
	 * Create a new XdmfItem.
	 *
	 * @param itemTag a string containing the tag of the XdmfItem to create.
	 * @param itemProperties a map of key/value properties for the the XdmfItem.
	 */
	virtual boost::shared_ptr<XdmfItem> createItem(const std::string & itemTag, const std::map<std::string, std::string> & itemProperties) const = 0;

protected:

	XdmfCoreItemFactory();

private:

	XdmfCoreItemFactory(const XdmfCoreItemFactory & itemFactory);  // Not implemented.
	void operator=(const XdmfCoreItemFactory & itemFactory);  // Not implemented.

};

#endif /* XDMFCOREITEMFACTORY_HPP_ */