XdmfReader.hpp 2.79 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 46 47
  /**
   * Create a new XdmfReader.
   *
   * @return constructed XdmfReader.
   */
48
  static shared_ptr<XdmfReader> New();
49

50
  virtual ~XdmfReader();
51

52
  shared_ptr<XdmfItem> read(const std::string & filePath) const;
53

54
  std::vector<shared_ptr<XdmfItem> >
55 56
  read(const std::string & filePath,
       const std::string & xPath) const;
57

58
protected:
59

60
  XdmfReader();
61

62
private:
63

64 65
  XdmfReader(const XdmfReader &);  // Not implemented.
  void operator=(const XdmfReader &);  // Not implemented.
66 67
};

68
#ifdef _WIN32
69
XDMF_TEMPLATE template class XDMF_EXPORT
70
shared_ptr<XdmfItem>;
71 72
#endif

73
#endif /* XDMFREADER_HPP_ */