XdmfItemFactory.hpp 2.76 KB
Newer Older
Kenneth Leiter's avatar
Kenneth Leiter committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/*****************************************************************************/
/*                                    XDMF                                   */
/*                       eXtensible Data Model and Format                    */
/*                                                                           */
/*  Id : XdmfItemFactory.hpp                                                 */
/*                                                                           */
/*  Author:                                                                  */
/*     Kenneth Leiter                                                        */
/*     kenneth.leiter@arl.army.mil                                           */
/*     US Army Research Laboratory                                           */
/*     Aberdeen Proving Ground, MD                                           */
/*                                                                           */
/*     Copyright @ 2011 US Army Research Laboratory                          */
/*     All Rights Reserved                                                   */
/*     See Copyright.txt for details                                         */
/*                                                                           */
/*     This software is distributed WITHOUT ANY WARRANTY; without            */
/*     even the implied warranty of MERCHANTABILITY or FITNESS               */
/*     FOR A PARTICULAR PURPOSE.  See the above copyright notice             */
/*     for more information.                                                 */
/*                                                                           */
/*****************************************************************************/

24 25 26 27 28 29 30
#ifndef XDMFITEMFACTORY_HPP_
#define XDMFITEMFACTORY_HPP_

// Forward Declarations
class XdmfItem;

// Includes
31
#include "Xdmf.hpp"
32 33 34
#include "XdmfCoreItemFactory.hpp"

/**
35 36
 * @brief Factory for constructing XdmfItems from their ItemTag and
 * ItemProperties.
37
 */
38
class XDMF_EXPORT XdmfItemFactory : public XdmfCoreItemFactory {
39

40
 public:
41

42 43 44 45 46 47
  /**
   * Create a new XdmfItemFactory.
   *
   * @return constructed XdmfItemFactory.
   */
  static boost::shared_ptr<XdmfItemFactory> New();
48

49
  virtual ~XdmfItemFactory();
50

51 52 53 54
  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;
55

56
 protected:
57

58
  XdmfItemFactory();
59

60
 private:
61

62 63
  XdmfItemFactory(const XdmfItemFactory &);  // Not implemented.
  void operator=(const XdmfItemFactory &);  // Not implemented.
64 65 66

};

67 68 69 70
#ifdef _WIN32
    XDMF_TEMPLATE template class XDMF_EXPORT boost::shared_ptr<XdmfItemFactory>;
#endif

71
#endif /* XDMFITEMFACTORY_HPP_ */