XdmfReader.hpp 3.06 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 : XdmfReader.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
#ifndef XDMFREADER_HPP_
#define XDMFREADER_HPP_

// Includes
28
#include "Xdmf.hpp"
29
#include "XdmfCoreReader.hpp"
30 31 32 33

/**
 * @brief Reads an Xdmf file stored on disk into memory.
 *
34 35 36 37
 * Reads an Xdmf file stored on disk into an Xdmf structure in
 * memory. All light data is parsed in order to create appropriate
 * Xdmf objects. Heavy data controllers are created and attached to
 * XdmfArrays but no heavy data is read into memory.
38
 */
39
class XDMF_EXPORT XdmfReader : public XdmfCoreReader {
40

41
public:
42

43 44 45
  /**
   * Create a new XdmfReader.
   *
46 47 48 49
   * Example of use:
   *
   * C++
   *
50
   * @dontinclude ExampleXdmfReader.cpp
51 52
   * @skipline //#initialization
   * @until //#initialization
53 54 55
   *
   * Python
   *
56
   * @dontinclude XdmfExampleReader.py
57 58
   * @skipline #//initialization
   * @until #//initialization
59
   *
60
   * @return    Constructed XdmfReader.
61
   */
62
  static shared_ptr<XdmfReader> New();
63

64
  virtual ~XdmfReader();
65

66
  shared_ptr<XdmfItem> read(const std::string & filePath) const;
67

68
  std::vector<shared_ptr<XdmfItem> >
69 70
  read(const std::string & filePath,
       const std::string & xPath) const;
71

72
protected:
73

74
  XdmfReader();
75

76
private:
77

78 79
  XdmfReader(const XdmfReader &);  // Not implemented.
  void operator=(const XdmfReader &);  // Not implemented.
80 81
};

82
#ifdef _WIN32
83
XDMF_TEMPLATE template class XDMF_EXPORT
84
shared_ptr<XdmfItem>;
85 86
#endif

87
#endif /* XDMFREADER_HPP_ */