mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 00:03:17 +00:00
Add support for reading and writing BINARY attributes. Rename members of the IfcUtil::ArgumentType enumeration.
This commit is contained in:
+31
-14
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <boost/variant.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/dynamic_bitset.hpp>
|
||||
|
||||
#include "../ifcparse/IfcUtil.h"
|
||||
#include "../ifcparse/IfcParse.h"
|
||||
@@ -58,20 +59,18 @@ namespace IfcWrite {
|
||||
boost::none_t,
|
||||
// A derived argument, it will always serialize to *
|
||||
Derived,
|
||||
// An integer argument, e.g. 123
|
||||
// An integer argument, e.g. 123
|
||||
|
||||
// SCALARS:
|
||||
int,
|
||||
// A boolean argument, it will serialize to either .T. or .F.
|
||||
bool,
|
||||
// A floating point argument, e.g. 12.3
|
||||
double,
|
||||
// A character string argument, e.g. 'IfcOpenShell'
|
||||
std::string,
|
||||
// A list of integers, e.g. (1,2,3)
|
||||
std::vector<int>,
|
||||
// A list of floats, e.g. (12.3,4.)
|
||||
std::vector<double>,
|
||||
// A list of strings, e.g. ('Ifc','Open','Shell')
|
||||
std::vector<std::string>,
|
||||
std::string,
|
||||
// A binary argument, e.g. "092A" -> 100100101010
|
||||
boost::dynamic_bitset<>,
|
||||
// An enumeration argument, e.g. .USERDEFINED.
|
||||
// To initialize the argument a string representation
|
||||
// has to be explicitely passed of the enumeration value
|
||||
@@ -83,11 +82,23 @@ namespace IfcWrite {
|
||||
// e.g. #123 or datatype identifier for simple types, e.g.
|
||||
// IFCREAL(12.3)
|
||||
IfcUtil::IfcBaseClass*,
|
||||
// An entity list argument. It will either serialize to
|
||||
|
||||
// AGGREGATES:
|
||||
// An aggregate of integers, e.g. (1,2,3)
|
||||
std::vector<int>,
|
||||
// An aggregate of floats, e.g. (12.3,4.)
|
||||
std::vector<double>,
|
||||
// An aggregate of strings, e.g. ('Ifc','Open','Shell')
|
||||
std::vector<std::string>,
|
||||
// An aggregate of binaries, e.g. ("23B", "092A") -> (111011, 100100101010)
|
||||
std::vector<boost::dynamic_bitset<> >,
|
||||
// An aggregate of entity instances. It will either serialize to
|
||||
// e.g. (#1,#2,#3) or datatype identifier for simple types,
|
||||
// e.g. (IFCREAL(1.2),IFCINTEGER(3.))
|
||||
IfcEntityList::ptr,
|
||||
// A list of list of entities. E.g. ((#1, #2), (#3))
|
||||
|
||||
// AGGREGATES OF AGGREGATES:
|
||||
// An aggregate of an aggregate of entities. E.g. ((#1, #2), (#3))
|
||||
IfcEntityListList::ptr
|
||||
> container;
|
||||
public:
|
||||
@@ -102,16 +113,22 @@ namespace IfcWrite {
|
||||
template <typename T> void set(const T& t) {
|
||||
container = t;
|
||||
}
|
||||
|
||||
operator int() const;
|
||||
operator bool() const;
|
||||
operator double() const;
|
||||
operator std::string() const;
|
||||
operator std::vector<double>() const;
|
||||
operator std::vector<int>() const;
|
||||
operator std::vector<std::string>() const;
|
||||
operator boost::dynamic_bitset<>() const;
|
||||
operator IfcUtil::IfcBaseClass*() const;
|
||||
|
||||
operator std::vector<int>() const;
|
||||
operator std::vector<double>() const;
|
||||
operator std::vector<std::string>() const;
|
||||
operator std::vector<boost::dynamic_bitset<> >() const;
|
||||
operator IfcEntityList::ptr() const;
|
||||
operator IfcEntityListList::ptr() const;
|
||||
|
||||
operator IfcEntityListList::ptr() const;
|
||||
|
||||
bool isNull() const;
|
||||
Argument* operator [] (unsigned int i) const;
|
||||
std::string toString(bool upper=false) const;
|
||||
|
||||
Reference in New Issue
Block a user