XdmfGeometry.hpp 3.63 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 : XdmfGeometry.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.                                                 */
/*                                                                           */
/*****************************************************************************/

Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
24 25 26
#ifndef XDMFGEOMETRY_HPP_
#define XDMFGEOMETRY_HPP_

27 28 29
// Forward Declarations
class XdmfGeometryType;

30
// Includes
31
#include "Xdmf.hpp"
32
#include "XdmfArray.hpp"
33

34 35 36
/**
 * @brief Handles the coordinate positions of points in an XdmfGrid.
 *
37 38 39 40
 * XdmfGeometry is a required part of an XdmfGrid. It stores the
 * coordinate locations of all points contained in an
 * XdmfGrid. XdmfGeometry contains an XdmfGeometryType property which
 * should be set that specifies the types of coordinate values stored.
41
 */
42
class XDMF_EXPORT XdmfGeometry : public XdmfArray {
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
43

44
public:
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
45

46 47 48 49 50
  /**
   * Create a new XdmfGeometry.
   *
   * @return constructed XdmfGeometry.
   */
51
  static shared_ptr<XdmfGeometry> New();
52

53
  virtual ~XdmfGeometry();
54

55 56
  LOKI_DEFINE_VISITABLE(XdmfGeometry, XdmfArray);
  static const std::string ItemTag;
57

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

60
  std::string getItemTag() const;
61

62 63 64 65
  /**
   * Get the number of points stored in this geometry.
   */
  virtual unsigned int getNumberPoints() const;
66

67 68 69 70 71
  /**
   * Get the XdmfGeometryType associated with this geometry.
   *
   * @return XdmfGeometryType of this geometry.
   */
72
  shared_ptr<const XdmfGeometryType> getType() const;
73

74 75 76 77 78
  /**
   * Set the XdmfGeometryType associated with this geometry.
   *
   * @param type the XdmfGeometryType to set.
   */
79
  void setType(const shared_ptr<const XdmfGeometryType> type);
80

81
protected:
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
82

83
  XdmfGeometry();
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
84

85 86
  virtual void
  populateItem(const std::map<std::string, std::string> & itemProperties,
87
               std::vector<shared_ptr<XdmfItem> > & childItems,
88
               const XdmfCoreReader * const reader);
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
89

90
private:
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
91

92 93 94 95
  XdmfGeometry(const XdmfGeometry &);  // Not implemented.
  void operator=(const XdmfGeometry &);  // Not implemented.

  int mNumberPoints;
96
  shared_ptr<const XdmfGeometryType> mType;
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
97 98
};

99
#ifdef _WIN32
100
XDMF_TEMPLATE template class XDMF_EXPORT
101
shared_ptr<const XdmfGeometryType>;
102 103
#endif

Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
104
#endif /* XDMFGEOMETRY_HPP_ */