File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111#include < string>
1212#include < tuple>
1313#include < exception>
14- #include < cstdalign>
1514
1615// @todo don't do std::less but use hashing and cache hash values.
1716
Original file line number Diff line number Diff line change 2727#include < algorithm>
2828
2929#include " ifc_parse_api.h"
30-
31- #include " ../ifcparse/aggregate_of_instance.h"
30+ #include " ArgumentType.h"
3231
3332#include < boost/shared_ptr.hpp>
3433#include < boost/dynamic_bitset.hpp>
3534#include < boost/logic/tribool.hpp>
3635
37- /*
38- namespace boost {
39- namespace logic {
40- class tribool {
41-
42- };
43- }
44- }
45- */
46-
47- class Argument ;
48-
4936class aggregate_of_instance ;
5037class aggregate_of_aggregate_of_instance ;
5138
52- class IfcEntityInstanceData ;
53- namespace IfcParse {
54- class IfcFile ;
55- }
5639namespace IfcUtil {
5740 class IfcBaseClass ;
5841
@@ -76,11 +59,11 @@ class IFC_PARSE_API Argument {
7659 virtual operator std::vector<double >() const ;
7760 virtual operator std::vector<std::string>() const ;
7861 virtual operator std::vector<boost::dynamic_bitset<> >() const ;
79- virtual operator aggregate_of_instance::ptr () const ;
62+ virtual operator boost::shared_ptr<aggregate_of_instance> () const ;
8063
8164 virtual operator std::vector< std::vector<int > >() const ;
8265 virtual operator std::vector< std::vector<double > >() const ;
83- virtual operator aggregate_of_aggregate_of_instance::ptr () const ;
66+ virtual operator boost::shared_ptr<aggregate_of_aggregate_of_instance> () const ;
8467
8568 virtual bool isNull () const = 0;
8669 virtual unsigned int size () const = 0;
Original file line number Diff line number Diff line change @@ -129,19 +129,10 @@ namespace IfcUtil {
129129 Argument* get (const std::string& name) const ;
130130
131131 template <typename T>
132- T get_value (const std::string& name) const {
133- auto attr = get (name);
134- return (T)*attr;
135- }
132+ T get_value (const std::string& name) const ;
136133
137134 template <typename T>
138- T get_value (const std::string& name, const T& default_value) const {
139- auto attr = get (name);
140- if (attr->isNull ()) {
141- return default_value;
142- }
143- return (T)*attr;
144- }
135+ T get_value (const std::string& name, const T& default_value) const ;
145136
146137 boost::shared_ptr<aggregate_of_instance> get_inverse (const std::string& a) const ;
147138 };
@@ -157,4 +148,23 @@ namespace IfcUtil {
157148
158149}
159150
151+ #include " ../ifcparse/Argument.h"
152+
153+ namespace IfcUtil {
154+ template <typename T>
155+ T IfcBaseEntity::get_value (const std::string& name) const {
156+ auto attr = get (name);
157+ return (T)*attr;
158+ }
159+
160+ template <typename T>
161+ T IfcBaseEntity::get_value (const std::string& name, const T& default_value) const {
162+ auto attr = get (name);
163+ if (attr->isNull ()) {
164+ return default_value;
165+ }
166+ return (T)*attr;
167+ }
168+ }
169+
160170#endif
Original file line number Diff line number Diff line change 5252#include " ../ifcparse/IfcBaseClass.h"
5353#include " ../ifcparse/IfcLogger.h"
5454#include " ../ifcparse/Argument.h"
55+ #include " ../ifcparse/aggregate_of_instance.h"
5556
5657#include " ../ifcparse/IfcSpfStream.h"
5758
You can’t perform that action at this time.
0 commit comments