|
20 | 20 | #ifndef ARGUMENT_H |
21 | 21 | #define ARGUMENT_H |
22 | 22 |
|
23 | | -#include <set> |
24 | | -#include <string> |
25 | | -#include <vector> |
26 | | -#include <sstream> |
27 | | -#include <algorithm> |
28 | | - |
29 | | -#include "ifc_parse_api.h" |
30 | 23 | #include "ArgumentType.h" |
| 24 | +#include "ifc_parse_api.h" |
31 | 25 |
|
32 | | -#include <boost/shared_ptr.hpp> |
| 26 | +#include <algorithm> |
33 | 27 | #include <boost/dynamic_bitset.hpp> |
34 | 28 | #include <boost/logic/tribool.hpp> |
| 29 | +#include <boost/shared_ptr.hpp> |
| 30 | +#include <set> |
| 31 | +#include <sstream> |
| 32 | +#include <string> |
| 33 | +#include <vector> |
35 | 34 |
|
36 | 35 | class aggregate_of_instance; |
37 | 36 | class aggregate_of_aggregate_of_instance; |
38 | 37 |
|
39 | 38 | namespace IfcUtil { |
40 | | - class IfcBaseClass; |
| 39 | +class IfcBaseClass; |
41 | 40 |
|
42 | | - IFC_PARSE_API const char* ArgumentTypeToString(ArgumentType argument_type); |
| 41 | +IFC_PARSE_API const char* ArgumentTypeToString(ArgumentType argument_type); |
43 | 42 |
|
44 | | - /// Returns false when the string `s` contains character outside of {'0', '1'} |
45 | | - IFC_PARSE_API bool valid_binary_string(const std::string& s); |
46 | | -} |
| 43 | +/// Returns false when the string `s` contains character outside of {'0', '1'} |
| 44 | +IFC_PARSE_API bool valid_binary_string(const std::string& s); |
| 45 | +} // namespace IfcUtil |
47 | 46 |
|
48 | 47 | class IFC_PARSE_API Argument { |
49 | | -public: |
50 | | - virtual operator int() const; |
51 | | - virtual operator bool() const; |
52 | | - virtual operator boost::logic::tribool() const; |
53 | | - virtual operator double() const; |
54 | | - virtual operator std::string() const; |
55 | | - virtual operator boost::dynamic_bitset<>() const; |
56 | | - virtual operator IfcUtil::IfcBaseClass*() const; |
| 48 | + public: |
| 49 | + virtual operator int() const; |
| 50 | + virtual operator bool() const; |
| 51 | + virtual operator boost::logic::tribool() const; |
| 52 | + virtual operator double() const; |
| 53 | + virtual operator std::string() const; |
| 54 | + virtual operator boost::dynamic_bitset<>() const; |
| 55 | + virtual operator IfcUtil::IfcBaseClass*() const; |
| 56 | + |
| 57 | + virtual operator std::vector<int>() const; |
| 58 | + virtual operator std::vector<double>() const; |
| 59 | + virtual operator std::vector<std::string>() const; |
| 60 | + virtual operator std::vector<boost::dynamic_bitset<>>() const; |
| 61 | + virtual operator boost::shared_ptr<aggregate_of_instance>() const; |
57 | 62 |
|
58 | | - virtual operator std::vector<int>() const; |
59 | | - virtual operator std::vector<double>() const; |
60 | | - virtual operator std::vector<std::string>() const; |
61 | | - virtual operator std::vector<boost::dynamic_bitset<> >() const; |
62 | | - virtual operator boost::shared_ptr<aggregate_of_instance>() const; |
| 63 | + virtual operator std::vector<std::vector<int>>() const; |
| 64 | + virtual operator std::vector<std::vector<double>>() const; |
| 65 | + virtual operator boost::shared_ptr<aggregate_of_aggregate_of_instance>() const; |
63 | 66 |
|
64 | | - virtual operator std::vector< std::vector<int> >() const; |
65 | | - virtual operator std::vector< std::vector<double> >() const; |
66 | | - virtual operator boost::shared_ptr<aggregate_of_aggregate_of_instance>() const; |
| 67 | + virtual bool isNull() const = 0; |
| 68 | + virtual unsigned int size() const = 0; |
67 | 69 |
|
68 | | - virtual bool isNull() const = 0; |
69 | | - virtual unsigned int size() const = 0; |
| 70 | + virtual IfcUtil::ArgumentType type() const = 0; |
| 71 | + virtual Argument* operator[](unsigned int i) const = 0; |
| 72 | + virtual std::string toString(bool upper = false) const = 0; |
70 | 73 |
|
71 | | - virtual IfcUtil::ArgumentType type() const = 0; |
72 | | - virtual Argument* operator [] (unsigned int i) const = 0; |
73 | | - virtual std::string toString(bool upper=false) const = 0; |
74 | | - |
75 | | - virtual ~Argument() {}; |
| 74 | + virtual ~Argument(){}; |
76 | 75 | }; |
77 | 76 |
|
78 | 77 | #endif |
0 commit comments