VAPOR3 3.9.4
ImpExp.h
Go to the documentation of this file.
1//
2// $Id$
3//
4
5#ifndef _ImpExp_h_
6#define _ImpExp_h_
7
8#include <stack>
9#include <expat.h>
10#include <vapor/MyBase.h>
11#include <vapor/common.h>
12#include <vapor/XmlNode.h>
13#include <vapor/ExpatParseMgr.h>
14#ifdef WIN32
15 #pragma warning(disable : 4251)
16#endif
17namespace VAPoR {
18
19//
28class VDF_API ImpExp : public Wasp::MyBase, public ParsedXml {
29public:
32 //
34
35 virtual ~ImpExp();
36
64 //
65 int Export(const string &path, size_t ts, const string &varname, const size_t min[3], const size_t max[3], const size_t timeseg[2]);
66
85 //
86 int Import(string *path, size_t *ts, string *varname, size_t min[3], size_t max[3], size_t timeseg[2]);
87 static string GetPath();
88
89private:
90 int _objInitialized; // has the obj successfully been initialized?
91 XmlNode *_rootnode; // root node of the xml tree
92
93 static const string _rootTag;
94 static const string _pathNameTag;
95 static const string _timeStepTag;
96 static const string _varNameTag;
97 static const string _regionTag;
98 static const string _timeSegmentTag;
99
100 bool elementStartHandler(ExpatParseMgr *, int depth, std::string &tag, const char **attr);
101 bool elementEndHandler(ExpatParseMgr *, int depth, std::string &);
102
103 // XML Expat element handler helpers. A different handler is defined
104 // for each possible state (depth of XML tree) from 0 to 1
105 //
106 void _startElementHandler0(ExpatParseMgr *, const string &tag, const char **attrs);
107 void _startElementHandler1(ExpatParseMgr *, const string &tag, const char **attrs);
108 void _endElementHandler0(ExpatParseMgr *, const string &tag);
109 void _endElementHandler1(ExpatParseMgr *, const string &tag);
110};
111
112}; // namespace VAPoR
113
114#endif // _ImpExp_h_
A class for managing data set metadata.
Definition: ImpExp.h:28
static string GetPath()
int Export(const string &path, size_t ts, const string &varname, const size_t min[3], const size_t max[3], const size_t timeseg[2])
int Import(string *path, size_t *ts, string *varname, size_t min[3], size_t max[3], size_t timeseg[2])
virtual ~ImpExp()
An Xml tree.
Definition: XmlNode.h:49
Wasp base class.
Definition: MyBase.h:67
#define VDF_API
Definition: common.h:73