XdmfSetType.hpp 1.57 KB
Newer Older
1 2 3 4
#ifndef XDMFSETTYPE_HPP_
#define XDMFSETTYPE_HPP_

// Includes
5
#include "Xdmf.hpp"
6 7 8
#include "XdmfItemProperty.hpp"

/**
9
 * @brief Property describing the type of ids an XdmfSet contains.
10
 *
11 12 13
 * An XdmfSet holds ids for a collection of nodes, cells, faces, or
 * edges that are part of an XdmfGrid. This property indicates which
 * type the set contains.
14 15
 *
 * Xdmf supports the following set types:
16 17 18 19 20
 *   NoSetType
 *   Node
 *   Cell
 *   Face
 *   Edge
21
 */
22
class XDMF_EXPORT XdmfSetType : public XdmfItemProperty {
23

24
public:
25

26
  virtual ~XdmfSetType();
27

28
  friend class XdmfSet;
29

30
  // Supported Xdmf Set Types
31 32 33 34 35
  static shared_ptr<const XdmfSetType> NoSetType();
  static shared_ptr<const XdmfSetType> Node();
  static shared_ptr<const XdmfSetType> Cell();
  static shared_ptr<const XdmfSetType> Face();
  static shared_ptr<const XdmfSetType> Edge();
36

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

40
protected:
41

42
  /**
43 44 45 46
   * Protected constructor for XdmfSetType. The constructor is
   * protected because all set types supported by Xdmf should be
   * accessed through more specific static methods that construct
   * XdmfSetTypes - i.e. XdmfSetType::Node().
47 48 49 50
   *
   * @param name a std::string containing the name of the XdmfSetType.
   */
  XdmfSetType(const std::string & name);
51

52
private:
53

54 55
  XdmfSetType(const XdmfSetType &); // Not implemented.
  void operator=(const XdmfSetType &); // Not implemented.
56

57
  static shared_ptr<const XdmfSetType>
58
  New(const std::map<std::string, std::string> & itemProperties);
59

60
  std::string mName;
61 62
};

63
#endif /* XDMFSETTYPE_HPP_ */