XdmfItemFactory.hpp 1.02 KB
Newer Older
1 2 3 4 5 6 7
#ifndef XDMFITEMFACTORY_HPP_
#define XDMFITEMFACTORY_HPP_

// Forward Declarations
class XdmfItem;

// Includes
8
#include "Xdmf.hpp"
9 10 11 12 13
#include "XdmfCoreItemFactory.hpp"

/**
 * @brief Factory for constructing XdmfItems from their ItemTag and ItemProperties
 */
14
class XDMF_EXPORT XdmfItemFactory : public XdmfCoreItemFactory {
15 16 17

public:

18 19 20 21 22
	/**
	 * Create a new XdmfItemFactory.
	 *
	 * @return constructed XdmfItemFactory.
	 */
23
	static boost::shared_ptr<XdmfItemFactory> New();
24

25 26
	virtual ~XdmfItemFactory();

27
	virtual boost::shared_ptr<XdmfItem> createItem(const std::string & itemTag, const std::map<std::string, std::string> & itemProperties, const std::vector<boost::shared_ptr<XdmfItem> > & childItems) const;
28 29 30 31 32 33 34 35 36 37 38 39

protected:

	XdmfItemFactory();

private:

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

};

40 41 42 43
#ifdef _WIN32
    XDMF_TEMPLATE template class XDMF_EXPORT boost::shared_ptr<XdmfItemFactory>;
#endif

44
#endif /* XDMFITEMFACTORY_HPP_ */