Debian Codegraph @

packages/seacas/libraries/ioss/src/visualization/catalyst/parser/PhactoriParserInterface.h

raw
1 // Copyright(C) 1999-2021 National Technology & Engineering Solutions
2 // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 // NTESS, the U.S. Government retains certain rights in this software.
4 //
5 // See packages/seacas/LICENSE for details
6
7 #ifndef __PhactoriParserInterface_h
8 #define __PhactoriParserInterface_h
9
10 #include <map>
11 #include <string>
12 #include <utility>
13 #include <vector>
14
15 namespace Iovs {
16
17 class PhactoriParserInterface
18 {
19
20 public:
21 enum VarType {
22 SCALAR,
23 VECTOR,
24 TENSOR,
25 ALLTYPE,
26 SCALAR_USED,
27 VECTOR_USED,
28 TENSOR_USED,
29 ALLTYPE_USED
30 };
31
32 typedef std::map<std::string, VarType> varMap;
33 typedef std::pair<unsigned int, unsigned int> idRange;
34
35 struct ParseInfo
36 {
37 varMap nodeVars;
38 varMap elementVars;
39 varMap globalVars;
40 bool checkNodeIDRange = false;
41 idRange nodeIDRange;
42 bool checkElementIDRange = false;
43 idRange elementIDRange;
44 std::string separator = "_";
45 std::string jsonParseResult = "";
46 bool parseFailed = true;
47 };
48
49 static void parseFile(const std::string &filepath, ParseInfo &pinfo);
50
51 static void parseString(const std::string &s, ParseInfo &pinfo);
52 };
53
54 } // namespace Iovs
55
56 #endif