diff --git a/README b/README deleted file mode 100644 index 14730b5d04..0000000000 --- a/README +++ /dev/null @@ -1,65 +0,0 @@ -IfcOpenShell -============ -open source (LGPL) software library for working with the IFC file format - - -http://IfcOpenShell.org - - -Compiling on Windows -==================== -Users are advised to use the Visual Studio .sln file in the win/ folder. -For Windows users a prebuilt Open CASCADE version is available from the -http://opencascade.org website. Download and install this version and -provide the paths to the Open CASCADE header and library files to MS -Visual Studio C++. - -For building the Autodesk 3ds Max plugin, the 3ds Max SDK needs to be -installed as well as 3ds Max itself. Please provide the include and -library paths to Visual Studio. - -For building the IfcPython wrapper, SWIG needs to be installed. Please -download the latest swigwin version from http://www.swig.org/download.html. -After extracting the .zip file, please add the extracted folder to the PATH -environment variable. Python needs to be installed, please provide the -include and library paths to Visual Studio. - - - -Compiling on *nix -==================== -Users are advised to build IfcOpenShell using the cmake file provided in -the cmake/ folder. There might be an Open CASCADE package in your operating -system's software repository. If not, you will need to compile Open -CASCADE yourself. See http://opencascade.org. - -For building the IfcPython wrapper, SWIG and Python development are -required. - -To build IfcOpenShell please take the following steps: -$ cd /path/to/IfcOpenShell/cmake -$ mkdir build -$ cd build -Optionally: - $ OCC_INCLUDE_PATH="/path/to/OpenCASCADE/include" - $ OCC_LIBRARY_PATH="/path/to/OpenCASCADE/lib" - $ export OCC_INCLUDE_PATH - $ export OCC_LIBRARY_PATH -$ cmake ../ -$ make - -If all worked out correctly you can now use IfcOpenShell. For example: -$ wget ftp://ftp.dds.no/pub/ifc/Munkerud/Munkerud_hus6_BE.zip -$ unzip Munkerud_hus6_BE.zip -$ ./IfcObj Munkerud_hus6_BE.ifc -$ less Munkerud_hus6_BE.obj -Or: -$ wget ftp://ftp.dds.no/pub/ifc/Munkerud/Munkerud_hus6_BE.zip -$ unzip Munkerud_hus6_BE.zip -$ python ->>> import IfcImport ->>> IfcImport.Init('Munkerud_hus6_BE.ifc') ->>> geom = IfcImport.Get() ->>> geom.name ->>> for v in geom.mesh.verts: v - diff --git a/README.md b/README.md new file mode 100644 index 0000000000..7ca58c4025 --- /dev/null +++ b/README.md @@ -0,0 +1,122 @@ +IfcOpenShell +============ +open source (LGPL) software library for working with the IFC file format + + +http://IfcOpenShell.org + +About this repository +===================== + +This is an initiative to expose the functionality of IfcOpenShell for parsing and writing IFC files to a Python interface. The creation of a topological representation for building elements using Open Cascade is also wrapped by returning a string serialization of the Open Cascade TopoDS_Shape. Using SWIG a wrapper is obtained for a C++ Class which evaluates its Express attribute names and indices at runtime. The functions created by the SWIG wrapper closely resemble the C++ structure. The idea is to create an additional wrapper around these function in Python that is more idiomatic to Python. + +The following interactive session illustrates its use: + + >>> import IfcImport + >>> f = IfcImport.open(filename) + >>> f.by_type("ifcwall") + [#170=IfcWallStandardCase('0lJANQLbCEHPkU1Xq9w_bk',#13,'Wand-001',$,$,#167,#240,'2F4CA5DA-5653-0E45-9B-9E-061D09EBE96E'), + #288=IfcWallStandardCase('1sFBHOg98nGQTuD1XjjAKK',#13,'Wand-002',$,$,#285,#358,'763CB458-A892-3141-A7-78-34186DB4A514')] + >>> wall = _[0] + >>> brep_data = IfcImport.create_shape(wall) + >>> wall.get_argument_count() + 8 + >>> wall.get_argument('GlobalId') + '0lJANQLbCEHPkU1Xq9w_bk' + >>> wall.get_argument_index('Name') + 2 + >>> wall.set_argument(2,"John") + >>> wall.get_argument('Name') + 'John' + >>> wall.get_argument_index("foo") + Traceback (most recent call last): + File "", line 1, in + File "IfcImport.py", line 112, in get_argument_index + def get_argument_index(self, *args): return _IfcImport.Entity_get_argument_index(self, *args) + RuntimeError: Argument foo not found on IfcRoot + >>> wall.set_argument(5,"Hi") + Traceback (most recent call last): + File "", line 1, in + File "IfcImport.py", line 114, in set_argument + def set_argument(self, *args): return _IfcImport.Entity_set_argument(self, *args) + RuntimeError: STRING is not a valid type for 'ObjectPlacement' + >>> e = IfcImport.Entity("IfcJohn") + Traceback (most recent call last): + File "", line 1, in + File "IfcImport.py", line 105, in __init__ + this = _IfcImport.new_Entity(*args) + RuntimeError: Unable to find find keyword in schema + >>> pnt = IfcImport.Entity("ifccartesianpoint") + [60478 refs] + >>> pnt.set_argument(0,IfcImport.Doubles([0,0,0])) + [60486 refs] + >>> pnt + =IfcCartesianPoint((0,0,0)) + >>> f.add(pnt) + >>> f.write("out.ifc") + +**TODO**: By creating an additional wrapper in Python around these methods some syntactic sugar can be added so one is able to say the following instead: + + d = IfcDocument() + my_wall = d.createIfcWallStandardCase("1$gyu8123...",Representation=my_repr) + +With a document specifying a 'catch-all' function that creates the ifc entity based on the method being called, perhaps like so: + + class IfcDocument: + def create_entity(self,type,*args,**kwargs): + e = new IfcEntity(type) + # set all attributes in args and kwargs + self.add(e) + return e + def __getattr__(self,attr): + if attr[0:5] == 'create': return functools.partial(self.create_entity,attr[5:]) + ... + + +Compiling on Windows +==================== +Users are advised to use the Visual Studio .sln file in the win/ folder. +For Windows users a prebuilt Open CASCADE version is available from the +http://opencascade.org website. Download and install this version and +provide the paths to the Open CASCADE header and library files to MS +Visual Studio C++. + +For building the Autodesk 3ds Max plugin, the 3ds Max SDK needs to be +installed as well as 3ds Max itself. Please provide the include and +library paths to Visual Studio. + +For building the IfcPython wrapper, SWIG needs to be installed. Please +download the latest swigwin version from http://www.swig.org/download.html. +After extracting the .zip file, please add the extracted folder to the PATH +environment variable. Python needs to be installed, please provide the +include and library paths to Visual Studio. + + + +Compiling on *nix +==================== +Users are advised to build IfcOpenShell using the cmake file provided in +the cmake/ folder. There might be an Open CASCADE package in your operating +system's software repository. If not, you will need to compile Open +CASCADE yourself. See http://opencascade.org. + +For building the IfcPython wrapper, SWIG and Python development are +required. + + To build IfcOpenShell please take the following steps: + $ cd /path/to/IfcOpenShell/cmake + $ mkdir build + $ cd build + Optionally: + $ OCC_INCLUDE_PATH="/path/to/OpenCASCADE/include" + $ OCC_LIBRARY_PATH="/path/to/OpenCASCADE/lib" + $ export OCC_INCLUDE_PATH + $ export OCC_LIBRARY_PATH + $ cmake ../ + $ make + +If all worked out correctly you can now use IfcOpenShell. For example: + $ wget ftp://ftp.dds.no/pub/ifc/Munkerud/Munkerud_hus6_BE.zip + $ unzip Munkerud_hus6_BE.zip + $ ./IfcObj Munkerud_hus6_BE.ifc + $ less Munkerud_hus6_BE.obj diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index ec4524ff28..8d95120577 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -91,13 +91,14 @@ ENDIF(MSVC) INCLUDE_DIRECTORIES(${OCC_INCLUDE_DIR} /usr/inc /usr/local/inc /usr/local/include/oce ${ICU_INCLUDE_DIR}) ADD_LIBRARY(IfcParse STATIC + ../src/ifcparse/Ifc2x3-rt.cpp ../src/ifcparse/Ifc2x3.cpp - ../src/ifcparse/IfcUtil.cpp - ../src/ifcparse/IfcParse.cpp ../src/ifcparse/IfcCharacterDecoder.cpp - - ../src/ifcparse/IfcWrite.cpp ../src/ifcparse/IfcGuidHelper.cpp + ../src/ifcparse/IfcParse.cpp + ../src/ifcparse/IfcUntypedEntity.cpp + ../src/ifcparse/IfcUtil.cpp + ../src/ifcparse/IfcWrite.cpp ) ADD_LIBRARY(IfcGeom STATIC @@ -150,17 +151,20 @@ SET(include_files_geom ../src/ifcgeom/IfcShapeList.h ) SET(include_files_parse + ../src/ifcparse/ArgumentType.h + ../src/ifcparse/Ifc2x3-rt.h ../src/ifcparse/Ifc2x3.h ../src/ifcparse/Ifc2x3enum.h ../src/ifcparse/IfcCharacterDecoder.h ../src/ifcparse/IfcException.h ../src/ifcparse/IfcFile.h ../src/ifcparse/IfcParse.h + ../src/ifcparse/IfcSpfStream.h + ../src/ifcparse/IfcUntypedEntity.h ../src/ifcparse/IfcUtil.h - ../src/ifcparse/SharedPointer.h - ../src/ifcparse/IfcWrite.h - ../src/ifcparse/IfcWritableEntity.h + ../src/ifcparse/IfcWritableEntity.h + ../src/ifcparse/SharedPointer.h ) INSTALL(FILES ${include_files_geom} DESTINATION include/ifcgeom) INSTALL(FILES ${include_files_parse} DESTINATION include/ifcparse) diff --git a/src/ifcexpressparser/IfcExpressParser.py b/src/ifcexpressparser/IfcExpressParser.py index 8d5867b3f4..76902aae7e 100644 --- a/src/ifcexpressparser/IfcExpressParser.py +++ b/src/ifcexpressparser/IfcExpressParser.py @@ -355,6 +355,10 @@ class Classdef: parent_relations[self.class_name] = self.parent_class argument_count[self.class_name] = len(self.arguments) entity_map[self.class_name] = self + def get_attributes(self, get_parent=True): + s = entity_map[self.parent_class].get_attributes() if get_parent and self.parent_class else [] + s += [(a.name,not not a.optional,a.type.type_enum()) for a in self.arguments.l] + return s def get_constructor_args(self): s = entity_map[self.parent_class].get_constructor_args() if self.parent_class else [] i = len(s) + 1 @@ -476,8 +480,10 @@ schema_version = schema_version.capitalize() # Writing of the three generated files starts here # h_file = open("%s.h"%schema_version,'w') +h2_file = open("%s-rt.h"%schema_version,'w') enumh_file = open("%senum.h"%schema_version,'w') cpp_file = open("%s.cpp"%schema_version,'w') +cpp2_file = open("%s-rt.cpp"%schema_version,'w') header += """ @@ -492,19 +498,23 @@ header += """ generator_mode = 'HEADER' print >>h_file, header +print >>h2_file, header print >>enumh_file, header print >>cpp_file, header +print >>cpp2_file, header print >>h_file, """#ifndef %(schema_upper)s_H #define %(schema_upper)s_H #include #include #include +#include #include #include "../ifcparse/IfcUtil.h" #include "../ifcparse/IfcException.h" +#include "../ifcparse/ArgumentType.h" #include "../ifcparse/%(schema)senum.h" using namespace IfcUtil; @@ -540,6 +550,8 @@ all_enumerations = simple_enumerations + entity_enumerations print >>enumh_file, """#ifndef IFC2X3ENUM_H #define IFC2X3ENUM_H +#include "../ifcparse/ArgumentType.h" + namespace Ifc2x3 { namespace Type { @@ -556,6 +568,22 @@ namespace Type { #endif """%{'schema_upper':schema_version.upper(),'schema':schema_version,'enum':", ".join(all_enumerations + ["ALL"])} +print >>h2_file, """#ifndef IFC2X3RT_H +#define IFC2X3RT_H + +#include "../ifcparse/ArgumentType.h" + +namespace Ifc2x3 { +namespace Type { + int GetAttributeCount(Enum t); + int GetAttributeIndex(Enum t, const std::string& a); + IfcUtil::ArgumentType GetAttributeType(Enum t, unsigned char a); + const std::string& GetAttributeName(Enum t, unsigned char a); + bool GetAttributeOptional(Enum t, unsigned char a); +}} + +#endif +""" defined_types = set(express_to_cpp.values()) deferred_types = [] @@ -585,16 +613,31 @@ while True: print >>h_file, c print >>h_file, "void InitStringMap();" +print >>h_file, "void InitAttributeCountMap();" +print >>h_file, "void InitAttributeIndexMap();" +print >>h_file, "void InitAttributeTypeMap();" +print >>h_file, "void InitAttributeNameMap();" +print >>h_file, "void InitAttributeOptionalMap();" print >>h_file, "IfcSchemaEntity SchemaEntity(IfcAbstractEntityPtr e = 0);" print >>h_file, "}\n\n#endif" generator_mode = 'SOURCE' +print >>cpp2_file, """#include "../ifcparse/%(schema)s.h" +#include "../ifcparse/%(schema)s-rt.h" +#include "../ifcparse/IfcException.h" +#include "../ifcparse/IfcWrite.h" +#include "../ifcparse/IfcWritableEntity.h" +#include "../ifcparse/ArgumentType.h" -print >>cpp_file, """#include "%(schema)s.h" -#include "IfcException.h" -#include "IfcWrite.h" -#include "IfcWritableEntity.h" +using namespace %(schema)s; +using namespace IfcParse; +using namespace IfcWrite;"""%{'schema':schema_version} +print >>cpp_file, """#include "../ifcparse/%(schema)s.h" +#include "../ifcparse/IfcException.h" +#include "../ifcparse/IfcWrite.h" +#include "../ifcparse/IfcWritableEntity.h" +#include "../ifcparse/ArgumentType.h" using namespace %(schema)s; using namespace IfcParse; @@ -616,20 +659,37 @@ print >>cpp_file, ' const char* names[] = { "%s" };'%'","'.join(all_enumerati print >>cpp_file, ' return names[v];' print >>cpp_file, "}" print >>cpp_file -#print >>cpp_file, "Type::Enum Type::FromStringOld(const std::string& s){" -#elseif = "if" -#maxlen = max([len(e) for e in all_enumerations]) -#for e in all_enumerations: -# print >>cpp_file, ' %s(s=="%s"%s) { return %s; }'%(elseif,e.upper()," "*(maxlen-len(e)),e) -#print >>cpp_file, " throw;" -#print >>cpp_file, "}" + print >>cpp_file, "std::map string_map;" -print >>cpp_file, "void Ifc2x3::InitStringMap() {" +print >>cpp2_file, "std::map entity_descriptor_map;" maxlen = max([len(e) for e in all_enumerations]) +string_map,attribute_count_map,attribute_index_map,attribute_name_map,attribute_optional_map,attribute_type_map = [""]*6 +print >>cpp2_file, "void InitDescriptorMap() {" +print >>cpp2_file, " IfcEntityDescriptor* current;" +rt_entities = set() +while True: + todo = [e for e in entities if e.class_name not in rt_entities] + if len(todo) == 0: break + for e in todo: + if e.parent_class and e.parent_class not in rt_entities: continue + rt_entities.add(e.class_name) + args = e.get_attributes(False) + parent_descriptor = ("entity_descriptor_map.find(Type::%s)->second"%e.parent_class) if e.parent_class else "0" + print >>cpp2_file, " current = entity_descriptor_map[Type::%s] = new IfcEntityDescriptor(Type::%s,%s);"%(e.class_name,e.class_name,parent_descriptor) + for a,i in zip(args,range(len(args))): + name,optional,type = a + print >>cpp2_file, " current->add(\"%s\",%s,%s);"%(name,"true" if optional else "false",type) + +print >>cpp2_file, "}" + for e in all_enumerations: - print >>cpp_file, ' string_map["%s"%s] = Type::%s;'%(e.upper()," "*(maxlen-len(e)),e) -print >>cpp_file, """} -Type::Enum Type::FromString(const std::string& s) { + string_map += ' string_map["%s"%s] = Type::%s;\n'%(e.upper()," "*(maxlen-len(e)),e) +print >>cpp_file, """void Ifc2x3::InitStringMap() { + %(string_map)s +}"""%locals() + +print >>cpp_file, """Type::Enum Type::FromString(const std::string& s) { + if (string_map.empty()) ::Ifc2x3::InitStringMap(); std::map::const_iterator it = string_map.find(s); if ( it == string_map.end() ) throw IfcException("Unable to find find keyword in schema"); else return it->second; @@ -650,3 +710,40 @@ print >>cpp_file, "}" for t in [T for T in types if isinstance(T.type,EnumType)]: print >>cpp_file, t for e in entities: print >>cpp_file, e, +print >>cpp_file, "" + +print >>cpp2_file, """int Type::GetAttributeIndex(Enum t, const std::string& a) { + if (entity_descriptor_map.empty()) ::InitDescriptorMap(); + std::map::const_iterator i = entity_descriptor_map.find(t); + if ( i == entity_descriptor_map.end() ) throw IfcException("Type not found"); + else return i->second->getArgumentIndex(a); +} + +int Type::GetAttributeCount(Enum t) { + if (entity_descriptor_map.empty()) ::InitDescriptorMap(); + std::map::const_iterator i = entity_descriptor_map.find(t); + if ( i == entity_descriptor_map.end() ) throw IfcException("Type not found"); + else return i->second->getArgumentCount(); +} + +ArgumentType Type::GetAttributeType(Enum t, unsigned char a) { + if (entity_descriptor_map.empty()) ::InitDescriptorMap(); + std::map::const_iterator i = entity_descriptor_map.find(t); + if ( i == entity_descriptor_map.end() ) throw IfcException("Type not found"); + else return i->second->getArgumentType(a); +} + +const std::string& Type::GetAttributeName(Enum t, unsigned char a) { + if (entity_descriptor_map.empty()) ::InitDescriptorMap(); + std::map::const_iterator i = entity_descriptor_map.find(t); + if ( i == entity_descriptor_map.end() ) throw IfcException("Type not found"); + else return i->second->getArgumentName(a); +} + +bool Type::GetAttributeOptional(Enum t, unsigned char a) { + if (entity_descriptor_map.empty()) ::InitDescriptorMap(); + std::map::const_iterator i = entity_descriptor_map.find(t); + if ( i == entity_descriptor_map.end() ) throw IfcException("Type not found"); + else return i->second->getArgumentOptional(a); +} +""" \ No newline at end of file diff --git a/src/ifcgeom/IfcGeom.h b/src/ifcgeom/IfcGeom.h index c750cdd0f2..62aedb173d 100644 --- a/src/ifcgeom/IfcGeom.h +++ b/src/ifcgeom/IfcGeom.h @@ -96,6 +96,7 @@ namespace IfcGeom { double face_area(const TopoDS_Face& f); void SetValue(GeomValue var, double value); double GetValue(GeomValue var); + std::string create_brep_data(Ifc2x3::IfcProduct* s); namespace Cache { void Purge(); diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index d727d02549..d1a62306e6 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -86,6 +86,8 @@ #include +#include + #include "../ifcgeom/IfcGeom.h" bool IfcGeom::create_solid_from_compound(const TopoDS_Shape& compound, TopoDS_Shape& shape) { @@ -489,4 +491,91 @@ double IfcGeom::GetValue(GeomValue var) { } assert(!"never reach here"); return 0; +} + +std::string IfcGeom::create_brep_data(Ifc2x3::IfcProduct* ifc_product) { + if (!ifc_product->hasRepresentation()) return ""; + + Ifc2x3::IfcProductRepresentation* prod_rep = ifc_product->Representation(); + Ifc2x3::IfcRepresentation::list li = prod_rep->Representations(); + Ifc2x3::IfcShapeRepresentation* shape_rep; + for (Ifc2x3::IfcRepresentation::it i = li->begin(); i != li->end(); ++i) { + const std::string representation_identifier = (*i)->RepresentationIdentifier(); + if ((*i)->is(Ifc2x3::Type::IfcShapeRepresentation) && (representation_identifier == "Body" || representation_identifier == "Facetation")) { + shape_rep = (Ifc2x3::IfcShapeRepresentation*) *i; + break; + } + } + + IfcGeom::ShapeList shapes; + if (!IfcGeom::convert_shapes(shape_rep,shapes)) { + return ""; + } + + gp_Trsf trsf; + try { + IfcGeom::convert(ifc_product->ObjectPlacement(),trsf); + } catch (...) {} + + // Does the IfcElement have any IfcOpenings? + // Note that openings for IfcOpeningElements are not processed + Ifc2x3::IfcRelVoidsElement::list openings = Ifc2x3::IfcRelVoidsElement::list(); + if ( ifc_product->is(Ifc2x3::Type::IfcElement) && !ifc_product->is(Ifc2x3::Type::IfcOpeningElement) ) { + Ifc2x3::IfcElement::ptr element = reinterpret_pointer_cast(ifc_product); + openings = element->HasOpenings(); + } + // Is the IfcElement a decomposition of an IfcElement with any IfcOpeningElements? + if ( ifc_product->is(Ifc2x3::Type::IfcBuildingElementPart ) ) { + Ifc2x3::IfcBuildingElementPart::ptr part = reinterpret_pointer_cast(ifc_product); + Ifc2x3::IfcRelDecomposes::list decomposes = part->Decomposes(); + for ( Ifc2x3::IfcRelDecomposes::it it = decomposes->begin(); it != decomposes->end(); ++ it ) { + Ifc2x3::IfcObjectDefinition::ptr obdef = (*it)->RelatingObject(); + if ( obdef->is(Ifc2x3::Type::IfcElement) ) { + Ifc2x3::IfcElement::ptr element = reinterpret_pointer_cast(obdef); + openings->push(element->HasOpenings()); + } + } + } + + if ( openings && openings->Size() ) { + IfcGeom::ShapeList opened_shapes; + try { + IfcGeom::convert_openings(ifc_product,openings,shapes,trsf,opened_shapes); + } catch(...) { + Logger::Message(Logger::LOG_ERROR,"Error processing openings for:",ifc_product->entity); + } + for ( IfcGeom::ShapeList::const_iterator it = opened_shapes.begin(); it != opened_shapes.end(); ++ it ) { + it->first->PreMultiply(trsf); + } + trsf = gp_Trsf(); + for ( IfcGeom::ShapeList::const_iterator it = opened_shapes.begin(); it != opened_shapes.end(); ++ it ) { + delete it->first; + delete it->second; + } + } else { + for ( IfcGeom::ShapeList::const_iterator it = shapes.begin(); it != shapes.end(); ++ it ) { + it->first->PreMultiply(trsf); + } + trsf = gp_Trsf(); + } + + TopoDS_Compound compound; + BRep_Builder builder; + builder.MakeCompound(compound); + for ( IfcGeom::ShapeList::const_iterator it = shapes.begin(); it != shapes.end(); ++ it ) { + const TopoDS_Shape& s = *(*it).second; + const gp_GTrsf& trsf = *(*it).first; + bool trsf_valid = false; + gp_Trsf _trsf; + try { + _trsf = trsf.Trsf(); + trsf_valid = true; + } catch (...) {} + const TopoDS_Shape moved_shape = trsf_valid ? s.Moved(_trsf) : + BRepBuilderAPI_GTransform(s,trsf,true).Shape(); + builder.Add(compound,moved_shape); + } + std::stringstream sstream; + BRepTools::Write(compound,sstream); + return sstream.str(); } \ No newline at end of file diff --git a/src/ifcgeom/IfcGeomObjects.cpp b/src/ifcgeom/IfcGeomObjects.cpp index 855cde8dfc..e3ec4b1cf8 100644 --- a/src/ifcgeom/IfcGeomObjects.cpp +++ b/src/ifcgeom/IfcGeomObjects.cpp @@ -42,6 +42,7 @@ #include #include "../ifcparse/IfcException.h" +#include "../ifcparse/IfcFile.h" #include "../ifcgeom/IfcGeomObjects.h" #include "../ifcgeom/IfcGeom.h" diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index a55b2fbfba..d4302f6e98 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -180,53 +180,73 @@ bool IfcGeom::convert(const Ifc2x3::IfcTrimmedCurve::ptr l, TopoDS_Wire& wire) { IfcUtil::IfcAbstractSelect::list trims2 = l->Trim2(); bool trimmed1 = false; bool trimmed2 = false; - bool sense_agreement = l->SenseAgreement(); - double flt1; - gp_Pnt pnt1; + unsigned sense_agreement = l->SenseAgreement() ? 0 : 1; + double flts[2]; + gp_Pnt pnts[2]; + bool has_flts[2] = {false,false}; + bool has_pnts[2] = {false,false}; BRepBuilderAPI_MakeWire w; for ( IfcUtil::IfcAbstractSelect::it it = trims1->begin(); it != trims1->end(); it ++ ) { const IfcUtil::IfcAbstractSelect::ptr i = *it; - if ( i->is(Ifc2x3::Type::IfcCartesianPoint) && trim_cartesian ) { - IfcGeom::convert(reinterpret_pointer_cast(i), pnt1 ); - trimmed1 = true; - } else if ( i->is(Ifc2x3::Type::IfcParameterValue) && !trim_cartesian ) { + if ( i->is(Ifc2x3::Type::IfcCartesianPoint) ) { + IfcGeom::convert(reinterpret_pointer_cast(i), pnts[sense_agreement] ); + has_pnts[sense_agreement] = true; + } else if ( i->is(Ifc2x3::Type::IfcParameterValue) ) { const double value = *reinterpret_pointer_cast(i)->wrappedValue(); - flt1 = value * parameterFactor; - trimmed1 = true; + flts[sense_agreement] = value * parameterFactor; + has_flts[sense_agreement] = true; } } for ( IfcUtil::IfcAbstractSelect::it it = trims2->begin(); it != trims2->end(); it ++ ) { const IfcUtil::IfcAbstractSelect::ptr i = *it; - if ( i->is(Ifc2x3::Type::IfcCartesianPoint) && trim_cartesian && trimmed1 ) { - gp_Pnt pnt2; - IfcGeom::convert(reinterpret_pointer_cast(i), pnt2 ); - BRepBuilderAPI_MakeEdge e (curve,sense_agreement ? pnt1 : pnt2,sense_agreement ? pnt2 : pnt1); - if ( ! e.IsDone() ) { - BRepBuilderAPI_EdgeError err = e.Error(); - if ( err == BRepBuilderAPI_PointProjectionFailed ) { - w.Add(BRepBuilderAPI_MakeEdge(sense_agreement ? pnt1 : pnt2,sense_agreement ? pnt2 : pnt1)); - Logger::Message(Logger::LOG_WARNING,"Point projection failed for:",l->entity); - } - } else { - w.Add(e.Edge()); - } - trimmed2 = true; - break; - } else if ( i->is(Ifc2x3::Type::IfcParameterValue) && !trim_cartesian && trimmed1 ) { + if ( i->is(Ifc2x3::Type::IfcCartesianPoint) ) { + IfcGeom::convert(reinterpret_pointer_cast(i), pnts[1-sense_agreement] ); + has_pnts[1-sense_agreement] = true; + } else if ( i->is(Ifc2x3::Type::IfcParameterValue) ) { const double value = *reinterpret_pointer_cast(i)->wrappedValue(); - double flt2 = value * parameterFactor; - if ( isConic && ALMOST_THE_SAME(fmod(flt2-flt1,(double)(M_PI*2.0)),0.0f) ) { - w.Add(BRepBuilderAPI_MakeEdge(curve)); - } else { - BRepBuilderAPI_MakeEdge e (curve,sense_agreement ? flt1 : flt2,sense_agreement ? flt2 : flt1); - w.Add(e.Edge()); - } - trimmed2 = true; - break; + flts[1-sense_agreement] = value * parameterFactor; + has_flts[1-sense_agreement] = true; } } - if ( trimmed2 ) wire = w.Wire(); - return trimmed2; + trim_cartesian &= has_pnts[0] && has_pnts[1]; + bool trim_cartesian_failed = !trim_cartesian; + if ( trim_cartesian ) { + if ( pnts[0].Distance(pnts[1]) < GetValue(GV_WIRE_CREATION_TOLERANCE) ) { + Logger::Message(Logger::LOG_WARNING,"Skipping segment with length below tolerance level:",l->entity); + return false; + } + ShapeFix_ShapeTolerance FTol; + TopoDS_Vertex v1 = BRepBuilderAPI_MakeVertex(pnts[0]); + TopoDS_Vertex v2 = BRepBuilderAPI_MakeVertex(pnts[1]); + FTol.SetTolerance(v1, GetValue(GV_WIRE_CREATION_TOLERANCE), TopAbs_VERTEX); + FTol.SetTolerance(v2, GetValue(GV_WIRE_CREATION_TOLERANCE), TopAbs_VERTEX); + BRepBuilderAPI_MakeEdge e (curve,v1,v2); + if ( ! e.IsDone() ) { + BRepBuilderAPI_EdgeError err = e.Error(); + if ( err == BRepBuilderAPI_PointProjectionFailed ) { + Logger::Message(Logger::LOG_WARNING,"Point projection failed for:",l->entity); + trim_cartesian_failed = true; + } + } else { + w.Add(e.Edge()); + } + } + if ( (!trim_cartesian || trim_cartesian_failed) && (has_flts[0] && has_flts[1]) ) { + if ( isConic && ALMOST_THE_SAME(fmod(flts[1]-flts[0],(double)(M_PI*2.0)),0.0f) ) { + w.Add(BRepBuilderAPI_MakeEdge(curve)); + } else { + BRepBuilderAPI_MakeEdge e (curve,flts[0],flts[1]); + w.Add(e.Edge()); + } + } else if ( trim_cartesian_failed && (has_pnts[0] && has_pnts[1]) ) { + w.Add(BRepBuilderAPI_MakeEdge(pnts[0],pnts[1])); + } + if ( w.IsDone() ) { + wire = w.Wire(); + return true; + } else { + return false; + } } bool IfcGeom::convert(const Ifc2x3::IfcPolyline::ptr l, TopoDS_Wire& result) { Ifc2x3::IfcCartesianPoint::list points = l->Points(); diff --git a/src/ifcparse/ArgumentType.h b/src/ifcparse/ArgumentType.h new file mode 100644 index 0000000000..71c44f0bf2 --- /dev/null +++ b/src/ifcparse/ArgumentType.h @@ -0,0 +1,10 @@ +#ifndef ARGUMENTTYPE_H +#define ARGUMENTTYPE_H + +namespace IfcUtil { + enum ArgumentType { + Argument_INT, Argument_BOOL, Argument_DOUBLE, Argument_STRING, Argument_VECTOR_INT, Argument_VECTOR_DOUBLE, Argument_VECTOR_STRING, Argument_ENTITY, Argument_ENTITY_LIST, Argument_ENUMERATION, Argument_UNKNOWN + }; +} + +#endif \ No newline at end of file diff --git a/src/ifcparse/Ifc2x3-rt.cpp b/src/ifcparse/Ifc2x3-rt.cpp new file mode 100644 index 0000000000..134a974b0c --- /dev/null +++ b/src/ifcparse/Ifc2x3-rt.cpp @@ -0,0 +1,2055 @@ +/******************************************************************************** + * * + * This file is part of IfcOpenShell. * + * * + * IfcOpenShell is free software: you can redistribute it and/or modify * + * it under the terms of the Lesser GNU General Public License as published by * + * the Free Software Foundation, either version 3.0 of the License, or * + * (at your option) any later version. * + * * + * IfcOpenShell is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * Lesser GNU General Public License for more details. * + * * + * You should have received a copy of the Lesser GNU General Public License * + * along with this program. If not, see . * + * * + ********************************************************************************/ + +/******************************************************************************** + * * + * This file has been generated from IFC2X3_TC1.exp. Do not make modifications * + * but instead modify the python script that has been used to generate this. * + * * + ********************************************************************************/ + +#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/Ifc2x3-rt.h" +#include "../ifcparse/IfcException.h" +#include "../ifcparse/IfcWrite.h" +#include "../ifcparse/IfcWritableEntity.h" +#include "../ifcparse/ArgumentType.h" + +using namespace Ifc2x3; +using namespace IfcParse; +using namespace IfcWrite; +std::map attribute_count_map; +typedef std::pair EntityNamedAttribute; +typedef std::pair EntityAttribute; +std::map attribute_map; +std::map attribute_type_map; +std::map attribute_name_map; +std::set attribute_optional_map; +std::map entity_descriptor_map; +void InitDescriptorMap() { + IfcEntityDescriptor* current; + current = entity_descriptor_map[Type::IfcActorRole] = new IfcEntityDescriptor(Type::IfcActorRole,0); + current->add("Role",false,Argument_ENUMERATION); + current->add("UserDefinedRole",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcAddress] = new IfcEntityDescriptor(Type::IfcAddress,0); + current->add("Purpose",true,Argument_ENUMERATION); + current->add("Description",true,Argument_STRING); + current->add("UserDefinedPurpose",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcApplication] = new IfcEntityDescriptor(Type::IfcApplication,0); + current->add("ApplicationDeveloper",false,Argument_ENTITY); + current->add("Version",false,Argument_STRING); + current->add("ApplicationFullName",false,Argument_STRING); + current->add("ApplicationIdentifier",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcAppliedValue] = new IfcEntityDescriptor(Type::IfcAppliedValue,0); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("AppliedValue",true,Argument_ENTITY); + current->add("UnitBasis",true,Argument_ENTITY); + current->add("ApplicableDate",true,Argument_ENTITY); + current->add("FixedUntilDate",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcAppliedValueRelationship] = new IfcEntityDescriptor(Type::IfcAppliedValueRelationship,0); + current->add("ComponentOfTotal",false,Argument_ENTITY); + current->add("Components",false,Argument_ENTITY_LIST); + current->add("ArithmeticOperator",false,Argument_ENUMERATION); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcApproval] = new IfcEntityDescriptor(Type::IfcApproval,0); + current->add("Description",true,Argument_STRING); + current->add("ApprovalDateTime",false,Argument_ENTITY); + current->add("ApprovalStatus",true,Argument_STRING); + current->add("ApprovalLevel",true,Argument_STRING); + current->add("ApprovalQualifier",true,Argument_STRING); + current->add("Name",false,Argument_STRING); + current->add("Identifier",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcApprovalActorRelationship] = new IfcEntityDescriptor(Type::IfcApprovalActorRelationship,0); + current->add("Actor",false,Argument_ENTITY); + current->add("Approval",false,Argument_ENTITY); + current->add("Role",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcApprovalPropertyRelationship] = new IfcEntityDescriptor(Type::IfcApprovalPropertyRelationship,0); + current->add("ApprovedProperties",false,Argument_ENTITY_LIST); + current->add("Approval",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcApprovalRelationship] = new IfcEntityDescriptor(Type::IfcApprovalRelationship,0); + current->add("RelatedApproval",false,Argument_ENTITY); + current->add("RelatingApproval",false,Argument_ENTITY); + current->add("Description",true,Argument_STRING); + current->add("Name",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcBoundaryCondition] = new IfcEntityDescriptor(Type::IfcBoundaryCondition,0); + current->add("Name",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcBoundaryEdgeCondition] = new IfcEntityDescriptor(Type::IfcBoundaryEdgeCondition,entity_descriptor_map.find(Type::IfcBoundaryCondition)->second); + current->add("LinearStiffnessByLengthX",true,Argument_DOUBLE); + current->add("LinearStiffnessByLengthY",true,Argument_DOUBLE); + current->add("LinearStiffnessByLengthZ",true,Argument_DOUBLE); + current->add("RotationalStiffnessByLengthX",true,Argument_DOUBLE); + current->add("RotationalStiffnessByLengthY",true,Argument_DOUBLE); + current->add("RotationalStiffnessByLengthZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcBoundaryFaceCondition] = new IfcEntityDescriptor(Type::IfcBoundaryFaceCondition,entity_descriptor_map.find(Type::IfcBoundaryCondition)->second); + current->add("LinearStiffnessByAreaX",true,Argument_DOUBLE); + current->add("LinearStiffnessByAreaY",true,Argument_DOUBLE); + current->add("LinearStiffnessByAreaZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcBoundaryNodeCondition] = new IfcEntityDescriptor(Type::IfcBoundaryNodeCondition,entity_descriptor_map.find(Type::IfcBoundaryCondition)->second); + current->add("LinearStiffnessX",true,Argument_DOUBLE); + current->add("LinearStiffnessY",true,Argument_DOUBLE); + current->add("LinearStiffnessZ",true,Argument_DOUBLE); + current->add("RotationalStiffnessX",true,Argument_DOUBLE); + current->add("RotationalStiffnessY",true,Argument_DOUBLE); + current->add("RotationalStiffnessZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcBoundaryNodeConditionWarping] = new IfcEntityDescriptor(Type::IfcBoundaryNodeConditionWarping,entity_descriptor_map.find(Type::IfcBoundaryNodeCondition)->second); + current->add("WarpingStiffness",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcCalendarDate] = new IfcEntityDescriptor(Type::IfcCalendarDate,0); + current->add("DayComponent",false,Argument_INT); + current->add("MonthComponent",false,Argument_INT); + current->add("YearComponent",false,Argument_INT); + current = entity_descriptor_map[Type::IfcClassification] = new IfcEntityDescriptor(Type::IfcClassification,0); + current->add("Source",false,Argument_STRING); + current->add("Edition",false,Argument_STRING); + current->add("EditionDate",true,Argument_ENTITY); + current->add("Name",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcClassificationItem] = new IfcEntityDescriptor(Type::IfcClassificationItem,0); + current->add("Notation",false,Argument_ENTITY); + current->add("ItemOf",true,Argument_ENTITY); + current->add("Title",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcClassificationItemRelationship] = new IfcEntityDescriptor(Type::IfcClassificationItemRelationship,0); + current->add("RelatingItem",false,Argument_ENTITY); + current->add("RelatedItems",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcClassificationNotation] = new IfcEntityDescriptor(Type::IfcClassificationNotation,0); + current->add("NotationFacets",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcClassificationNotationFacet] = new IfcEntityDescriptor(Type::IfcClassificationNotationFacet,0); + current->add("NotationValue",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcColourSpecification] = new IfcEntityDescriptor(Type::IfcColourSpecification,0); + current->add("Name",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcConnectionGeometry] = new IfcEntityDescriptor(Type::IfcConnectionGeometry,0); + current = entity_descriptor_map[Type::IfcConnectionPointGeometry] = new IfcEntityDescriptor(Type::IfcConnectionPointGeometry,entity_descriptor_map.find(Type::IfcConnectionGeometry)->second); + current->add("PointOnRelatingElement",false,Argument_ENTITY); + current->add("PointOnRelatedElement",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcConnectionPortGeometry] = new IfcEntityDescriptor(Type::IfcConnectionPortGeometry,entity_descriptor_map.find(Type::IfcConnectionGeometry)->second); + current->add("LocationAtRelatingElement",false,Argument_ENTITY); + current->add("LocationAtRelatedElement",true,Argument_ENTITY); + current->add("ProfileOfPort",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcConnectionSurfaceGeometry] = new IfcEntityDescriptor(Type::IfcConnectionSurfaceGeometry,entity_descriptor_map.find(Type::IfcConnectionGeometry)->second); + current->add("SurfaceOnRelatingElement",false,Argument_ENTITY); + current->add("SurfaceOnRelatedElement",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcConstraint] = new IfcEntityDescriptor(Type::IfcConstraint,0); + current->add("Name",false,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("ConstraintGrade",false,Argument_ENUMERATION); + current->add("ConstraintSource",true,Argument_STRING); + current->add("CreatingActor",true,Argument_ENTITY); + current->add("CreationTime",true,Argument_ENTITY); + current->add("UserDefinedGrade",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcConstraintAggregationRelationship] = new IfcEntityDescriptor(Type::IfcConstraintAggregationRelationship,0); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("RelatingConstraint",false,Argument_ENTITY); + current->add("RelatedConstraints",false,Argument_ENTITY_LIST); + current->add("LogicalAggregator",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcConstraintClassificationRelationship] = new IfcEntityDescriptor(Type::IfcConstraintClassificationRelationship,0); + current->add("ClassifiedConstraint",false,Argument_ENTITY); + current->add("RelatedClassifications",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcConstraintRelationship] = new IfcEntityDescriptor(Type::IfcConstraintRelationship,0); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("RelatingConstraint",false,Argument_ENTITY); + current->add("RelatedConstraints",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcCoordinatedUniversalTimeOffset] = new IfcEntityDescriptor(Type::IfcCoordinatedUniversalTimeOffset,0); + current->add("HourOffset",false,Argument_INT); + current->add("MinuteOffset",true,Argument_INT); + current->add("Sense",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCostValue] = new IfcEntityDescriptor(Type::IfcCostValue,entity_descriptor_map.find(Type::IfcAppliedValue)->second); + current->add("CostType",false,Argument_STRING); + current->add("Condition",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcCurrencyRelationship] = new IfcEntityDescriptor(Type::IfcCurrencyRelationship,0); + current->add("RelatingMonetaryUnit",false,Argument_ENTITY); + current->add("RelatedMonetaryUnit",false,Argument_ENTITY); + current->add("ExchangeRate",false,Argument_DOUBLE); + current->add("RateDateTime",false,Argument_ENTITY); + current->add("RateSource",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcCurveStyleFont] = new IfcEntityDescriptor(Type::IfcCurveStyleFont,0); + current->add("Name",true,Argument_STRING); + current->add("PatternList",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcCurveStyleFontAndScaling] = new IfcEntityDescriptor(Type::IfcCurveStyleFontAndScaling,0); + current->add("Name",true,Argument_STRING); + current->add("CurveFont",false,Argument_ENTITY); + current->add("CurveFontScaling",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcCurveStyleFontPattern] = new IfcEntityDescriptor(Type::IfcCurveStyleFontPattern,0); + current->add("VisibleSegmentLength",false,Argument_DOUBLE); + current->add("InvisibleSegmentLength",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcDateAndTime] = new IfcEntityDescriptor(Type::IfcDateAndTime,0); + current->add("DateComponent",false,Argument_ENTITY); + current->add("TimeComponent",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcDerivedUnit] = new IfcEntityDescriptor(Type::IfcDerivedUnit,0); + current->add("Elements",false,Argument_ENTITY_LIST); + current->add("UnitType",false,Argument_ENUMERATION); + current->add("UserDefinedType",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcDerivedUnitElement] = new IfcEntityDescriptor(Type::IfcDerivedUnitElement,0); + current->add("Unit",false,Argument_ENTITY); + current->add("Exponent",false,Argument_INT); + current = entity_descriptor_map[Type::IfcDimensionalExponents] = new IfcEntityDescriptor(Type::IfcDimensionalExponents,0); + current->add("LengthExponent",false,Argument_INT); + current->add("MassExponent",false,Argument_INT); + current->add("TimeExponent",false,Argument_INT); + current->add("ElectricCurrentExponent",false,Argument_INT); + current->add("ThermodynamicTemperatureExponent",false,Argument_INT); + current->add("AmountOfSubstanceExponent",false,Argument_INT); + current->add("LuminousIntensityExponent",false,Argument_INT); + current = entity_descriptor_map[Type::IfcDocumentElectronicFormat] = new IfcEntityDescriptor(Type::IfcDocumentElectronicFormat,0); + current->add("FileExtension",true,Argument_STRING); + current->add("MimeContentType",true,Argument_STRING); + current->add("MimeSubtype",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcDocumentInformation] = new IfcEntityDescriptor(Type::IfcDocumentInformation,0); + current->add("DocumentId",false,Argument_STRING); + current->add("Name",false,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("DocumentReferences",true,Argument_ENTITY_LIST); + current->add("Purpose",true,Argument_STRING); + current->add("IntendedUse",true,Argument_STRING); + current->add("Scope",true,Argument_STRING); + current->add("Revision",true,Argument_STRING); + current->add("DocumentOwner",true,Argument_ENTITY); + current->add("Editors",true,Argument_ENTITY_LIST); + current->add("CreationTime",true,Argument_ENTITY); + current->add("LastRevisionTime",true,Argument_ENTITY); + current->add("ElectronicFormat",true,Argument_ENTITY); + current->add("ValidFrom",true,Argument_ENTITY); + current->add("ValidUntil",true,Argument_ENTITY); + current->add("Confidentiality",true,Argument_ENUMERATION); + current->add("Status",true,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcDocumentInformationRelationship] = new IfcEntityDescriptor(Type::IfcDocumentInformationRelationship,0); + current->add("RelatingDocument",false,Argument_ENTITY); + current->add("RelatedDocuments",false,Argument_ENTITY_LIST); + current->add("RelationshipType",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcDraughtingCalloutRelationship] = new IfcEntityDescriptor(Type::IfcDraughtingCalloutRelationship,0); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("RelatingDraughtingCallout",false,Argument_ENTITY); + current->add("RelatedDraughtingCallout",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcEnvironmentalImpactValue] = new IfcEntityDescriptor(Type::IfcEnvironmentalImpactValue,entity_descriptor_map.find(Type::IfcAppliedValue)->second); + current->add("ImpactType",false,Argument_STRING); + current->add("Category",false,Argument_ENUMERATION); + current->add("UserDefinedCategory",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcExternalReference] = new IfcEntityDescriptor(Type::IfcExternalReference,0); + current->add("Location",true,Argument_STRING); + current->add("ItemReference",true,Argument_STRING); + current->add("Name",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcExternallyDefinedHatchStyle] = new IfcEntityDescriptor(Type::IfcExternallyDefinedHatchStyle,entity_descriptor_map.find(Type::IfcExternalReference)->second); + current = entity_descriptor_map[Type::IfcExternallyDefinedSurfaceStyle] = new IfcEntityDescriptor(Type::IfcExternallyDefinedSurfaceStyle,entity_descriptor_map.find(Type::IfcExternalReference)->second); + current = entity_descriptor_map[Type::IfcExternallyDefinedSymbol] = new IfcEntityDescriptor(Type::IfcExternallyDefinedSymbol,entity_descriptor_map.find(Type::IfcExternalReference)->second); + current = entity_descriptor_map[Type::IfcExternallyDefinedTextFont] = new IfcEntityDescriptor(Type::IfcExternallyDefinedTextFont,entity_descriptor_map.find(Type::IfcExternalReference)->second); + current = entity_descriptor_map[Type::IfcGridAxis] = new IfcEntityDescriptor(Type::IfcGridAxis,0); + current->add("AxisTag",true,Argument_STRING); + current->add("AxisCurve",false,Argument_ENTITY); + current->add("SameSense",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcIrregularTimeSeriesValue] = new IfcEntityDescriptor(Type::IfcIrregularTimeSeriesValue,0); + current->add("TimeStamp",false,Argument_ENTITY); + current->add("ListValues",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcLibraryInformation] = new IfcEntityDescriptor(Type::IfcLibraryInformation,0); + current->add("Name",false,Argument_STRING); + current->add("Version",true,Argument_STRING); + current->add("Publisher",true,Argument_ENTITY); + current->add("VersionDate",true,Argument_ENTITY); + current->add("LibraryReference",true,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcLibraryReference] = new IfcEntityDescriptor(Type::IfcLibraryReference,entity_descriptor_map.find(Type::IfcExternalReference)->second); + current = entity_descriptor_map[Type::IfcLightDistributionData] = new IfcEntityDescriptor(Type::IfcLightDistributionData,0); + current->add("MainPlaneAngle",false,Argument_DOUBLE); + current->add("SecondaryPlaneAngle",false,Argument_VECTOR_DOUBLE); + current->add("LuminousIntensity",false,Argument_VECTOR_DOUBLE); + current = entity_descriptor_map[Type::IfcLightIntensityDistribution] = new IfcEntityDescriptor(Type::IfcLightIntensityDistribution,0); + current->add("LightDistributionCurve",false,Argument_ENUMERATION); + current->add("DistributionData",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcLocalTime] = new IfcEntityDescriptor(Type::IfcLocalTime,0); + current->add("HourComponent",false,Argument_INT); + current->add("MinuteComponent",true,Argument_INT); + current->add("SecondComponent",true,Argument_DOUBLE); + current->add("Zone",true,Argument_ENTITY); + current->add("DaylightSavingOffset",true,Argument_INT); + current = entity_descriptor_map[Type::IfcMaterial] = new IfcEntityDescriptor(Type::IfcMaterial,0); + current->add("Name",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcMaterialClassificationRelationship] = new IfcEntityDescriptor(Type::IfcMaterialClassificationRelationship,0); + current->add("MaterialClassifications",false,Argument_ENTITY_LIST); + current->add("ClassifiedMaterial",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcMaterialLayer] = new IfcEntityDescriptor(Type::IfcMaterialLayer,0); + current->add("Material",true,Argument_ENTITY); + current->add("LayerThickness",false,Argument_DOUBLE); + current->add("IsVentilated",true,Argument_BOOL); + current = entity_descriptor_map[Type::IfcMaterialLayerSet] = new IfcEntityDescriptor(Type::IfcMaterialLayerSet,0); + current->add("MaterialLayers",false,Argument_ENTITY_LIST); + current->add("LayerSetName",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcMaterialLayerSetUsage] = new IfcEntityDescriptor(Type::IfcMaterialLayerSetUsage,0); + current->add("ForLayerSet",false,Argument_ENTITY); + current->add("LayerSetDirection",false,Argument_ENUMERATION); + current->add("DirectionSense",false,Argument_ENUMERATION); + current->add("OffsetFromReferenceLine",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcMaterialList] = new IfcEntityDescriptor(Type::IfcMaterialList,0); + current->add("Materials",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcMaterialProperties] = new IfcEntityDescriptor(Type::IfcMaterialProperties,0); + current->add("Material",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcMeasureWithUnit] = new IfcEntityDescriptor(Type::IfcMeasureWithUnit,0); + current->add("ValueComponent",false,Argument_ENTITY); + current->add("UnitComponent",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcMechanicalMaterialProperties] = new IfcEntityDescriptor(Type::IfcMechanicalMaterialProperties,entity_descriptor_map.find(Type::IfcMaterialProperties)->second); + current->add("DynamicViscosity",true,Argument_DOUBLE); + current->add("YoungModulus",true,Argument_DOUBLE); + current->add("ShearModulus",true,Argument_DOUBLE); + current->add("PoissonRatio",true,Argument_DOUBLE); + current->add("ThermalExpansionCoefficient",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcMechanicalSteelMaterialProperties] = new IfcEntityDescriptor(Type::IfcMechanicalSteelMaterialProperties,entity_descriptor_map.find(Type::IfcMechanicalMaterialProperties)->second); + current->add("YieldStress",true,Argument_DOUBLE); + current->add("UltimateStress",true,Argument_DOUBLE); + current->add("UltimateStrain",true,Argument_DOUBLE); + current->add("HardeningModule",true,Argument_DOUBLE); + current->add("ProportionalStress",true,Argument_DOUBLE); + current->add("PlasticStrain",true,Argument_DOUBLE); + current->add("Relaxations",true,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcMetric] = new IfcEntityDescriptor(Type::IfcMetric,entity_descriptor_map.find(Type::IfcConstraint)->second); + current->add("Benchmark",false,Argument_ENUMERATION); + current->add("ValueSource",true,Argument_STRING); + current->add("DataValue",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcMonetaryUnit] = new IfcEntityDescriptor(Type::IfcMonetaryUnit,0); + current->add("Currency",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcNamedUnit] = new IfcEntityDescriptor(Type::IfcNamedUnit,0); + current->add("Dimensions",false,Argument_ENTITY); + current->add("UnitType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcObjectPlacement] = new IfcEntityDescriptor(Type::IfcObjectPlacement,0); + current = entity_descriptor_map[Type::IfcObjective] = new IfcEntityDescriptor(Type::IfcObjective,entity_descriptor_map.find(Type::IfcConstraint)->second); + current->add("BenchmarkValues",true,Argument_ENTITY); + current->add("ResultValues",true,Argument_ENTITY); + current->add("ObjectiveQualifier",false,Argument_ENUMERATION); + current->add("UserDefinedQualifier",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcOpticalMaterialProperties] = new IfcEntityDescriptor(Type::IfcOpticalMaterialProperties,entity_descriptor_map.find(Type::IfcMaterialProperties)->second); + current->add("VisibleTransmittance",true,Argument_DOUBLE); + current->add("SolarTransmittance",true,Argument_DOUBLE); + current->add("ThermalIrTransmittance",true,Argument_DOUBLE); + current->add("ThermalIrEmissivityBack",true,Argument_DOUBLE); + current->add("ThermalIrEmissivityFront",true,Argument_DOUBLE); + current->add("VisibleReflectanceBack",true,Argument_DOUBLE); + current->add("VisibleReflectanceFront",true,Argument_DOUBLE); + current->add("SolarReflectanceFront",true,Argument_DOUBLE); + current->add("SolarReflectanceBack",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcOrganization] = new IfcEntityDescriptor(Type::IfcOrganization,0); + current->add("Id",true,Argument_STRING); + current->add("Name",false,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("Roles",true,Argument_ENTITY_LIST); + current->add("Addresses",true,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcOrganizationRelationship] = new IfcEntityDescriptor(Type::IfcOrganizationRelationship,0); + current->add("Name",false,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("RelatingOrganization",false,Argument_ENTITY); + current->add("RelatedOrganizations",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcOwnerHistory] = new IfcEntityDescriptor(Type::IfcOwnerHistory,0); + current->add("OwningUser",false,Argument_ENTITY); + current->add("OwningApplication",false,Argument_ENTITY); + current->add("State",true,Argument_ENUMERATION); + current->add("ChangeAction",false,Argument_ENUMERATION); + current->add("LastModifiedDate",true,Argument_INT); + current->add("LastModifyingUser",true,Argument_ENTITY); + current->add("LastModifyingApplication",true,Argument_ENTITY); + current->add("CreationDate",false,Argument_INT); + current = entity_descriptor_map[Type::IfcPerson] = new IfcEntityDescriptor(Type::IfcPerson,0); + current->add("Id",true,Argument_STRING); + current->add("FamilyName",true,Argument_STRING); + current->add("GivenName",true,Argument_STRING); + current->add("MiddleNames",true,Argument_VECTOR_STRING); + current->add("PrefixTitles",true,Argument_VECTOR_STRING); + current->add("SuffixTitles",true,Argument_VECTOR_STRING); + current->add("Roles",true,Argument_ENTITY_LIST); + current->add("Addresses",true,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcPersonAndOrganization] = new IfcEntityDescriptor(Type::IfcPersonAndOrganization,0); + current->add("ThePerson",false,Argument_ENTITY); + current->add("TheOrganization",false,Argument_ENTITY); + current->add("Roles",true,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcPhysicalQuantity] = new IfcEntityDescriptor(Type::IfcPhysicalQuantity,0); + current->add("Name",false,Argument_STRING); + current->add("Description",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcPhysicalSimpleQuantity] = new IfcEntityDescriptor(Type::IfcPhysicalSimpleQuantity,entity_descriptor_map.find(Type::IfcPhysicalQuantity)->second); + current->add("Unit",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPostalAddress] = new IfcEntityDescriptor(Type::IfcPostalAddress,entity_descriptor_map.find(Type::IfcAddress)->second); + current->add("InternalLocation",true,Argument_STRING); + current->add("AddressLines",true,Argument_VECTOR_STRING); + current->add("PostalBox",true,Argument_STRING); + current->add("Town",true,Argument_STRING); + current->add("Region",true,Argument_STRING); + current->add("PostalCode",true,Argument_STRING); + current->add("Country",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcPreDefinedItem] = new IfcEntityDescriptor(Type::IfcPreDefinedItem,0); + current->add("Name",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcPreDefinedSymbol] = new IfcEntityDescriptor(Type::IfcPreDefinedSymbol,entity_descriptor_map.find(Type::IfcPreDefinedItem)->second); + current = entity_descriptor_map[Type::IfcPreDefinedTerminatorSymbol] = new IfcEntityDescriptor(Type::IfcPreDefinedTerminatorSymbol,entity_descriptor_map.find(Type::IfcPreDefinedSymbol)->second); + current = entity_descriptor_map[Type::IfcPreDefinedTextFont] = new IfcEntityDescriptor(Type::IfcPreDefinedTextFont,entity_descriptor_map.find(Type::IfcPreDefinedItem)->second); + current = entity_descriptor_map[Type::IfcPresentationLayerAssignment] = new IfcEntityDescriptor(Type::IfcPresentationLayerAssignment,0); + current->add("Name",false,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("AssignedItems",false,Argument_ENTITY_LIST); + current->add("Identifier",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcPresentationLayerWithStyle] = new IfcEntityDescriptor(Type::IfcPresentationLayerWithStyle,entity_descriptor_map.find(Type::IfcPresentationLayerAssignment)->second); + current->add("LayerOn",false,Argument_BOOL); + current->add("LayerFrozen",false,Argument_BOOL); + current->add("LayerBlocked",false,Argument_BOOL); + current->add("LayerStyles",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcPresentationStyle] = new IfcEntityDescriptor(Type::IfcPresentationStyle,0); + current->add("Name",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcPresentationStyleAssignment] = new IfcEntityDescriptor(Type::IfcPresentationStyleAssignment,0); + current->add("Styles",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcProductRepresentation] = new IfcEntityDescriptor(Type::IfcProductRepresentation,0); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("Representations",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcProductsOfCombustionProperties] = new IfcEntityDescriptor(Type::IfcProductsOfCombustionProperties,entity_descriptor_map.find(Type::IfcMaterialProperties)->second); + current->add("SpecificHeatCapacity",true,Argument_DOUBLE); + current->add("N20Content",true,Argument_DOUBLE); + current->add("COContent",true,Argument_DOUBLE); + current->add("CO2Content",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcProfileDef] = new IfcEntityDescriptor(Type::IfcProfileDef,0); + current->add("ProfileType",false,Argument_ENUMERATION); + current->add("ProfileName",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcProfileProperties] = new IfcEntityDescriptor(Type::IfcProfileProperties,0); + current->add("ProfileName",true,Argument_STRING); + current->add("ProfileDefinition",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcProperty] = new IfcEntityDescriptor(Type::IfcProperty,0); + current->add("Name",false,Argument_STRING); + current->add("Description",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcPropertyConstraintRelationship] = new IfcEntityDescriptor(Type::IfcPropertyConstraintRelationship,0); + current->add("RelatingConstraint",false,Argument_ENTITY); + current->add("RelatedProperties",false,Argument_ENTITY_LIST); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcPropertyDependencyRelationship] = new IfcEntityDescriptor(Type::IfcPropertyDependencyRelationship,0); + current->add("DependingProperty",false,Argument_ENTITY); + current->add("DependantProperty",false,Argument_ENTITY); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("Expression",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcPropertyEnumeration] = new IfcEntityDescriptor(Type::IfcPropertyEnumeration,0); + current->add("Name",false,Argument_STRING); + current->add("EnumerationValues",false,Argument_ENTITY_LIST); + current->add("Unit",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcQuantityArea] = new IfcEntityDescriptor(Type::IfcQuantityArea,entity_descriptor_map.find(Type::IfcPhysicalSimpleQuantity)->second); + current->add("AreaValue",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcQuantityCount] = new IfcEntityDescriptor(Type::IfcQuantityCount,entity_descriptor_map.find(Type::IfcPhysicalSimpleQuantity)->second); + current->add("CountValue",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcQuantityLength] = new IfcEntityDescriptor(Type::IfcQuantityLength,entity_descriptor_map.find(Type::IfcPhysicalSimpleQuantity)->second); + current->add("LengthValue",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcQuantityTime] = new IfcEntityDescriptor(Type::IfcQuantityTime,entity_descriptor_map.find(Type::IfcPhysicalSimpleQuantity)->second); + current->add("TimeValue",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcQuantityVolume] = new IfcEntityDescriptor(Type::IfcQuantityVolume,entity_descriptor_map.find(Type::IfcPhysicalSimpleQuantity)->second); + current->add("VolumeValue",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcQuantityWeight] = new IfcEntityDescriptor(Type::IfcQuantityWeight,entity_descriptor_map.find(Type::IfcPhysicalSimpleQuantity)->second); + current->add("WeightValue",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcReferencesValueDocument] = new IfcEntityDescriptor(Type::IfcReferencesValueDocument,0); + current->add("ReferencedDocument",false,Argument_ENTITY); + current->add("ReferencingValues",false,Argument_ENTITY_LIST); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcReinforcementBarProperties] = new IfcEntityDescriptor(Type::IfcReinforcementBarProperties,0); + current->add("TotalCrossSectionArea",false,Argument_DOUBLE); + current->add("SteelGrade",false,Argument_STRING); + current->add("BarSurface",true,Argument_ENUMERATION); + current->add("EffectiveDepth",true,Argument_DOUBLE); + current->add("NominalBarDiameter",true,Argument_DOUBLE); + current->add("BarCount",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcRelaxation] = new IfcEntityDescriptor(Type::IfcRelaxation,0); + current->add("RelaxationValue",false,Argument_DOUBLE); + current->add("InitialStress",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcRepresentation] = new IfcEntityDescriptor(Type::IfcRepresentation,0); + current->add("ContextOfItems",false,Argument_ENTITY); + current->add("RepresentationIdentifier",true,Argument_STRING); + current->add("RepresentationType",true,Argument_STRING); + current->add("Items",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcRepresentationContext] = new IfcEntityDescriptor(Type::IfcRepresentationContext,0); + current->add("ContextIdentifier",true,Argument_STRING); + current->add("ContextType",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcRepresentationItem] = new IfcEntityDescriptor(Type::IfcRepresentationItem,0); + current = entity_descriptor_map[Type::IfcRepresentationMap] = new IfcEntityDescriptor(Type::IfcRepresentationMap,0); + current->add("MappingOrigin",false,Argument_ENTITY); + current->add("MappedRepresentation",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRibPlateProfileProperties] = new IfcEntityDescriptor(Type::IfcRibPlateProfileProperties,entity_descriptor_map.find(Type::IfcProfileProperties)->second); + current->add("Thickness",true,Argument_DOUBLE); + current->add("RibHeight",true,Argument_DOUBLE); + current->add("RibWidth",true,Argument_DOUBLE); + current->add("RibSpacing",true,Argument_DOUBLE); + current->add("Direction",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRoot] = new IfcEntityDescriptor(Type::IfcRoot,0); + current->add("GlobalId",false,Argument_STRING); + current->add("OwnerHistory",false,Argument_ENTITY); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcSIUnit] = new IfcEntityDescriptor(Type::IfcSIUnit,entity_descriptor_map.find(Type::IfcNamedUnit)->second); + current->add("Prefix",true,Argument_ENUMERATION); + current->add("Name",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcSectionProperties] = new IfcEntityDescriptor(Type::IfcSectionProperties,0); + current->add("SectionType",false,Argument_ENUMERATION); + current->add("StartProfile",false,Argument_ENTITY); + current->add("EndProfile",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSectionReinforcementProperties] = new IfcEntityDescriptor(Type::IfcSectionReinforcementProperties,0); + current->add("LongitudinalStartPosition",false,Argument_DOUBLE); + current->add("LongitudinalEndPosition",false,Argument_DOUBLE); + current->add("TransversePosition",true,Argument_DOUBLE); + current->add("ReinforcementRole",false,Argument_ENUMERATION); + current->add("SectionDefinition",false,Argument_ENTITY); + current->add("CrossSectionReinforcementDefinitions",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcShapeAspect] = new IfcEntityDescriptor(Type::IfcShapeAspect,0); + current->add("ShapeRepresentations",false,Argument_ENTITY_LIST); + current->add("Name",true,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("ProductDefinitional",false,Argument_BOOL); + current->add("PartOfProductDefinitionShape",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcShapeModel] = new IfcEntityDescriptor(Type::IfcShapeModel,entity_descriptor_map.find(Type::IfcRepresentation)->second); + current = entity_descriptor_map[Type::IfcShapeRepresentation] = new IfcEntityDescriptor(Type::IfcShapeRepresentation,entity_descriptor_map.find(Type::IfcShapeModel)->second); + current = entity_descriptor_map[Type::IfcSimpleProperty] = new IfcEntityDescriptor(Type::IfcSimpleProperty,entity_descriptor_map.find(Type::IfcProperty)->second); + current = entity_descriptor_map[Type::IfcStructuralConnectionCondition] = new IfcEntityDescriptor(Type::IfcStructuralConnectionCondition,0); + current->add("Name",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcStructuralLoad] = new IfcEntityDescriptor(Type::IfcStructuralLoad,0); + current->add("Name",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcStructuralLoadStatic] = new IfcEntityDescriptor(Type::IfcStructuralLoadStatic,entity_descriptor_map.find(Type::IfcStructuralLoad)->second); + current = entity_descriptor_map[Type::IfcStructuralLoadTemperature] = new IfcEntityDescriptor(Type::IfcStructuralLoadTemperature,entity_descriptor_map.find(Type::IfcStructuralLoadStatic)->second); + current->add("DeltaT_Constant",true,Argument_DOUBLE); + current->add("DeltaT_Y",true,Argument_DOUBLE); + current->add("DeltaT_Z",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStyleModel] = new IfcEntityDescriptor(Type::IfcStyleModel,entity_descriptor_map.find(Type::IfcRepresentation)->second); + current = entity_descriptor_map[Type::IfcStyledItem] = new IfcEntityDescriptor(Type::IfcStyledItem,entity_descriptor_map.find(Type::IfcRepresentationItem)->second); + current->add("Item",true,Argument_ENTITY); + current->add("Styles",false,Argument_ENTITY_LIST); + current->add("Name",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcStyledRepresentation] = new IfcEntityDescriptor(Type::IfcStyledRepresentation,entity_descriptor_map.find(Type::IfcStyleModel)->second); + current = entity_descriptor_map[Type::IfcSurfaceStyle] = new IfcEntityDescriptor(Type::IfcSurfaceStyle,entity_descriptor_map.find(Type::IfcPresentationStyle)->second); + current->add("Side",false,Argument_ENUMERATION); + current->add("Styles",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcSurfaceStyleLighting] = new IfcEntityDescriptor(Type::IfcSurfaceStyleLighting,0); + current->add("DiffuseTransmissionColour",false,Argument_ENTITY); + current->add("DiffuseReflectionColour",false,Argument_ENTITY); + current->add("TransmissionColour",false,Argument_ENTITY); + current->add("ReflectanceColour",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSurfaceStyleRefraction] = new IfcEntityDescriptor(Type::IfcSurfaceStyleRefraction,0); + current->add("RefractionIndex",true,Argument_DOUBLE); + current->add("DispersionFactor",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSurfaceStyleShading] = new IfcEntityDescriptor(Type::IfcSurfaceStyleShading,0); + current->add("SurfaceColour",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSurfaceStyleWithTextures] = new IfcEntityDescriptor(Type::IfcSurfaceStyleWithTextures,0); + current->add("Textures",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcSurfaceTexture] = new IfcEntityDescriptor(Type::IfcSurfaceTexture,0); + current->add("RepeatS",false,Argument_BOOL); + current->add("RepeatT",false,Argument_BOOL); + current->add("TextureType",false,Argument_ENUMERATION); + current->add("TextureTransform",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSymbolStyle] = new IfcEntityDescriptor(Type::IfcSymbolStyle,entity_descriptor_map.find(Type::IfcPresentationStyle)->second); + current->add("StyleOfSymbol",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTable] = new IfcEntityDescriptor(Type::IfcTable,0); + current->add("Name",false,Argument_STRING); + current->add("Rows",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcTableRow] = new IfcEntityDescriptor(Type::IfcTableRow,0); + current->add("RowCells",false,Argument_ENTITY_LIST); + current->add("IsHeading",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcTelecomAddress] = new IfcEntityDescriptor(Type::IfcTelecomAddress,entity_descriptor_map.find(Type::IfcAddress)->second); + current->add("TelephoneNumbers",true,Argument_VECTOR_STRING); + current->add("FacsimileNumbers",true,Argument_VECTOR_STRING); + current->add("PagerNumber",true,Argument_STRING); + current->add("ElectronicMailAddresses",true,Argument_VECTOR_STRING); + current->add("WWWHomePageURL",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcTextStyle] = new IfcEntityDescriptor(Type::IfcTextStyle,entity_descriptor_map.find(Type::IfcPresentationStyle)->second); + current->add("TextCharacterAppearance",true,Argument_ENTITY); + current->add("TextStyle",true,Argument_ENTITY); + current->add("TextFontStyle",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTextStyleFontModel] = new IfcEntityDescriptor(Type::IfcTextStyleFontModel,entity_descriptor_map.find(Type::IfcPreDefinedTextFont)->second); + current->add("FontFamily",true,Argument_VECTOR_STRING); + current->add("FontStyle",true,Argument_STRING); + current->add("FontVariant",true,Argument_STRING); + current->add("FontWeight",true,Argument_STRING); + current->add("FontSize",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTextStyleForDefinedFont] = new IfcEntityDescriptor(Type::IfcTextStyleForDefinedFont,0); + current->add("Colour",false,Argument_ENTITY); + current->add("BackgroundColour",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTextStyleTextModel] = new IfcEntityDescriptor(Type::IfcTextStyleTextModel,0); + current->add("TextIndent",true,Argument_ENTITY); + current->add("TextAlign",true,Argument_STRING); + current->add("TextDecoration",true,Argument_STRING); + current->add("LetterSpacing",true,Argument_ENTITY); + current->add("WordSpacing",true,Argument_ENTITY); + current->add("TextTransform",true,Argument_STRING); + current->add("LineHeight",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTextStyleWithBoxCharacteristics] = new IfcEntityDescriptor(Type::IfcTextStyleWithBoxCharacteristics,0); + current->add("BoxHeight",true,Argument_DOUBLE); + current->add("BoxWidth",true,Argument_DOUBLE); + current->add("BoxSlantAngle",true,Argument_DOUBLE); + current->add("BoxRotateAngle",true,Argument_DOUBLE); + current->add("CharacterSpacing",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTextureCoordinate] = new IfcEntityDescriptor(Type::IfcTextureCoordinate,0); + current = entity_descriptor_map[Type::IfcTextureCoordinateGenerator] = new IfcEntityDescriptor(Type::IfcTextureCoordinateGenerator,entity_descriptor_map.find(Type::IfcTextureCoordinate)->second); + current->add("Mode",false,Argument_STRING); + current->add("Parameter",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcTextureMap] = new IfcEntityDescriptor(Type::IfcTextureMap,entity_descriptor_map.find(Type::IfcTextureCoordinate)->second); + current->add("TextureMaps",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcTextureVertex] = new IfcEntityDescriptor(Type::IfcTextureVertex,0); + current->add("Coordinates",false,Argument_VECTOR_DOUBLE); + current = entity_descriptor_map[Type::IfcThermalMaterialProperties] = new IfcEntityDescriptor(Type::IfcThermalMaterialProperties,entity_descriptor_map.find(Type::IfcMaterialProperties)->second); + current->add("SpecificHeatCapacity",true,Argument_DOUBLE); + current->add("BoilingPoint",true,Argument_DOUBLE); + current->add("FreezingPoint",true,Argument_DOUBLE); + current->add("ThermalConductivity",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcTimeSeries] = new IfcEntityDescriptor(Type::IfcTimeSeries,0); + current->add("Name",false,Argument_STRING); + current->add("Description",true,Argument_STRING); + current->add("StartTime",false,Argument_ENTITY); + current->add("EndTime",false,Argument_ENTITY); + current->add("TimeSeriesDataType",false,Argument_ENUMERATION); + current->add("DataOrigin",false,Argument_ENUMERATION); + current->add("UserDefinedDataOrigin",true,Argument_STRING); + current->add("Unit",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTimeSeriesReferenceRelationship] = new IfcEntityDescriptor(Type::IfcTimeSeriesReferenceRelationship,0); + current->add("ReferencedTimeSeries",false,Argument_ENTITY); + current->add("TimeSeriesReferences",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcTimeSeriesValue] = new IfcEntityDescriptor(Type::IfcTimeSeriesValue,0); + current->add("ListValues",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcTopologicalRepresentationItem] = new IfcEntityDescriptor(Type::IfcTopologicalRepresentationItem,entity_descriptor_map.find(Type::IfcRepresentationItem)->second); + current = entity_descriptor_map[Type::IfcTopologyRepresentation] = new IfcEntityDescriptor(Type::IfcTopologyRepresentation,entity_descriptor_map.find(Type::IfcShapeModel)->second); + current = entity_descriptor_map[Type::IfcUnitAssignment] = new IfcEntityDescriptor(Type::IfcUnitAssignment,0); + current->add("Units",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcVertex] = new IfcEntityDescriptor(Type::IfcVertex,entity_descriptor_map.find(Type::IfcTopologicalRepresentationItem)->second); + current = entity_descriptor_map[Type::IfcVertexBasedTextureMap] = new IfcEntityDescriptor(Type::IfcVertexBasedTextureMap,0); + current->add("TextureVertices",false,Argument_ENTITY_LIST); + current->add("TexturePoints",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcVertexPoint] = new IfcEntityDescriptor(Type::IfcVertexPoint,entity_descriptor_map.find(Type::IfcVertex)->second); + current->add("VertexGeometry",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcVirtualGridIntersection] = new IfcEntityDescriptor(Type::IfcVirtualGridIntersection,0); + current->add("IntersectingAxes",false,Argument_ENTITY_LIST); + current->add("OffsetDistances",false,Argument_VECTOR_DOUBLE); + current = entity_descriptor_map[Type::IfcWaterProperties] = new IfcEntityDescriptor(Type::IfcWaterProperties,entity_descriptor_map.find(Type::IfcMaterialProperties)->second); + current->add("IsPotable",true,Argument_BOOL); + current->add("Hardness",true,Argument_DOUBLE); + current->add("AlkalinityConcentration",true,Argument_DOUBLE); + current->add("AcidityConcentration",true,Argument_DOUBLE); + current->add("ImpuritiesContent",true,Argument_DOUBLE); + current->add("PHLevel",true,Argument_DOUBLE); + current->add("DissolvedSolidsContent",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcAnnotationOccurrence] = new IfcEntityDescriptor(Type::IfcAnnotationOccurrence,entity_descriptor_map.find(Type::IfcStyledItem)->second); + current = entity_descriptor_map[Type::IfcAnnotationSurfaceOccurrence] = new IfcEntityDescriptor(Type::IfcAnnotationSurfaceOccurrence,entity_descriptor_map.find(Type::IfcAnnotationOccurrence)->second); + current = entity_descriptor_map[Type::IfcAnnotationSymbolOccurrence] = new IfcEntityDescriptor(Type::IfcAnnotationSymbolOccurrence,entity_descriptor_map.find(Type::IfcAnnotationOccurrence)->second); + current = entity_descriptor_map[Type::IfcAnnotationTextOccurrence] = new IfcEntityDescriptor(Type::IfcAnnotationTextOccurrence,entity_descriptor_map.find(Type::IfcAnnotationOccurrence)->second); + current = entity_descriptor_map[Type::IfcArbitraryClosedProfileDef] = new IfcEntityDescriptor(Type::IfcArbitraryClosedProfileDef,entity_descriptor_map.find(Type::IfcProfileDef)->second); + current->add("OuterCurve",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcArbitraryOpenProfileDef] = new IfcEntityDescriptor(Type::IfcArbitraryOpenProfileDef,entity_descriptor_map.find(Type::IfcProfileDef)->second); + current->add("Curve",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcArbitraryProfileDefWithVoids] = new IfcEntityDescriptor(Type::IfcArbitraryProfileDefWithVoids,entity_descriptor_map.find(Type::IfcArbitraryClosedProfileDef)->second); + current->add("InnerCurves",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcBlobTexture] = new IfcEntityDescriptor(Type::IfcBlobTexture,entity_descriptor_map.find(Type::IfcSurfaceTexture)->second); + current->add("RasterFormat",false,Argument_STRING); + current->add("RasterCode",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcCenterLineProfileDef] = new IfcEntityDescriptor(Type::IfcCenterLineProfileDef,entity_descriptor_map.find(Type::IfcArbitraryOpenProfileDef)->second); + current->add("Thickness",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcClassificationReference] = new IfcEntityDescriptor(Type::IfcClassificationReference,entity_descriptor_map.find(Type::IfcExternalReference)->second); + current->add("ReferencedSource",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcColourRgb] = new IfcEntityDescriptor(Type::IfcColourRgb,entity_descriptor_map.find(Type::IfcColourSpecification)->second); + current->add("Red",false,Argument_DOUBLE); + current->add("Green",false,Argument_DOUBLE); + current->add("Blue",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcComplexProperty] = new IfcEntityDescriptor(Type::IfcComplexProperty,entity_descriptor_map.find(Type::IfcProperty)->second); + current->add("UsageName",false,Argument_STRING); + current->add("HasProperties",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcCompositeProfileDef] = new IfcEntityDescriptor(Type::IfcCompositeProfileDef,entity_descriptor_map.find(Type::IfcProfileDef)->second); + current->add("Profiles",false,Argument_ENTITY_LIST); + current->add("Label",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcConnectedFaceSet] = new IfcEntityDescriptor(Type::IfcConnectedFaceSet,entity_descriptor_map.find(Type::IfcTopologicalRepresentationItem)->second); + current->add("CfsFaces",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcConnectionCurveGeometry] = new IfcEntityDescriptor(Type::IfcConnectionCurveGeometry,entity_descriptor_map.find(Type::IfcConnectionGeometry)->second); + current->add("CurveOnRelatingElement",false,Argument_ENTITY); + current->add("CurveOnRelatedElement",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcConnectionPointEccentricity] = new IfcEntityDescriptor(Type::IfcConnectionPointEccentricity,entity_descriptor_map.find(Type::IfcConnectionPointGeometry)->second); + current->add("EccentricityInX",true,Argument_DOUBLE); + current->add("EccentricityInY",true,Argument_DOUBLE); + current->add("EccentricityInZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcContextDependentUnit] = new IfcEntityDescriptor(Type::IfcContextDependentUnit,entity_descriptor_map.find(Type::IfcNamedUnit)->second); + current->add("Name",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcConversionBasedUnit] = new IfcEntityDescriptor(Type::IfcConversionBasedUnit,entity_descriptor_map.find(Type::IfcNamedUnit)->second); + current->add("Name",false,Argument_STRING); + current->add("ConversionFactor",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcCurveStyle] = new IfcEntityDescriptor(Type::IfcCurveStyle,entity_descriptor_map.find(Type::IfcPresentationStyle)->second); + current->add("CurveFont",true,Argument_ENTITY); + current->add("CurveWidth",true,Argument_ENTITY); + current->add("CurveColour",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcDerivedProfileDef] = new IfcEntityDescriptor(Type::IfcDerivedProfileDef,entity_descriptor_map.find(Type::IfcProfileDef)->second); + current->add("ParentProfile",false,Argument_ENTITY); + current->add("Operator",false,Argument_ENTITY); + current->add("Label",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcDimensionCalloutRelationship] = new IfcEntityDescriptor(Type::IfcDimensionCalloutRelationship,entity_descriptor_map.find(Type::IfcDraughtingCalloutRelationship)->second); + current = entity_descriptor_map[Type::IfcDimensionPair] = new IfcEntityDescriptor(Type::IfcDimensionPair,entity_descriptor_map.find(Type::IfcDraughtingCalloutRelationship)->second); + current = entity_descriptor_map[Type::IfcDocumentReference] = new IfcEntityDescriptor(Type::IfcDocumentReference,entity_descriptor_map.find(Type::IfcExternalReference)->second); + current = entity_descriptor_map[Type::IfcDraughtingPreDefinedTextFont] = new IfcEntityDescriptor(Type::IfcDraughtingPreDefinedTextFont,entity_descriptor_map.find(Type::IfcPreDefinedTextFont)->second); + current = entity_descriptor_map[Type::IfcEdge] = new IfcEntityDescriptor(Type::IfcEdge,entity_descriptor_map.find(Type::IfcTopologicalRepresentationItem)->second); + current->add("EdgeStart",false,Argument_ENTITY); + current->add("EdgeEnd",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcEdgeCurve] = new IfcEntityDescriptor(Type::IfcEdgeCurve,entity_descriptor_map.find(Type::IfcEdge)->second); + current->add("EdgeGeometry",false,Argument_ENTITY); + current->add("SameSense",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcExtendedMaterialProperties] = new IfcEntityDescriptor(Type::IfcExtendedMaterialProperties,entity_descriptor_map.find(Type::IfcMaterialProperties)->second); + current->add("ExtendedProperties",false,Argument_ENTITY_LIST); + current->add("Description",true,Argument_STRING); + current->add("Name",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcFace] = new IfcEntityDescriptor(Type::IfcFace,entity_descriptor_map.find(Type::IfcTopologicalRepresentationItem)->second); + current->add("Bounds",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcFaceBound] = new IfcEntityDescriptor(Type::IfcFaceBound,entity_descriptor_map.find(Type::IfcTopologicalRepresentationItem)->second); + current->add("Bound",false,Argument_ENTITY); + current->add("Orientation",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcFaceOuterBound] = new IfcEntityDescriptor(Type::IfcFaceOuterBound,entity_descriptor_map.find(Type::IfcFaceBound)->second); + current = entity_descriptor_map[Type::IfcFaceSurface] = new IfcEntityDescriptor(Type::IfcFaceSurface,entity_descriptor_map.find(Type::IfcFace)->second); + current->add("FaceSurface",false,Argument_ENTITY); + current->add("SameSense",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcFailureConnectionCondition] = new IfcEntityDescriptor(Type::IfcFailureConnectionCondition,entity_descriptor_map.find(Type::IfcStructuralConnectionCondition)->second); + current->add("TensionFailureX",true,Argument_DOUBLE); + current->add("TensionFailureY",true,Argument_DOUBLE); + current->add("TensionFailureZ",true,Argument_DOUBLE); + current->add("CompressionFailureX",true,Argument_DOUBLE); + current->add("CompressionFailureY",true,Argument_DOUBLE); + current->add("CompressionFailureZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcFillAreaStyle] = new IfcEntityDescriptor(Type::IfcFillAreaStyle,entity_descriptor_map.find(Type::IfcPresentationStyle)->second); + current->add("FillStyles",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcFuelProperties] = new IfcEntityDescriptor(Type::IfcFuelProperties,entity_descriptor_map.find(Type::IfcMaterialProperties)->second); + current->add("CombustionTemperature",true,Argument_DOUBLE); + current->add("CarbonContent",true,Argument_DOUBLE); + current->add("LowerHeatingValue",true,Argument_DOUBLE); + current->add("HigherHeatingValue",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcGeneralMaterialProperties] = new IfcEntityDescriptor(Type::IfcGeneralMaterialProperties,entity_descriptor_map.find(Type::IfcMaterialProperties)->second); + current->add("MolecularWeight",true,Argument_DOUBLE); + current->add("Porosity",true,Argument_DOUBLE); + current->add("MassDensity",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcGeneralProfileProperties] = new IfcEntityDescriptor(Type::IfcGeneralProfileProperties,entity_descriptor_map.find(Type::IfcProfileProperties)->second); + current->add("PhysicalWeight",true,Argument_DOUBLE); + current->add("Perimeter",true,Argument_DOUBLE); + current->add("MinimumPlateThickness",true,Argument_DOUBLE); + current->add("MaximumPlateThickness",true,Argument_DOUBLE); + current->add("CrossSectionArea",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcGeometricRepresentationContext] = new IfcEntityDescriptor(Type::IfcGeometricRepresentationContext,entity_descriptor_map.find(Type::IfcRepresentationContext)->second); + current->add("CoordinateSpaceDimension",false,Argument_INT); + current->add("Precision",true,Argument_DOUBLE); + current->add("WorldCoordinateSystem",false,Argument_ENTITY); + current->add("TrueNorth",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcGeometricRepresentationItem] = new IfcEntityDescriptor(Type::IfcGeometricRepresentationItem,entity_descriptor_map.find(Type::IfcRepresentationItem)->second); + current = entity_descriptor_map[Type::IfcGeometricRepresentationSubContext] = new IfcEntityDescriptor(Type::IfcGeometricRepresentationSubContext,entity_descriptor_map.find(Type::IfcGeometricRepresentationContext)->second); + current->add("ParentContext",false,Argument_ENTITY); + current->add("TargetScale",true,Argument_DOUBLE); + current->add("TargetView",false,Argument_ENUMERATION); + current->add("UserDefinedTargetView",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcGeometricSet] = new IfcEntityDescriptor(Type::IfcGeometricSet,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Elements",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcGridPlacement] = new IfcEntityDescriptor(Type::IfcGridPlacement,entity_descriptor_map.find(Type::IfcObjectPlacement)->second); + current->add("PlacementLocation",false,Argument_ENTITY); + current->add("PlacementRefDirection",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcHalfSpaceSolid] = new IfcEntityDescriptor(Type::IfcHalfSpaceSolid,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("BaseSurface",false,Argument_ENTITY); + current->add("AgreementFlag",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcHygroscopicMaterialProperties] = new IfcEntityDescriptor(Type::IfcHygroscopicMaterialProperties,entity_descriptor_map.find(Type::IfcMaterialProperties)->second); + current->add("UpperVaporResistanceFactor",true,Argument_DOUBLE); + current->add("LowerVaporResistanceFactor",true,Argument_DOUBLE); + current->add("IsothermalMoistureCapacity",true,Argument_DOUBLE); + current->add("VaporPermeability",true,Argument_DOUBLE); + current->add("MoistureDiffusivity",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcImageTexture] = new IfcEntityDescriptor(Type::IfcImageTexture,entity_descriptor_map.find(Type::IfcSurfaceTexture)->second); + current->add("UrlReference",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcIrregularTimeSeries] = new IfcEntityDescriptor(Type::IfcIrregularTimeSeries,entity_descriptor_map.find(Type::IfcTimeSeries)->second); + current->add("Values",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcLightSource] = new IfcEntityDescriptor(Type::IfcLightSource,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Name",true,Argument_STRING); + current->add("LightColour",false,Argument_ENTITY); + current->add("AmbientIntensity",true,Argument_DOUBLE); + current->add("Intensity",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcLightSourceAmbient] = new IfcEntityDescriptor(Type::IfcLightSourceAmbient,entity_descriptor_map.find(Type::IfcLightSource)->second); + current = entity_descriptor_map[Type::IfcLightSourceDirectional] = new IfcEntityDescriptor(Type::IfcLightSourceDirectional,entity_descriptor_map.find(Type::IfcLightSource)->second); + current->add("Orientation",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcLightSourceGoniometric] = new IfcEntityDescriptor(Type::IfcLightSourceGoniometric,entity_descriptor_map.find(Type::IfcLightSource)->second); + current->add("Position",false,Argument_ENTITY); + current->add("ColourAppearance",true,Argument_ENTITY); + current->add("ColourTemperature",false,Argument_DOUBLE); + current->add("LuminousFlux",false,Argument_DOUBLE); + current->add("LightEmissionSource",false,Argument_ENUMERATION); + current->add("LightDistributionDataSource",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcLightSourcePositional] = new IfcEntityDescriptor(Type::IfcLightSourcePositional,entity_descriptor_map.find(Type::IfcLightSource)->second); + current->add("Position",false,Argument_ENTITY); + current->add("Radius",false,Argument_DOUBLE); + current->add("ConstantAttenuation",false,Argument_DOUBLE); + current->add("DistanceAttenuation",false,Argument_DOUBLE); + current->add("QuadricAttenuation",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcLightSourceSpot] = new IfcEntityDescriptor(Type::IfcLightSourceSpot,entity_descriptor_map.find(Type::IfcLightSourcePositional)->second); + current->add("Orientation",false,Argument_ENTITY); + current->add("ConcentrationExponent",true,Argument_DOUBLE); + current->add("SpreadAngle",false,Argument_DOUBLE); + current->add("BeamWidthAngle",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcLocalPlacement] = new IfcEntityDescriptor(Type::IfcLocalPlacement,entity_descriptor_map.find(Type::IfcObjectPlacement)->second); + current->add("PlacementRelTo",true,Argument_ENTITY); + current->add("RelativePlacement",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcLoop] = new IfcEntityDescriptor(Type::IfcLoop,entity_descriptor_map.find(Type::IfcTopologicalRepresentationItem)->second); + current = entity_descriptor_map[Type::IfcMappedItem] = new IfcEntityDescriptor(Type::IfcMappedItem,entity_descriptor_map.find(Type::IfcRepresentationItem)->second); + current->add("MappingSource",false,Argument_ENTITY); + current->add("MappingTarget",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcMaterialDefinitionRepresentation] = new IfcEntityDescriptor(Type::IfcMaterialDefinitionRepresentation,entity_descriptor_map.find(Type::IfcProductRepresentation)->second); + current->add("RepresentedMaterial",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcMechanicalConcreteMaterialProperties] = new IfcEntityDescriptor(Type::IfcMechanicalConcreteMaterialProperties,entity_descriptor_map.find(Type::IfcMechanicalMaterialProperties)->second); + current->add("CompressiveStrength",true,Argument_DOUBLE); + current->add("MaxAggregateSize",true,Argument_DOUBLE); + current->add("AdmixturesDescription",true,Argument_STRING); + current->add("Workability",true,Argument_STRING); + current->add("ProtectivePoreRatio",true,Argument_DOUBLE); + current->add("WaterImpermeability",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcObjectDefinition] = new IfcEntityDescriptor(Type::IfcObjectDefinition,entity_descriptor_map.find(Type::IfcRoot)->second); + current = entity_descriptor_map[Type::IfcOneDirectionRepeatFactor] = new IfcEntityDescriptor(Type::IfcOneDirectionRepeatFactor,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("RepeatFactor",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcOpenShell] = new IfcEntityDescriptor(Type::IfcOpenShell,entity_descriptor_map.find(Type::IfcConnectedFaceSet)->second); + current = entity_descriptor_map[Type::IfcOrientedEdge] = new IfcEntityDescriptor(Type::IfcOrientedEdge,entity_descriptor_map.find(Type::IfcEdge)->second); + current->add("EdgeElement",false,Argument_ENTITY); + current->add("Orientation",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcParameterizedProfileDef] = new IfcEntityDescriptor(Type::IfcParameterizedProfileDef,entity_descriptor_map.find(Type::IfcProfileDef)->second); + current->add("Position",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPath] = new IfcEntityDescriptor(Type::IfcPath,entity_descriptor_map.find(Type::IfcTopologicalRepresentationItem)->second); + current->add("EdgeList",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcPhysicalComplexQuantity] = new IfcEntityDescriptor(Type::IfcPhysicalComplexQuantity,entity_descriptor_map.find(Type::IfcPhysicalQuantity)->second); + current->add("HasQuantities",false,Argument_ENTITY_LIST); + current->add("Discrimination",false,Argument_STRING); + current->add("Quality",true,Argument_STRING); + current->add("Usage",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcPixelTexture] = new IfcEntityDescriptor(Type::IfcPixelTexture,entity_descriptor_map.find(Type::IfcSurfaceTexture)->second); + current->add("Width",false,Argument_INT); + current->add("Height",false,Argument_INT); + current->add("ColourComponents",false,Argument_INT); + current->add("Pixel",false,Argument_UNKNOWN); + current = entity_descriptor_map[Type::IfcPlacement] = new IfcEntityDescriptor(Type::IfcPlacement,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Location",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPlanarExtent] = new IfcEntityDescriptor(Type::IfcPlanarExtent,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("SizeInX",false,Argument_DOUBLE); + current->add("SizeInY",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcPoint] = new IfcEntityDescriptor(Type::IfcPoint,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current = entity_descriptor_map[Type::IfcPointOnCurve] = new IfcEntityDescriptor(Type::IfcPointOnCurve,entity_descriptor_map.find(Type::IfcPoint)->second); + current->add("BasisCurve",false,Argument_ENTITY); + current->add("PointParameter",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcPointOnSurface] = new IfcEntityDescriptor(Type::IfcPointOnSurface,entity_descriptor_map.find(Type::IfcPoint)->second); + current->add("BasisSurface",false,Argument_ENTITY); + current->add("PointParameterU",false,Argument_DOUBLE); + current->add("PointParameterV",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcPolyLoop] = new IfcEntityDescriptor(Type::IfcPolyLoop,entity_descriptor_map.find(Type::IfcLoop)->second); + current->add("Polygon",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcPolygonalBoundedHalfSpace] = new IfcEntityDescriptor(Type::IfcPolygonalBoundedHalfSpace,entity_descriptor_map.find(Type::IfcHalfSpaceSolid)->second); + current->add("Position",false,Argument_ENTITY); + current->add("PolygonalBoundary",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPreDefinedColour] = new IfcEntityDescriptor(Type::IfcPreDefinedColour,entity_descriptor_map.find(Type::IfcPreDefinedItem)->second); + current = entity_descriptor_map[Type::IfcPreDefinedCurveFont] = new IfcEntityDescriptor(Type::IfcPreDefinedCurveFont,entity_descriptor_map.find(Type::IfcPreDefinedItem)->second); + current = entity_descriptor_map[Type::IfcPreDefinedDimensionSymbol] = new IfcEntityDescriptor(Type::IfcPreDefinedDimensionSymbol,entity_descriptor_map.find(Type::IfcPreDefinedSymbol)->second); + current = entity_descriptor_map[Type::IfcPreDefinedPointMarkerSymbol] = new IfcEntityDescriptor(Type::IfcPreDefinedPointMarkerSymbol,entity_descriptor_map.find(Type::IfcPreDefinedSymbol)->second); + current = entity_descriptor_map[Type::IfcProductDefinitionShape] = new IfcEntityDescriptor(Type::IfcProductDefinitionShape,entity_descriptor_map.find(Type::IfcProductRepresentation)->second); + current = entity_descriptor_map[Type::IfcPropertyBoundedValue] = new IfcEntityDescriptor(Type::IfcPropertyBoundedValue,entity_descriptor_map.find(Type::IfcSimpleProperty)->second); + current->add("UpperBoundValue",true,Argument_ENTITY); + current->add("LowerBoundValue",true,Argument_ENTITY); + current->add("Unit",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPropertyDefinition] = new IfcEntityDescriptor(Type::IfcPropertyDefinition,entity_descriptor_map.find(Type::IfcRoot)->second); + current = entity_descriptor_map[Type::IfcPropertyEnumeratedValue] = new IfcEntityDescriptor(Type::IfcPropertyEnumeratedValue,entity_descriptor_map.find(Type::IfcSimpleProperty)->second); + current->add("EnumerationValues",false,Argument_ENTITY_LIST); + current->add("EnumerationReference",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPropertyListValue] = new IfcEntityDescriptor(Type::IfcPropertyListValue,entity_descriptor_map.find(Type::IfcSimpleProperty)->second); + current->add("ListValues",false,Argument_ENTITY_LIST); + current->add("Unit",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPropertyReferenceValue] = new IfcEntityDescriptor(Type::IfcPropertyReferenceValue,entity_descriptor_map.find(Type::IfcSimpleProperty)->second); + current->add("UsageName",true,Argument_STRING); + current->add("PropertyReference",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPropertySetDefinition] = new IfcEntityDescriptor(Type::IfcPropertySetDefinition,entity_descriptor_map.find(Type::IfcPropertyDefinition)->second); + current = entity_descriptor_map[Type::IfcPropertySingleValue] = new IfcEntityDescriptor(Type::IfcPropertySingleValue,entity_descriptor_map.find(Type::IfcSimpleProperty)->second); + current->add("NominalValue",true,Argument_ENTITY); + current->add("Unit",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPropertyTableValue] = new IfcEntityDescriptor(Type::IfcPropertyTableValue,entity_descriptor_map.find(Type::IfcSimpleProperty)->second); + current->add("DefiningValues",false,Argument_ENTITY_LIST); + current->add("DefinedValues",false,Argument_ENTITY_LIST); + current->add("Expression",true,Argument_STRING); + current->add("DefiningUnit",true,Argument_ENTITY); + current->add("DefinedUnit",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRectangleProfileDef] = new IfcEntityDescriptor(Type::IfcRectangleProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("XDim",false,Argument_DOUBLE); + current->add("YDim",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcRegularTimeSeries] = new IfcEntityDescriptor(Type::IfcRegularTimeSeries,entity_descriptor_map.find(Type::IfcTimeSeries)->second); + current->add("TimeStep",false,Argument_DOUBLE); + current->add("Values",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcReinforcementDefinitionProperties] = new IfcEntityDescriptor(Type::IfcReinforcementDefinitionProperties,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("DefinitionType",true,Argument_STRING); + current->add("ReinforcementSectionDefinitions",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcRelationship] = new IfcEntityDescriptor(Type::IfcRelationship,entity_descriptor_map.find(Type::IfcRoot)->second); + current = entity_descriptor_map[Type::IfcRoundedRectangleProfileDef] = new IfcEntityDescriptor(Type::IfcRoundedRectangleProfileDef,entity_descriptor_map.find(Type::IfcRectangleProfileDef)->second); + current->add("RoundingRadius",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSectionedSpine] = new IfcEntityDescriptor(Type::IfcSectionedSpine,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("SpineCurve",false,Argument_ENTITY); + current->add("CrossSections",false,Argument_ENTITY_LIST); + current->add("CrossSectionPositions",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcServiceLifeFactor] = new IfcEntityDescriptor(Type::IfcServiceLifeFactor,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current->add("UpperValue",true,Argument_ENTITY); + current->add("MostUsedValue",false,Argument_ENTITY); + current->add("LowerValue",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcShellBasedSurfaceModel] = new IfcEntityDescriptor(Type::IfcShellBasedSurfaceModel,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("SbsmBoundary",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcSlippageConnectionCondition] = new IfcEntityDescriptor(Type::IfcSlippageConnectionCondition,entity_descriptor_map.find(Type::IfcStructuralConnectionCondition)->second); + current->add("SlippageX",true,Argument_DOUBLE); + current->add("SlippageY",true,Argument_DOUBLE); + current->add("SlippageZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSolidModel] = new IfcEntityDescriptor(Type::IfcSolidModel,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current = entity_descriptor_map[Type::IfcSoundProperties] = new IfcEntityDescriptor(Type::IfcSoundProperties,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("IsAttenuating",false,Argument_BOOL); + current->add("SoundScale",true,Argument_ENUMERATION); + current->add("SoundValues",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcSoundValue] = new IfcEntityDescriptor(Type::IfcSoundValue,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("SoundLevelTimeSeries",true,Argument_ENTITY); + current->add("Frequency",false,Argument_DOUBLE); + current->add("SoundLevelSingleValue",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSpaceThermalLoadProperties] = new IfcEntityDescriptor(Type::IfcSpaceThermalLoadProperties,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("ApplicableValueRatio",true,Argument_DOUBLE); + current->add("ThermalLoadSource",false,Argument_ENUMERATION); + current->add("PropertySource",false,Argument_ENUMERATION); + current->add("SourceDescription",true,Argument_STRING); + current->add("MaximumValue",false,Argument_DOUBLE); + current->add("MinimumValue",true,Argument_DOUBLE); + current->add("ThermalLoadTimeSeriesValues",true,Argument_ENTITY); + current->add("UserDefinedThermalLoadSource",true,Argument_STRING); + current->add("UserDefinedPropertySource",true,Argument_STRING); + current->add("ThermalLoadType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcStructuralLoadLinearForce] = new IfcEntityDescriptor(Type::IfcStructuralLoadLinearForce,entity_descriptor_map.find(Type::IfcStructuralLoadStatic)->second); + current->add("LinearForceX",true,Argument_DOUBLE); + current->add("LinearForceY",true,Argument_DOUBLE); + current->add("LinearForceZ",true,Argument_DOUBLE); + current->add("LinearMomentX",true,Argument_DOUBLE); + current->add("LinearMomentY",true,Argument_DOUBLE); + current->add("LinearMomentZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStructuralLoadPlanarForce] = new IfcEntityDescriptor(Type::IfcStructuralLoadPlanarForce,entity_descriptor_map.find(Type::IfcStructuralLoadStatic)->second); + current->add("PlanarForceX",true,Argument_DOUBLE); + current->add("PlanarForceY",true,Argument_DOUBLE); + current->add("PlanarForceZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStructuralLoadSingleDisplacement] = new IfcEntityDescriptor(Type::IfcStructuralLoadSingleDisplacement,entity_descriptor_map.find(Type::IfcStructuralLoadStatic)->second); + current->add("DisplacementX",true,Argument_DOUBLE); + current->add("DisplacementY",true,Argument_DOUBLE); + current->add("DisplacementZ",true,Argument_DOUBLE); + current->add("RotationalDisplacementRX",true,Argument_DOUBLE); + current->add("RotationalDisplacementRY",true,Argument_DOUBLE); + current->add("RotationalDisplacementRZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStructuralLoadSingleDisplacementDistortion] = new IfcEntityDescriptor(Type::IfcStructuralLoadSingleDisplacementDistortion,entity_descriptor_map.find(Type::IfcStructuralLoadSingleDisplacement)->second); + current->add("Distortion",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStructuralLoadSingleForce] = new IfcEntityDescriptor(Type::IfcStructuralLoadSingleForce,entity_descriptor_map.find(Type::IfcStructuralLoadStatic)->second); + current->add("ForceX",true,Argument_DOUBLE); + current->add("ForceY",true,Argument_DOUBLE); + current->add("ForceZ",true,Argument_DOUBLE); + current->add("MomentX",true,Argument_DOUBLE); + current->add("MomentY",true,Argument_DOUBLE); + current->add("MomentZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStructuralLoadSingleForceWarping] = new IfcEntityDescriptor(Type::IfcStructuralLoadSingleForceWarping,entity_descriptor_map.find(Type::IfcStructuralLoadSingleForce)->second); + current->add("WarpingMoment",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStructuralProfileProperties] = new IfcEntityDescriptor(Type::IfcStructuralProfileProperties,entity_descriptor_map.find(Type::IfcGeneralProfileProperties)->second); + current->add("TorsionalConstantX",true,Argument_DOUBLE); + current->add("MomentOfInertiaYZ",true,Argument_DOUBLE); + current->add("MomentOfInertiaY",true,Argument_DOUBLE); + current->add("MomentOfInertiaZ",true,Argument_DOUBLE); + current->add("WarpingConstant",true,Argument_DOUBLE); + current->add("ShearCentreZ",true,Argument_DOUBLE); + current->add("ShearCentreY",true,Argument_DOUBLE); + current->add("ShearDeformationAreaZ",true,Argument_DOUBLE); + current->add("ShearDeformationAreaY",true,Argument_DOUBLE); + current->add("MaximumSectionModulusY",true,Argument_DOUBLE); + current->add("MinimumSectionModulusY",true,Argument_DOUBLE); + current->add("MaximumSectionModulusZ",true,Argument_DOUBLE); + current->add("MinimumSectionModulusZ",true,Argument_DOUBLE); + current->add("TorsionalSectionModulus",true,Argument_DOUBLE); + current->add("CentreOfGravityInX",true,Argument_DOUBLE); + current->add("CentreOfGravityInY",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStructuralSteelProfileProperties] = new IfcEntityDescriptor(Type::IfcStructuralSteelProfileProperties,entity_descriptor_map.find(Type::IfcStructuralProfileProperties)->second); + current->add("ShearAreaZ",true,Argument_DOUBLE); + current->add("ShearAreaY",true,Argument_DOUBLE); + current->add("PlasticShapeFactorY",true,Argument_DOUBLE); + current->add("PlasticShapeFactorZ",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSubedge] = new IfcEntityDescriptor(Type::IfcSubedge,entity_descriptor_map.find(Type::IfcEdge)->second); + current->add("ParentEdge",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSurface] = new IfcEntityDescriptor(Type::IfcSurface,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current = entity_descriptor_map[Type::IfcSurfaceStyleRendering] = new IfcEntityDescriptor(Type::IfcSurfaceStyleRendering,entity_descriptor_map.find(Type::IfcSurfaceStyleShading)->second); + current->add("Transparency",true,Argument_DOUBLE); + current->add("DiffuseColour",true,Argument_ENTITY); + current->add("TransmissionColour",true,Argument_ENTITY); + current->add("DiffuseTransmissionColour",true,Argument_ENTITY); + current->add("ReflectionColour",true,Argument_ENTITY); + current->add("SpecularColour",true,Argument_ENTITY); + current->add("SpecularHighlight",true,Argument_ENTITY); + current->add("ReflectanceMethod",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcSweptAreaSolid] = new IfcEntityDescriptor(Type::IfcSweptAreaSolid,entity_descriptor_map.find(Type::IfcSolidModel)->second); + current->add("SweptArea",false,Argument_ENTITY); + current->add("Position",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSweptDiskSolid] = new IfcEntityDescriptor(Type::IfcSweptDiskSolid,entity_descriptor_map.find(Type::IfcSolidModel)->second); + current->add("Directrix",false,Argument_ENTITY); + current->add("Radius",false,Argument_DOUBLE); + current->add("InnerRadius",true,Argument_DOUBLE); + current->add("StartParam",false,Argument_DOUBLE); + current->add("EndParam",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSweptSurface] = new IfcEntityDescriptor(Type::IfcSweptSurface,entity_descriptor_map.find(Type::IfcSurface)->second); + current->add("SweptCurve",false,Argument_ENTITY); + current->add("Position",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTShapeProfileDef] = new IfcEntityDescriptor(Type::IfcTShapeProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("Depth",false,Argument_DOUBLE); + current->add("FlangeWidth",false,Argument_DOUBLE); + current->add("WebThickness",false,Argument_DOUBLE); + current->add("FlangeThickness",false,Argument_DOUBLE); + current->add("FilletRadius",true,Argument_DOUBLE); + current->add("FlangeEdgeRadius",true,Argument_DOUBLE); + current->add("WebEdgeRadius",true,Argument_DOUBLE); + current->add("WebSlope",true,Argument_DOUBLE); + current->add("FlangeSlope",true,Argument_DOUBLE); + current->add("CentreOfGravityInY",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcTerminatorSymbol] = new IfcEntityDescriptor(Type::IfcTerminatorSymbol,entity_descriptor_map.find(Type::IfcAnnotationSymbolOccurrence)->second); + current->add("AnnotatedCurve",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTextLiteral] = new IfcEntityDescriptor(Type::IfcTextLiteral,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Literal",false,Argument_STRING); + current->add("Placement",false,Argument_ENTITY); + current->add("Path",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcTextLiteralWithExtent] = new IfcEntityDescriptor(Type::IfcTextLiteralWithExtent,entity_descriptor_map.find(Type::IfcTextLiteral)->second); + current->add("Extent",false,Argument_ENTITY); + current->add("BoxAlignment",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcTrapeziumProfileDef] = new IfcEntityDescriptor(Type::IfcTrapeziumProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("BottomXDim",false,Argument_DOUBLE); + current->add("TopXDim",false,Argument_DOUBLE); + current->add("YDim",false,Argument_DOUBLE); + current->add("TopXOffset",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcTwoDirectionRepeatFactor] = new IfcEntityDescriptor(Type::IfcTwoDirectionRepeatFactor,entity_descriptor_map.find(Type::IfcOneDirectionRepeatFactor)->second); + current->add("SecondRepeatFactor",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTypeObject] = new IfcEntityDescriptor(Type::IfcTypeObject,entity_descriptor_map.find(Type::IfcObjectDefinition)->second); + current->add("ApplicableOccurrence",true,Argument_STRING); + current->add("HasPropertySets",true,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcTypeProduct] = new IfcEntityDescriptor(Type::IfcTypeProduct,entity_descriptor_map.find(Type::IfcTypeObject)->second); + current->add("RepresentationMaps",true,Argument_ENTITY_LIST); + current->add("Tag",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcUShapeProfileDef] = new IfcEntityDescriptor(Type::IfcUShapeProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("Depth",false,Argument_DOUBLE); + current->add("FlangeWidth",false,Argument_DOUBLE); + current->add("WebThickness",false,Argument_DOUBLE); + current->add("FlangeThickness",false,Argument_DOUBLE); + current->add("FilletRadius",true,Argument_DOUBLE); + current->add("EdgeRadius",true,Argument_DOUBLE); + current->add("FlangeSlope",true,Argument_DOUBLE); + current->add("CentreOfGravityInX",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcVector] = new IfcEntityDescriptor(Type::IfcVector,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Orientation",false,Argument_ENTITY); + current->add("Magnitude",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcVertexLoop] = new IfcEntityDescriptor(Type::IfcVertexLoop,entity_descriptor_map.find(Type::IfcLoop)->second); + current->add("LoopVertex",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcWindowLiningProperties] = new IfcEntityDescriptor(Type::IfcWindowLiningProperties,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("LiningDepth",true,Argument_DOUBLE); + current->add("LiningThickness",true,Argument_DOUBLE); + current->add("TransomThickness",true,Argument_DOUBLE); + current->add("MullionThickness",true,Argument_DOUBLE); + current->add("FirstTransomOffset",true,Argument_DOUBLE); + current->add("SecondTransomOffset",true,Argument_DOUBLE); + current->add("FirstMullionOffset",true,Argument_DOUBLE); + current->add("SecondMullionOffset",true,Argument_DOUBLE); + current->add("ShapeAspectStyle",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcWindowPanelProperties] = new IfcEntityDescriptor(Type::IfcWindowPanelProperties,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("OperationType",false,Argument_ENUMERATION); + current->add("PanelPosition",false,Argument_ENUMERATION); + current->add("FrameDepth",true,Argument_DOUBLE); + current->add("FrameThickness",true,Argument_DOUBLE); + current->add("ShapeAspectStyle",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcWindowStyle] = new IfcEntityDescriptor(Type::IfcWindowStyle,entity_descriptor_map.find(Type::IfcTypeProduct)->second); + current->add("ConstructionType",false,Argument_ENUMERATION); + current->add("OperationType",false,Argument_ENUMERATION); + current->add("ParameterTakesPrecedence",false,Argument_BOOL); + current->add("Sizeable",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcZShapeProfileDef] = new IfcEntityDescriptor(Type::IfcZShapeProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("Depth",false,Argument_DOUBLE); + current->add("FlangeWidth",false,Argument_DOUBLE); + current->add("WebThickness",false,Argument_DOUBLE); + current->add("FlangeThickness",false,Argument_DOUBLE); + current->add("FilletRadius",true,Argument_DOUBLE); + current->add("EdgeRadius",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcAnnotationCurveOccurrence] = new IfcEntityDescriptor(Type::IfcAnnotationCurveOccurrence,entity_descriptor_map.find(Type::IfcAnnotationOccurrence)->second); + current = entity_descriptor_map[Type::IfcAnnotationFillArea] = new IfcEntityDescriptor(Type::IfcAnnotationFillArea,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("OuterBoundary",false,Argument_ENTITY); + current->add("InnerBoundaries",true,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcAnnotationFillAreaOccurrence] = new IfcEntityDescriptor(Type::IfcAnnotationFillAreaOccurrence,entity_descriptor_map.find(Type::IfcAnnotationOccurrence)->second); + current->add("FillStyleTarget",true,Argument_ENTITY); + current->add("GlobalOrLocal",true,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcAnnotationSurface] = new IfcEntityDescriptor(Type::IfcAnnotationSurface,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Item",false,Argument_ENTITY); + current->add("TextureCoordinates",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcAxis1Placement] = new IfcEntityDescriptor(Type::IfcAxis1Placement,entity_descriptor_map.find(Type::IfcPlacement)->second); + current->add("Axis",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcAxis2Placement2D] = new IfcEntityDescriptor(Type::IfcAxis2Placement2D,entity_descriptor_map.find(Type::IfcPlacement)->second); + current->add("RefDirection",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcAxis2Placement3D] = new IfcEntityDescriptor(Type::IfcAxis2Placement3D,entity_descriptor_map.find(Type::IfcPlacement)->second); + current->add("Axis",true,Argument_ENTITY); + current->add("RefDirection",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcBooleanResult] = new IfcEntityDescriptor(Type::IfcBooleanResult,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Operator",false,Argument_ENUMERATION); + current->add("FirstOperand",false,Argument_ENTITY); + current->add("SecondOperand",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcBoundedSurface] = new IfcEntityDescriptor(Type::IfcBoundedSurface,entity_descriptor_map.find(Type::IfcSurface)->second); + current = entity_descriptor_map[Type::IfcBoundingBox] = new IfcEntityDescriptor(Type::IfcBoundingBox,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Corner",false,Argument_ENTITY); + current->add("XDim",false,Argument_DOUBLE); + current->add("YDim",false,Argument_DOUBLE); + current->add("ZDim",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcBoxedHalfSpace] = new IfcEntityDescriptor(Type::IfcBoxedHalfSpace,entity_descriptor_map.find(Type::IfcHalfSpaceSolid)->second); + current->add("Enclosure",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcCShapeProfileDef] = new IfcEntityDescriptor(Type::IfcCShapeProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("Depth",false,Argument_DOUBLE); + current->add("Width",false,Argument_DOUBLE); + current->add("WallThickness",false,Argument_DOUBLE); + current->add("Girth",false,Argument_DOUBLE); + current->add("InternalFilletRadius",true,Argument_DOUBLE); + current->add("CentreOfGravityInX",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcCartesianPoint] = new IfcEntityDescriptor(Type::IfcCartesianPoint,entity_descriptor_map.find(Type::IfcPoint)->second); + current->add("Coordinates",false,Argument_VECTOR_DOUBLE); + current = entity_descriptor_map[Type::IfcCartesianTransformationOperator] = new IfcEntityDescriptor(Type::IfcCartesianTransformationOperator,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Axis1",true,Argument_ENTITY); + current->add("Axis2",true,Argument_ENTITY); + current->add("LocalOrigin",false,Argument_ENTITY); + current->add("Scale",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcCartesianTransformationOperator2D] = new IfcEntityDescriptor(Type::IfcCartesianTransformationOperator2D,entity_descriptor_map.find(Type::IfcCartesianTransformationOperator)->second); + current = entity_descriptor_map[Type::IfcCartesianTransformationOperator2DnonUniform] = new IfcEntityDescriptor(Type::IfcCartesianTransformationOperator2DnonUniform,entity_descriptor_map.find(Type::IfcCartesianTransformationOperator2D)->second); + current->add("Scale2",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcCartesianTransformationOperator3D] = new IfcEntityDescriptor(Type::IfcCartesianTransformationOperator3D,entity_descriptor_map.find(Type::IfcCartesianTransformationOperator)->second); + current->add("Axis3",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcCartesianTransformationOperator3DnonUniform] = new IfcEntityDescriptor(Type::IfcCartesianTransformationOperator3DnonUniform,entity_descriptor_map.find(Type::IfcCartesianTransformationOperator3D)->second); + current->add("Scale2",true,Argument_DOUBLE); + current->add("Scale3",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcCircleProfileDef] = new IfcEntityDescriptor(Type::IfcCircleProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("Radius",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcClosedShell] = new IfcEntityDescriptor(Type::IfcClosedShell,entity_descriptor_map.find(Type::IfcConnectedFaceSet)->second); + current = entity_descriptor_map[Type::IfcCompositeCurveSegment] = new IfcEntityDescriptor(Type::IfcCompositeCurveSegment,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Transition",false,Argument_ENUMERATION); + current->add("SameSense",false,Argument_BOOL); + current->add("ParentCurve",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcCraneRailAShapeProfileDef] = new IfcEntityDescriptor(Type::IfcCraneRailAShapeProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("OverallHeight",false,Argument_DOUBLE); + current->add("BaseWidth2",false,Argument_DOUBLE); + current->add("Radius",true,Argument_DOUBLE); + current->add("HeadWidth",false,Argument_DOUBLE); + current->add("HeadDepth2",false,Argument_DOUBLE); + current->add("HeadDepth3",false,Argument_DOUBLE); + current->add("WebThickness",false,Argument_DOUBLE); + current->add("BaseWidth4",false,Argument_DOUBLE); + current->add("BaseDepth1",false,Argument_DOUBLE); + current->add("BaseDepth2",false,Argument_DOUBLE); + current->add("BaseDepth3",false,Argument_DOUBLE); + current->add("CentreOfGravityInY",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcCraneRailFShapeProfileDef] = new IfcEntityDescriptor(Type::IfcCraneRailFShapeProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("OverallHeight",false,Argument_DOUBLE); + current->add("HeadWidth",false,Argument_DOUBLE); + current->add("Radius",true,Argument_DOUBLE); + current->add("HeadDepth2",false,Argument_DOUBLE); + current->add("HeadDepth3",false,Argument_DOUBLE); + current->add("WebThickness",false,Argument_DOUBLE); + current->add("BaseDepth1",false,Argument_DOUBLE); + current->add("BaseDepth2",false,Argument_DOUBLE); + current->add("CentreOfGravityInY",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcCsgPrimitive3D] = new IfcEntityDescriptor(Type::IfcCsgPrimitive3D,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Position",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcCsgSolid] = new IfcEntityDescriptor(Type::IfcCsgSolid,entity_descriptor_map.find(Type::IfcSolidModel)->second); + current->add("TreeRootExpression",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcCurve] = new IfcEntityDescriptor(Type::IfcCurve,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current = entity_descriptor_map[Type::IfcCurveBoundedPlane] = new IfcEntityDescriptor(Type::IfcCurveBoundedPlane,entity_descriptor_map.find(Type::IfcBoundedSurface)->second); + current->add("BasisSurface",false,Argument_ENTITY); + current->add("OuterBoundary",false,Argument_ENTITY); + current->add("InnerBoundaries",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcDefinedSymbol] = new IfcEntityDescriptor(Type::IfcDefinedSymbol,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Definition",false,Argument_ENTITY); + current->add("Target",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcDimensionCurve] = new IfcEntityDescriptor(Type::IfcDimensionCurve,entity_descriptor_map.find(Type::IfcAnnotationCurveOccurrence)->second); + current = entity_descriptor_map[Type::IfcDimensionCurveTerminator] = new IfcEntityDescriptor(Type::IfcDimensionCurveTerminator,entity_descriptor_map.find(Type::IfcTerminatorSymbol)->second); + current->add("Role",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcDirection] = new IfcEntityDescriptor(Type::IfcDirection,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("DirectionRatios",false,Argument_VECTOR_DOUBLE); + current = entity_descriptor_map[Type::IfcDoorLiningProperties] = new IfcEntityDescriptor(Type::IfcDoorLiningProperties,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("LiningDepth",true,Argument_DOUBLE); + current->add("LiningThickness",true,Argument_DOUBLE); + current->add("ThresholdDepth",true,Argument_DOUBLE); + current->add("ThresholdThickness",true,Argument_DOUBLE); + current->add("TransomThickness",true,Argument_DOUBLE); + current->add("TransomOffset",true,Argument_DOUBLE); + current->add("LiningOffset",true,Argument_DOUBLE); + current->add("ThresholdOffset",true,Argument_DOUBLE); + current->add("CasingThickness",true,Argument_DOUBLE); + current->add("CasingDepth",true,Argument_DOUBLE); + current->add("ShapeAspectStyle",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcDoorPanelProperties] = new IfcEntityDescriptor(Type::IfcDoorPanelProperties,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("PanelDepth",true,Argument_DOUBLE); + current->add("PanelOperation",false,Argument_ENUMERATION); + current->add("PanelWidth",true,Argument_DOUBLE); + current->add("PanelPosition",false,Argument_ENUMERATION); + current->add("ShapeAspectStyle",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcDoorStyle] = new IfcEntityDescriptor(Type::IfcDoorStyle,entity_descriptor_map.find(Type::IfcTypeProduct)->second); + current->add("OperationType",false,Argument_ENUMERATION); + current->add("ConstructionType",false,Argument_ENUMERATION); + current->add("ParameterTakesPrecedence",false,Argument_BOOL); + current->add("Sizeable",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcDraughtingCallout] = new IfcEntityDescriptor(Type::IfcDraughtingCallout,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Contents",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcDraughtingPreDefinedColour] = new IfcEntityDescriptor(Type::IfcDraughtingPreDefinedColour,entity_descriptor_map.find(Type::IfcPreDefinedColour)->second); + current = entity_descriptor_map[Type::IfcDraughtingPreDefinedCurveFont] = new IfcEntityDescriptor(Type::IfcDraughtingPreDefinedCurveFont,entity_descriptor_map.find(Type::IfcPreDefinedCurveFont)->second); + current = entity_descriptor_map[Type::IfcEdgeLoop] = new IfcEntityDescriptor(Type::IfcEdgeLoop,entity_descriptor_map.find(Type::IfcLoop)->second); + current->add("EdgeList",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcElementQuantity] = new IfcEntityDescriptor(Type::IfcElementQuantity,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("MethodOfMeasurement",true,Argument_STRING); + current->add("Quantities",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcElementType] = new IfcEntityDescriptor(Type::IfcElementType,entity_descriptor_map.find(Type::IfcTypeProduct)->second); + current->add("ElementType",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcElementarySurface] = new IfcEntityDescriptor(Type::IfcElementarySurface,entity_descriptor_map.find(Type::IfcSurface)->second); + current->add("Position",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcEllipseProfileDef] = new IfcEntityDescriptor(Type::IfcEllipseProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("SemiAxis1",false,Argument_DOUBLE); + current->add("SemiAxis2",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcEnergyProperties] = new IfcEntityDescriptor(Type::IfcEnergyProperties,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("EnergySequence",true,Argument_ENUMERATION); + current->add("UserDefinedEnergySequence",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcExtrudedAreaSolid] = new IfcEntityDescriptor(Type::IfcExtrudedAreaSolid,entity_descriptor_map.find(Type::IfcSweptAreaSolid)->second); + current->add("ExtrudedDirection",false,Argument_ENTITY); + current->add("Depth",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcFaceBasedSurfaceModel] = new IfcEntityDescriptor(Type::IfcFaceBasedSurfaceModel,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("FbsmFaces",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcFillAreaStyleHatching] = new IfcEntityDescriptor(Type::IfcFillAreaStyleHatching,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("HatchLineAppearance",false,Argument_ENTITY); + current->add("StartOfNextHatchLine",false,Argument_ENTITY); + current->add("PointOfReferenceHatchLine",true,Argument_ENTITY); + current->add("PatternStart",true,Argument_ENTITY); + current->add("HatchLineAngle",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcFillAreaStyleTileSymbolWithStyle] = new IfcEntityDescriptor(Type::IfcFillAreaStyleTileSymbolWithStyle,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("Symbol",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcFillAreaStyleTiles] = new IfcEntityDescriptor(Type::IfcFillAreaStyleTiles,entity_descriptor_map.find(Type::IfcGeometricRepresentationItem)->second); + current->add("TilingPattern",false,Argument_ENTITY); + current->add("Tiles",false,Argument_ENTITY_LIST); + current->add("TilingScale",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcFluidFlowProperties] = new IfcEntityDescriptor(Type::IfcFluidFlowProperties,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("PropertySource",false,Argument_ENUMERATION); + current->add("FlowConditionTimeSeries",true,Argument_ENTITY); + current->add("VelocityTimeSeries",true,Argument_ENTITY); + current->add("FlowrateTimeSeries",true,Argument_ENTITY); + current->add("Fluid",false,Argument_ENTITY); + current->add("PressureTimeSeries",true,Argument_ENTITY); + current->add("UserDefinedPropertySource",true,Argument_STRING); + current->add("TemperatureSingleValue",true,Argument_DOUBLE); + current->add("WetBulbTemperatureSingleValue",true,Argument_DOUBLE); + current->add("WetBulbTemperatureTimeSeries",true,Argument_ENTITY); + current->add("TemperatureTimeSeries",true,Argument_ENTITY); + current->add("FlowrateSingleValue",true,Argument_ENTITY); + current->add("FlowConditionSingleValue",true,Argument_DOUBLE); + current->add("VelocitySingleValue",true,Argument_DOUBLE); + current->add("PressureSingleValue",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcFurnishingElementType] = new IfcEntityDescriptor(Type::IfcFurnishingElementType,entity_descriptor_map.find(Type::IfcElementType)->second); + current = entity_descriptor_map[Type::IfcFurnitureType] = new IfcEntityDescriptor(Type::IfcFurnitureType,entity_descriptor_map.find(Type::IfcFurnishingElementType)->second); + current->add("AssemblyPlace",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcGeometricCurveSet] = new IfcEntityDescriptor(Type::IfcGeometricCurveSet,entity_descriptor_map.find(Type::IfcGeometricSet)->second); + current = entity_descriptor_map[Type::IfcIShapeProfileDef] = new IfcEntityDescriptor(Type::IfcIShapeProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("OverallWidth",false,Argument_DOUBLE); + current->add("OverallDepth",false,Argument_DOUBLE); + current->add("WebThickness",false,Argument_DOUBLE); + current->add("FlangeThickness",false,Argument_DOUBLE); + current->add("FilletRadius",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcLShapeProfileDef] = new IfcEntityDescriptor(Type::IfcLShapeProfileDef,entity_descriptor_map.find(Type::IfcParameterizedProfileDef)->second); + current->add("Depth",false,Argument_DOUBLE); + current->add("Width",true,Argument_DOUBLE); + current->add("Thickness",false,Argument_DOUBLE); + current->add("FilletRadius",true,Argument_DOUBLE); + current->add("EdgeRadius",true,Argument_DOUBLE); + current->add("LegSlope",true,Argument_DOUBLE); + current->add("CentreOfGravityInX",true,Argument_DOUBLE); + current->add("CentreOfGravityInY",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcLine] = new IfcEntityDescriptor(Type::IfcLine,entity_descriptor_map.find(Type::IfcCurve)->second); + current->add("Pnt",false,Argument_ENTITY); + current->add("Dir",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcManifoldSolidBrep] = new IfcEntityDescriptor(Type::IfcManifoldSolidBrep,entity_descriptor_map.find(Type::IfcSolidModel)->second); + current->add("Outer",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcObject] = new IfcEntityDescriptor(Type::IfcObject,entity_descriptor_map.find(Type::IfcObjectDefinition)->second); + current->add("ObjectType",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcOffsetCurve2D] = new IfcEntityDescriptor(Type::IfcOffsetCurve2D,entity_descriptor_map.find(Type::IfcCurve)->second); + current->add("BasisCurve",false,Argument_ENTITY); + current->add("Distance",false,Argument_DOUBLE); + current->add("SelfIntersect",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcOffsetCurve3D] = new IfcEntityDescriptor(Type::IfcOffsetCurve3D,entity_descriptor_map.find(Type::IfcCurve)->second); + current->add("BasisCurve",false,Argument_ENTITY); + current->add("Distance",false,Argument_DOUBLE); + current->add("SelfIntersect",false,Argument_BOOL); + current->add("RefDirection",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPermeableCoveringProperties] = new IfcEntityDescriptor(Type::IfcPermeableCoveringProperties,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("OperationType",false,Argument_ENUMERATION); + current->add("PanelPosition",false,Argument_ENUMERATION); + current->add("FrameDepth",true,Argument_DOUBLE); + current->add("FrameThickness",true,Argument_DOUBLE); + current->add("ShapeAspectStyle",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPlanarBox] = new IfcEntityDescriptor(Type::IfcPlanarBox,entity_descriptor_map.find(Type::IfcPlanarExtent)->second); + current->add("Placement",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcPlane] = new IfcEntityDescriptor(Type::IfcPlane,entity_descriptor_map.find(Type::IfcElementarySurface)->second); + current = entity_descriptor_map[Type::IfcProcess] = new IfcEntityDescriptor(Type::IfcProcess,entity_descriptor_map.find(Type::IfcObject)->second); + current = entity_descriptor_map[Type::IfcProduct] = new IfcEntityDescriptor(Type::IfcProduct,entity_descriptor_map.find(Type::IfcObject)->second); + current->add("ObjectPlacement",true,Argument_ENTITY); + current->add("Representation",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcProject] = new IfcEntityDescriptor(Type::IfcProject,entity_descriptor_map.find(Type::IfcObject)->second); + current->add("LongName",true,Argument_STRING); + current->add("Phase",true,Argument_STRING); + current->add("RepresentationContexts",false,Argument_ENTITY_LIST); + current->add("UnitsInContext",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcProjectionCurve] = new IfcEntityDescriptor(Type::IfcProjectionCurve,entity_descriptor_map.find(Type::IfcAnnotationCurveOccurrence)->second); + current = entity_descriptor_map[Type::IfcPropertySet] = new IfcEntityDescriptor(Type::IfcPropertySet,entity_descriptor_map.find(Type::IfcPropertySetDefinition)->second); + current->add("HasProperties",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcProxy] = new IfcEntityDescriptor(Type::IfcProxy,entity_descriptor_map.find(Type::IfcProduct)->second); + current->add("ProxyType",false,Argument_ENUMERATION); + current->add("Tag",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcRectangleHollowProfileDef] = new IfcEntityDescriptor(Type::IfcRectangleHollowProfileDef,entity_descriptor_map.find(Type::IfcRectangleProfileDef)->second); + current->add("WallThickness",false,Argument_DOUBLE); + current->add("InnerFilletRadius",true,Argument_DOUBLE); + current->add("OuterFilletRadius",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcRectangularPyramid] = new IfcEntityDescriptor(Type::IfcRectangularPyramid,entity_descriptor_map.find(Type::IfcCsgPrimitive3D)->second); + current->add("XLength",false,Argument_DOUBLE); + current->add("YLength",false,Argument_DOUBLE); + current->add("Height",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcRectangularTrimmedSurface] = new IfcEntityDescriptor(Type::IfcRectangularTrimmedSurface,entity_descriptor_map.find(Type::IfcBoundedSurface)->second); + current->add("BasisSurface",false,Argument_ENTITY); + current->add("U1",false,Argument_DOUBLE); + current->add("V1",false,Argument_DOUBLE); + current->add("U2",false,Argument_DOUBLE); + current->add("V2",false,Argument_DOUBLE); + current->add("Usense",false,Argument_BOOL); + current->add("Vsense",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcRelAssigns] = new IfcEntityDescriptor(Type::IfcRelAssigns,entity_descriptor_map.find(Type::IfcRelationship)->second); + current->add("RelatedObjects",false,Argument_ENTITY_LIST); + current->add("RelatedObjectsType",true,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRelAssignsToActor] = new IfcEntityDescriptor(Type::IfcRelAssignsToActor,entity_descriptor_map.find(Type::IfcRelAssigns)->second); + current->add("RelatingActor",false,Argument_ENTITY); + current->add("ActingRole",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssignsToControl] = new IfcEntityDescriptor(Type::IfcRelAssignsToControl,entity_descriptor_map.find(Type::IfcRelAssigns)->second); + current->add("RelatingControl",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssignsToGroup] = new IfcEntityDescriptor(Type::IfcRelAssignsToGroup,entity_descriptor_map.find(Type::IfcRelAssigns)->second); + current->add("RelatingGroup",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssignsToProcess] = new IfcEntityDescriptor(Type::IfcRelAssignsToProcess,entity_descriptor_map.find(Type::IfcRelAssigns)->second); + current->add("RelatingProcess",false,Argument_ENTITY); + current->add("QuantityInProcess",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssignsToProduct] = new IfcEntityDescriptor(Type::IfcRelAssignsToProduct,entity_descriptor_map.find(Type::IfcRelAssigns)->second); + current->add("RelatingProduct",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssignsToProjectOrder] = new IfcEntityDescriptor(Type::IfcRelAssignsToProjectOrder,entity_descriptor_map.find(Type::IfcRelAssignsToControl)->second); + current = entity_descriptor_map[Type::IfcRelAssignsToResource] = new IfcEntityDescriptor(Type::IfcRelAssignsToResource,entity_descriptor_map.find(Type::IfcRelAssigns)->second); + current->add("RelatingResource",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssociates] = new IfcEntityDescriptor(Type::IfcRelAssociates,entity_descriptor_map.find(Type::IfcRelationship)->second); + current->add("RelatedObjects",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcRelAssociatesAppliedValue] = new IfcEntityDescriptor(Type::IfcRelAssociatesAppliedValue,entity_descriptor_map.find(Type::IfcRelAssociates)->second); + current->add("RelatingAppliedValue",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssociatesApproval] = new IfcEntityDescriptor(Type::IfcRelAssociatesApproval,entity_descriptor_map.find(Type::IfcRelAssociates)->second); + current->add("RelatingApproval",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssociatesClassification] = new IfcEntityDescriptor(Type::IfcRelAssociatesClassification,entity_descriptor_map.find(Type::IfcRelAssociates)->second); + current->add("RelatingClassification",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssociatesConstraint] = new IfcEntityDescriptor(Type::IfcRelAssociatesConstraint,entity_descriptor_map.find(Type::IfcRelAssociates)->second); + current->add("Intent",false,Argument_STRING); + current->add("RelatingConstraint",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssociatesDocument] = new IfcEntityDescriptor(Type::IfcRelAssociatesDocument,entity_descriptor_map.find(Type::IfcRelAssociates)->second); + current->add("RelatingDocument",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssociatesLibrary] = new IfcEntityDescriptor(Type::IfcRelAssociatesLibrary,entity_descriptor_map.find(Type::IfcRelAssociates)->second); + current->add("RelatingLibrary",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssociatesMaterial] = new IfcEntityDescriptor(Type::IfcRelAssociatesMaterial,entity_descriptor_map.find(Type::IfcRelAssociates)->second); + current->add("RelatingMaterial",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelAssociatesProfileProperties] = new IfcEntityDescriptor(Type::IfcRelAssociatesProfileProperties,entity_descriptor_map.find(Type::IfcRelAssociates)->second); + current->add("RelatingProfileProperties",false,Argument_ENTITY); + current->add("ProfileSectionLocation",true,Argument_ENTITY); + current->add("ProfileOrientation",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelConnects] = new IfcEntityDescriptor(Type::IfcRelConnects,entity_descriptor_map.find(Type::IfcRelationship)->second); + current = entity_descriptor_map[Type::IfcRelConnectsElements] = new IfcEntityDescriptor(Type::IfcRelConnectsElements,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("ConnectionGeometry",true,Argument_ENTITY); + current->add("RelatingElement",false,Argument_ENTITY); + current->add("RelatedElement",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelConnectsPathElements] = new IfcEntityDescriptor(Type::IfcRelConnectsPathElements,entity_descriptor_map.find(Type::IfcRelConnectsElements)->second); + current->add("RelatingPriorities",false,Argument_VECTOR_INT); + current->add("RelatedPriorities",false,Argument_VECTOR_INT); + current->add("RelatedConnectionType",false,Argument_ENUMERATION); + current->add("RelatingConnectionType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRelConnectsPortToElement] = new IfcEntityDescriptor(Type::IfcRelConnectsPortToElement,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingPort",false,Argument_ENTITY); + current->add("RelatedElement",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelConnectsPorts] = new IfcEntityDescriptor(Type::IfcRelConnectsPorts,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingPort",false,Argument_ENTITY); + current->add("RelatedPort",false,Argument_ENTITY); + current->add("RealizingElement",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelConnectsStructuralActivity] = new IfcEntityDescriptor(Type::IfcRelConnectsStructuralActivity,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingElement",false,Argument_ENTITY); + current->add("RelatedStructuralActivity",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelConnectsStructuralElement] = new IfcEntityDescriptor(Type::IfcRelConnectsStructuralElement,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingElement",false,Argument_ENTITY); + current->add("RelatedStructuralMember",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelConnectsStructuralMember] = new IfcEntityDescriptor(Type::IfcRelConnectsStructuralMember,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingStructuralMember",false,Argument_ENTITY); + current->add("RelatedStructuralConnection",false,Argument_ENTITY); + current->add("AppliedCondition",true,Argument_ENTITY); + current->add("AdditionalConditions",true,Argument_ENTITY); + current->add("SupportedLength",true,Argument_DOUBLE); + current->add("ConditionCoordinateSystem",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelConnectsWithEccentricity] = new IfcEntityDescriptor(Type::IfcRelConnectsWithEccentricity,entity_descriptor_map.find(Type::IfcRelConnectsStructuralMember)->second); + current->add("ConnectionConstraint",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelConnectsWithRealizingElements] = new IfcEntityDescriptor(Type::IfcRelConnectsWithRealizingElements,entity_descriptor_map.find(Type::IfcRelConnectsElements)->second); + current->add("RealizingElements",false,Argument_ENTITY_LIST); + current->add("ConnectionType",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcRelContainedInSpatialStructure] = new IfcEntityDescriptor(Type::IfcRelContainedInSpatialStructure,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatedElements",false,Argument_ENTITY_LIST); + current->add("RelatingStructure",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelCoversBldgElements] = new IfcEntityDescriptor(Type::IfcRelCoversBldgElements,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingBuildingElement",false,Argument_ENTITY); + current->add("RelatedCoverings",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcRelCoversSpaces] = new IfcEntityDescriptor(Type::IfcRelCoversSpaces,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatedSpace",false,Argument_ENTITY); + current->add("RelatedCoverings",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcRelDecomposes] = new IfcEntityDescriptor(Type::IfcRelDecomposes,entity_descriptor_map.find(Type::IfcRelationship)->second); + current->add("RelatingObject",false,Argument_ENTITY); + current->add("RelatedObjects",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcRelDefines] = new IfcEntityDescriptor(Type::IfcRelDefines,entity_descriptor_map.find(Type::IfcRelationship)->second); + current->add("RelatedObjects",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcRelDefinesByProperties] = new IfcEntityDescriptor(Type::IfcRelDefinesByProperties,entity_descriptor_map.find(Type::IfcRelDefines)->second); + current->add("RelatingPropertyDefinition",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelDefinesByType] = new IfcEntityDescriptor(Type::IfcRelDefinesByType,entity_descriptor_map.find(Type::IfcRelDefines)->second); + current->add("RelatingType",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelFillsElement] = new IfcEntityDescriptor(Type::IfcRelFillsElement,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingOpeningElement",false,Argument_ENTITY); + current->add("RelatedBuildingElement",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelFlowControlElements] = new IfcEntityDescriptor(Type::IfcRelFlowControlElements,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatedControlElements",false,Argument_ENTITY_LIST); + current->add("RelatingFlowElement",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelInteractionRequirements] = new IfcEntityDescriptor(Type::IfcRelInteractionRequirements,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("DailyInteraction",true,Argument_DOUBLE); + current->add("ImportanceRating",true,Argument_DOUBLE); + current->add("LocationOfInteraction",true,Argument_ENTITY); + current->add("RelatedSpaceProgram",false,Argument_ENTITY); + current->add("RelatingSpaceProgram",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelNests] = new IfcEntityDescriptor(Type::IfcRelNests,entity_descriptor_map.find(Type::IfcRelDecomposes)->second); + current = entity_descriptor_map[Type::IfcRelOccupiesSpaces] = new IfcEntityDescriptor(Type::IfcRelOccupiesSpaces,entity_descriptor_map.find(Type::IfcRelAssignsToActor)->second); + current = entity_descriptor_map[Type::IfcRelOverridesProperties] = new IfcEntityDescriptor(Type::IfcRelOverridesProperties,entity_descriptor_map.find(Type::IfcRelDefinesByProperties)->second); + current->add("OverridingProperties",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcRelProjectsElement] = new IfcEntityDescriptor(Type::IfcRelProjectsElement,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingElement",false,Argument_ENTITY); + current->add("RelatedFeatureElement",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelReferencedInSpatialStructure] = new IfcEntityDescriptor(Type::IfcRelReferencedInSpatialStructure,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatedElements",false,Argument_ENTITY_LIST); + current->add("RelatingStructure",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcRelSchedulesCostItems] = new IfcEntityDescriptor(Type::IfcRelSchedulesCostItems,entity_descriptor_map.find(Type::IfcRelAssignsToControl)->second); + current = entity_descriptor_map[Type::IfcRelSequence] = new IfcEntityDescriptor(Type::IfcRelSequence,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingProcess",false,Argument_ENTITY); + current->add("RelatedProcess",false,Argument_ENTITY); + current->add("TimeLag",false,Argument_DOUBLE); + current->add("SequenceType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRelServicesBuildings] = new IfcEntityDescriptor(Type::IfcRelServicesBuildings,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingSystem",false,Argument_ENTITY); + current->add("RelatedBuildings",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcRelSpaceBoundary] = new IfcEntityDescriptor(Type::IfcRelSpaceBoundary,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingSpace",false,Argument_ENTITY); + current->add("RelatedBuildingElement",true,Argument_ENTITY); + current->add("ConnectionGeometry",true,Argument_ENTITY); + current->add("PhysicalOrVirtualBoundary",false,Argument_ENUMERATION); + current->add("InternalOrExternalBoundary",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRelVoidsElement] = new IfcEntityDescriptor(Type::IfcRelVoidsElement,entity_descriptor_map.find(Type::IfcRelConnects)->second); + current->add("RelatingBuildingElement",false,Argument_ENTITY); + current->add("RelatedOpeningElement",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcResource] = new IfcEntityDescriptor(Type::IfcResource,entity_descriptor_map.find(Type::IfcObject)->second); + current = entity_descriptor_map[Type::IfcRevolvedAreaSolid] = new IfcEntityDescriptor(Type::IfcRevolvedAreaSolid,entity_descriptor_map.find(Type::IfcSweptAreaSolid)->second); + current->add("Axis",false,Argument_ENTITY); + current->add("Angle",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcRightCircularCone] = new IfcEntityDescriptor(Type::IfcRightCircularCone,entity_descriptor_map.find(Type::IfcCsgPrimitive3D)->second); + current->add("Height",false,Argument_DOUBLE); + current->add("BottomRadius",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcRightCircularCylinder] = new IfcEntityDescriptor(Type::IfcRightCircularCylinder,entity_descriptor_map.find(Type::IfcCsgPrimitive3D)->second); + current->add("Height",false,Argument_DOUBLE); + current->add("Radius",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSpatialStructureElement] = new IfcEntityDescriptor(Type::IfcSpatialStructureElement,entity_descriptor_map.find(Type::IfcProduct)->second); + current->add("LongName",true,Argument_STRING); + current->add("CompositionType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcSpatialStructureElementType] = new IfcEntityDescriptor(Type::IfcSpatialStructureElementType,entity_descriptor_map.find(Type::IfcElementType)->second); + current = entity_descriptor_map[Type::IfcSphere] = new IfcEntityDescriptor(Type::IfcSphere,entity_descriptor_map.find(Type::IfcCsgPrimitive3D)->second); + current->add("Radius",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStructuralActivity] = new IfcEntityDescriptor(Type::IfcStructuralActivity,entity_descriptor_map.find(Type::IfcProduct)->second); + current->add("AppliedLoad",false,Argument_ENTITY); + current->add("GlobalOrLocal",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcStructuralItem] = new IfcEntityDescriptor(Type::IfcStructuralItem,entity_descriptor_map.find(Type::IfcProduct)->second); + current = entity_descriptor_map[Type::IfcStructuralMember] = new IfcEntityDescriptor(Type::IfcStructuralMember,entity_descriptor_map.find(Type::IfcStructuralItem)->second); + current = entity_descriptor_map[Type::IfcStructuralReaction] = new IfcEntityDescriptor(Type::IfcStructuralReaction,entity_descriptor_map.find(Type::IfcStructuralActivity)->second); + current = entity_descriptor_map[Type::IfcStructuralSurfaceMember] = new IfcEntityDescriptor(Type::IfcStructuralSurfaceMember,entity_descriptor_map.find(Type::IfcStructuralMember)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current->add("Thickness",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStructuralSurfaceMemberVarying] = new IfcEntityDescriptor(Type::IfcStructuralSurfaceMemberVarying,entity_descriptor_map.find(Type::IfcStructuralSurfaceMember)->second); + current->add("SubsequentThickness",false,Argument_VECTOR_DOUBLE); + current->add("VaryingThicknessLocation",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcStructuredDimensionCallout] = new IfcEntityDescriptor(Type::IfcStructuredDimensionCallout,entity_descriptor_map.find(Type::IfcDraughtingCallout)->second); + current = entity_descriptor_map[Type::IfcSurfaceCurveSweptAreaSolid] = new IfcEntityDescriptor(Type::IfcSurfaceCurveSweptAreaSolid,entity_descriptor_map.find(Type::IfcSweptAreaSolid)->second); + current->add("Directrix",false,Argument_ENTITY); + current->add("StartParam",false,Argument_DOUBLE); + current->add("EndParam",false,Argument_DOUBLE); + current->add("ReferenceSurface",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSurfaceOfLinearExtrusion] = new IfcEntityDescriptor(Type::IfcSurfaceOfLinearExtrusion,entity_descriptor_map.find(Type::IfcSweptSurface)->second); + current->add("ExtrudedDirection",false,Argument_ENTITY); + current->add("Depth",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSurfaceOfRevolution] = new IfcEntityDescriptor(Type::IfcSurfaceOfRevolution,entity_descriptor_map.find(Type::IfcSweptSurface)->second); + current->add("AxisPosition",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSystemFurnitureElementType] = new IfcEntityDescriptor(Type::IfcSystemFurnitureElementType,entity_descriptor_map.find(Type::IfcFurnishingElementType)->second); + current = entity_descriptor_map[Type::IfcTask] = new IfcEntityDescriptor(Type::IfcTask,entity_descriptor_map.find(Type::IfcProcess)->second); + current->add("TaskId",false,Argument_STRING); + current->add("Status",true,Argument_STRING); + current->add("WorkMethod",true,Argument_STRING); + current->add("IsMilestone",false,Argument_BOOL); + current->add("Priority",true,Argument_INT); + current = entity_descriptor_map[Type::IfcTransportElementType] = new IfcEntityDescriptor(Type::IfcTransportElementType,entity_descriptor_map.find(Type::IfcElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcActor] = new IfcEntityDescriptor(Type::IfcActor,entity_descriptor_map.find(Type::IfcObject)->second); + current->add("TheActor",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcAnnotation] = new IfcEntityDescriptor(Type::IfcAnnotation,entity_descriptor_map.find(Type::IfcProduct)->second); + current = entity_descriptor_map[Type::IfcAsymmetricIShapeProfileDef] = new IfcEntityDescriptor(Type::IfcAsymmetricIShapeProfileDef,entity_descriptor_map.find(Type::IfcIShapeProfileDef)->second); + current->add("TopFlangeWidth",false,Argument_DOUBLE); + current->add("TopFlangeThickness",true,Argument_DOUBLE); + current->add("TopFlangeFilletRadius",true,Argument_DOUBLE); + current->add("CentreOfGravityInY",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcBlock] = new IfcEntityDescriptor(Type::IfcBlock,entity_descriptor_map.find(Type::IfcCsgPrimitive3D)->second); + current->add("XLength",false,Argument_DOUBLE); + current->add("YLength",false,Argument_DOUBLE); + current->add("ZLength",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcBooleanClippingResult] = new IfcEntityDescriptor(Type::IfcBooleanClippingResult,entity_descriptor_map.find(Type::IfcBooleanResult)->second); + current = entity_descriptor_map[Type::IfcBoundedCurve] = new IfcEntityDescriptor(Type::IfcBoundedCurve,entity_descriptor_map.find(Type::IfcCurve)->second); + current = entity_descriptor_map[Type::IfcBuilding] = new IfcEntityDescriptor(Type::IfcBuilding,entity_descriptor_map.find(Type::IfcSpatialStructureElement)->second); + current->add("ElevationOfRefHeight",true,Argument_DOUBLE); + current->add("ElevationOfTerrain",true,Argument_DOUBLE); + current->add("BuildingAddress",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcBuildingElementType] = new IfcEntityDescriptor(Type::IfcBuildingElementType,entity_descriptor_map.find(Type::IfcElementType)->second); + current = entity_descriptor_map[Type::IfcBuildingStorey] = new IfcEntityDescriptor(Type::IfcBuildingStorey,entity_descriptor_map.find(Type::IfcSpatialStructureElement)->second); + current->add("Elevation",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcCircleHollowProfileDef] = new IfcEntityDescriptor(Type::IfcCircleHollowProfileDef,entity_descriptor_map.find(Type::IfcCircleProfileDef)->second); + current->add("WallThickness",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcColumnType] = new IfcEntityDescriptor(Type::IfcColumnType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCompositeCurve] = new IfcEntityDescriptor(Type::IfcCompositeCurve,entity_descriptor_map.find(Type::IfcBoundedCurve)->second); + current->add("Segments",false,Argument_ENTITY_LIST); + current->add("SelfIntersect",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcConic] = new IfcEntityDescriptor(Type::IfcConic,entity_descriptor_map.find(Type::IfcCurve)->second); + current->add("Position",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcConstructionResource] = new IfcEntityDescriptor(Type::IfcConstructionResource,entity_descriptor_map.find(Type::IfcResource)->second); + current->add("ResourceIdentifier",true,Argument_STRING); + current->add("ResourceGroup",true,Argument_STRING); + current->add("ResourceConsumption",true,Argument_ENUMERATION); + current->add("BaseQuantity",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcControl] = new IfcEntityDescriptor(Type::IfcControl,entity_descriptor_map.find(Type::IfcObject)->second); + current = entity_descriptor_map[Type::IfcCostItem] = new IfcEntityDescriptor(Type::IfcCostItem,entity_descriptor_map.find(Type::IfcControl)->second); + current = entity_descriptor_map[Type::IfcCostSchedule] = new IfcEntityDescriptor(Type::IfcCostSchedule,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("SubmittedBy",true,Argument_ENTITY); + current->add("PreparedBy",true,Argument_ENTITY); + current->add("SubmittedOn",true,Argument_ENTITY); + current->add("Status",true,Argument_STRING); + current->add("TargetUsers",true,Argument_ENTITY_LIST); + current->add("UpdateDate",true,Argument_ENTITY); + current->add("ID",false,Argument_STRING); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCoveringType] = new IfcEntityDescriptor(Type::IfcCoveringType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCrewResource] = new IfcEntityDescriptor(Type::IfcCrewResource,entity_descriptor_map.find(Type::IfcConstructionResource)->second); + current = entity_descriptor_map[Type::IfcCurtainWallType] = new IfcEntityDescriptor(Type::IfcCurtainWallType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcDimensionCurveDirectedCallout] = new IfcEntityDescriptor(Type::IfcDimensionCurveDirectedCallout,entity_descriptor_map.find(Type::IfcDraughtingCallout)->second); + current = entity_descriptor_map[Type::IfcDistributionElementType] = new IfcEntityDescriptor(Type::IfcDistributionElementType,entity_descriptor_map.find(Type::IfcElementType)->second); + current = entity_descriptor_map[Type::IfcDistributionFlowElementType] = new IfcEntityDescriptor(Type::IfcDistributionFlowElementType,entity_descriptor_map.find(Type::IfcDistributionElementType)->second); + current = entity_descriptor_map[Type::IfcElectricalBaseProperties] = new IfcEntityDescriptor(Type::IfcElectricalBaseProperties,entity_descriptor_map.find(Type::IfcEnergyProperties)->second); + current->add("ElectricCurrentType",true,Argument_ENUMERATION); + current->add("InputVoltage",false,Argument_DOUBLE); + current->add("InputFrequency",false,Argument_DOUBLE); + current->add("FullLoadCurrent",true,Argument_DOUBLE); + current->add("MinimumCircuitCurrent",true,Argument_DOUBLE); + current->add("MaximumPowerInput",true,Argument_DOUBLE); + current->add("RatedPowerInput",true,Argument_DOUBLE); + current->add("InputPhase",false,Argument_INT); + current = entity_descriptor_map[Type::IfcElement] = new IfcEntityDescriptor(Type::IfcElement,entity_descriptor_map.find(Type::IfcProduct)->second); + current->add("Tag",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcElementAssembly] = new IfcEntityDescriptor(Type::IfcElementAssembly,entity_descriptor_map.find(Type::IfcElement)->second); + current->add("AssemblyPlace",true,Argument_ENUMERATION); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcElementComponent] = new IfcEntityDescriptor(Type::IfcElementComponent,entity_descriptor_map.find(Type::IfcElement)->second); + current = entity_descriptor_map[Type::IfcElementComponentType] = new IfcEntityDescriptor(Type::IfcElementComponentType,entity_descriptor_map.find(Type::IfcElementType)->second); + current = entity_descriptor_map[Type::IfcEllipse] = new IfcEntityDescriptor(Type::IfcEllipse,entity_descriptor_map.find(Type::IfcConic)->second); + current->add("SemiAxis1",false,Argument_DOUBLE); + current->add("SemiAxis2",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcEnergyConversionDeviceType] = new IfcEntityDescriptor(Type::IfcEnergyConversionDeviceType,entity_descriptor_map.find(Type::IfcDistributionFlowElementType)->second); + current = entity_descriptor_map[Type::IfcEquipmentElement] = new IfcEntityDescriptor(Type::IfcEquipmentElement,entity_descriptor_map.find(Type::IfcElement)->second); + current = entity_descriptor_map[Type::IfcEquipmentStandard] = new IfcEntityDescriptor(Type::IfcEquipmentStandard,entity_descriptor_map.find(Type::IfcControl)->second); + current = entity_descriptor_map[Type::IfcEvaporativeCoolerType] = new IfcEntityDescriptor(Type::IfcEvaporativeCoolerType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcEvaporatorType] = new IfcEntityDescriptor(Type::IfcEvaporatorType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcFacetedBrep] = new IfcEntityDescriptor(Type::IfcFacetedBrep,entity_descriptor_map.find(Type::IfcManifoldSolidBrep)->second); + current = entity_descriptor_map[Type::IfcFacetedBrepWithVoids] = new IfcEntityDescriptor(Type::IfcFacetedBrepWithVoids,entity_descriptor_map.find(Type::IfcManifoldSolidBrep)->second); + current->add("Voids",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcFastener] = new IfcEntityDescriptor(Type::IfcFastener,entity_descriptor_map.find(Type::IfcElementComponent)->second); + current = entity_descriptor_map[Type::IfcFastenerType] = new IfcEntityDescriptor(Type::IfcFastenerType,entity_descriptor_map.find(Type::IfcElementComponentType)->second); + current = entity_descriptor_map[Type::IfcFeatureElement] = new IfcEntityDescriptor(Type::IfcFeatureElement,entity_descriptor_map.find(Type::IfcElement)->second); + current = entity_descriptor_map[Type::IfcFeatureElementAddition] = new IfcEntityDescriptor(Type::IfcFeatureElementAddition,entity_descriptor_map.find(Type::IfcFeatureElement)->second); + current = entity_descriptor_map[Type::IfcFeatureElementSubtraction] = new IfcEntityDescriptor(Type::IfcFeatureElementSubtraction,entity_descriptor_map.find(Type::IfcFeatureElement)->second); + current = entity_descriptor_map[Type::IfcFlowControllerType] = new IfcEntityDescriptor(Type::IfcFlowControllerType,entity_descriptor_map.find(Type::IfcDistributionFlowElementType)->second); + current = entity_descriptor_map[Type::IfcFlowFittingType] = new IfcEntityDescriptor(Type::IfcFlowFittingType,entity_descriptor_map.find(Type::IfcDistributionFlowElementType)->second); + current = entity_descriptor_map[Type::IfcFlowMeterType] = new IfcEntityDescriptor(Type::IfcFlowMeterType,entity_descriptor_map.find(Type::IfcFlowControllerType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcFlowMovingDeviceType] = new IfcEntityDescriptor(Type::IfcFlowMovingDeviceType,entity_descriptor_map.find(Type::IfcDistributionFlowElementType)->second); + current = entity_descriptor_map[Type::IfcFlowSegmentType] = new IfcEntityDescriptor(Type::IfcFlowSegmentType,entity_descriptor_map.find(Type::IfcDistributionFlowElementType)->second); + current = entity_descriptor_map[Type::IfcFlowStorageDeviceType] = new IfcEntityDescriptor(Type::IfcFlowStorageDeviceType,entity_descriptor_map.find(Type::IfcDistributionFlowElementType)->second); + current = entity_descriptor_map[Type::IfcFlowTerminalType] = new IfcEntityDescriptor(Type::IfcFlowTerminalType,entity_descriptor_map.find(Type::IfcDistributionFlowElementType)->second); + current = entity_descriptor_map[Type::IfcFlowTreatmentDeviceType] = new IfcEntityDescriptor(Type::IfcFlowTreatmentDeviceType,entity_descriptor_map.find(Type::IfcDistributionFlowElementType)->second); + current = entity_descriptor_map[Type::IfcFurnishingElement] = new IfcEntityDescriptor(Type::IfcFurnishingElement,entity_descriptor_map.find(Type::IfcElement)->second); + current = entity_descriptor_map[Type::IfcFurnitureStandard] = new IfcEntityDescriptor(Type::IfcFurnitureStandard,entity_descriptor_map.find(Type::IfcControl)->second); + current = entity_descriptor_map[Type::IfcGasTerminalType] = new IfcEntityDescriptor(Type::IfcGasTerminalType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcGrid] = new IfcEntityDescriptor(Type::IfcGrid,entity_descriptor_map.find(Type::IfcProduct)->second); + current->add("UAxes",false,Argument_ENTITY_LIST); + current->add("VAxes",false,Argument_ENTITY_LIST); + current->add("WAxes",true,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcGroup] = new IfcEntityDescriptor(Type::IfcGroup,entity_descriptor_map.find(Type::IfcObject)->second); + current = entity_descriptor_map[Type::IfcHeatExchangerType] = new IfcEntityDescriptor(Type::IfcHeatExchangerType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcHumidifierType] = new IfcEntityDescriptor(Type::IfcHumidifierType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcInventory] = new IfcEntityDescriptor(Type::IfcInventory,entity_descriptor_map.find(Type::IfcGroup)->second); + current->add("InventoryType",false,Argument_ENUMERATION); + current->add("Jurisdiction",false,Argument_ENTITY); + current->add("ResponsiblePersons",false,Argument_ENTITY_LIST); + current->add("LastUpdateDate",false,Argument_ENTITY); + current->add("CurrentValue",true,Argument_ENTITY); + current->add("OriginalValue",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcJunctionBoxType] = new IfcEntityDescriptor(Type::IfcJunctionBoxType,entity_descriptor_map.find(Type::IfcFlowFittingType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcLaborResource] = new IfcEntityDescriptor(Type::IfcLaborResource,entity_descriptor_map.find(Type::IfcConstructionResource)->second); + current->add("SkillSet",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcLampType] = new IfcEntityDescriptor(Type::IfcLampType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcLightFixtureType] = new IfcEntityDescriptor(Type::IfcLightFixtureType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcLinearDimension] = new IfcEntityDescriptor(Type::IfcLinearDimension,entity_descriptor_map.find(Type::IfcDimensionCurveDirectedCallout)->second); + current = entity_descriptor_map[Type::IfcMechanicalFastener] = new IfcEntityDescriptor(Type::IfcMechanicalFastener,entity_descriptor_map.find(Type::IfcFastener)->second); + current->add("NominalDiameter",true,Argument_DOUBLE); + current->add("NominalLength",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcMechanicalFastenerType] = new IfcEntityDescriptor(Type::IfcMechanicalFastenerType,entity_descriptor_map.find(Type::IfcFastenerType)->second); + current = entity_descriptor_map[Type::IfcMemberType] = new IfcEntityDescriptor(Type::IfcMemberType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcMotorConnectionType] = new IfcEntityDescriptor(Type::IfcMotorConnectionType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcMove] = new IfcEntityDescriptor(Type::IfcMove,entity_descriptor_map.find(Type::IfcTask)->second); + current->add("MoveFrom",false,Argument_ENTITY); + current->add("MoveTo",false,Argument_ENTITY); + current->add("PunchList",true,Argument_VECTOR_STRING); + current = entity_descriptor_map[Type::IfcOccupant] = new IfcEntityDescriptor(Type::IfcOccupant,entity_descriptor_map.find(Type::IfcActor)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcOpeningElement] = new IfcEntityDescriptor(Type::IfcOpeningElement,entity_descriptor_map.find(Type::IfcFeatureElementSubtraction)->second); + current = entity_descriptor_map[Type::IfcOrderAction] = new IfcEntityDescriptor(Type::IfcOrderAction,entity_descriptor_map.find(Type::IfcTask)->second); + current->add("ActionID",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcOutletType] = new IfcEntityDescriptor(Type::IfcOutletType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcPerformanceHistory] = new IfcEntityDescriptor(Type::IfcPerformanceHistory,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("LifeCyclePhase",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcPermit] = new IfcEntityDescriptor(Type::IfcPermit,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("PermitID",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcPipeFittingType] = new IfcEntityDescriptor(Type::IfcPipeFittingType,entity_descriptor_map.find(Type::IfcFlowFittingType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcPipeSegmentType] = new IfcEntityDescriptor(Type::IfcPipeSegmentType,entity_descriptor_map.find(Type::IfcFlowSegmentType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcPlateType] = new IfcEntityDescriptor(Type::IfcPlateType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcPolyline] = new IfcEntityDescriptor(Type::IfcPolyline,entity_descriptor_map.find(Type::IfcBoundedCurve)->second); + current->add("Points",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcPort] = new IfcEntityDescriptor(Type::IfcPort,entity_descriptor_map.find(Type::IfcProduct)->second); + current = entity_descriptor_map[Type::IfcProcedure] = new IfcEntityDescriptor(Type::IfcProcedure,entity_descriptor_map.find(Type::IfcProcess)->second); + current->add("ProcedureID",false,Argument_STRING); + current->add("ProcedureType",false,Argument_ENUMERATION); + current->add("UserDefinedProcedureType",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcProjectOrder] = new IfcEntityDescriptor(Type::IfcProjectOrder,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("ID",false,Argument_STRING); + current->add("PredefinedType",false,Argument_ENUMERATION); + current->add("Status",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcProjectOrderRecord] = new IfcEntityDescriptor(Type::IfcProjectOrderRecord,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("Records",false,Argument_ENTITY_LIST); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcProjectionElement] = new IfcEntityDescriptor(Type::IfcProjectionElement,entity_descriptor_map.find(Type::IfcFeatureElementAddition)->second); + current = entity_descriptor_map[Type::IfcProtectiveDeviceType] = new IfcEntityDescriptor(Type::IfcProtectiveDeviceType,entity_descriptor_map.find(Type::IfcFlowControllerType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcPumpType] = new IfcEntityDescriptor(Type::IfcPumpType,entity_descriptor_map.find(Type::IfcFlowMovingDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRadiusDimension] = new IfcEntityDescriptor(Type::IfcRadiusDimension,entity_descriptor_map.find(Type::IfcDimensionCurveDirectedCallout)->second); + current = entity_descriptor_map[Type::IfcRailingType] = new IfcEntityDescriptor(Type::IfcRailingType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRampFlightType] = new IfcEntityDescriptor(Type::IfcRampFlightType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRelAggregates] = new IfcEntityDescriptor(Type::IfcRelAggregates,entity_descriptor_map.find(Type::IfcRelDecomposes)->second); + current = entity_descriptor_map[Type::IfcRelAssignsTasks] = new IfcEntityDescriptor(Type::IfcRelAssignsTasks,entity_descriptor_map.find(Type::IfcRelAssignsToControl)->second); + current->add("TimeForTask",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSanitaryTerminalType] = new IfcEntityDescriptor(Type::IfcSanitaryTerminalType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcScheduleTimeControl] = new IfcEntityDescriptor(Type::IfcScheduleTimeControl,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("ActualStart",true,Argument_ENTITY); + current->add("EarlyStart",true,Argument_ENTITY); + current->add("LateStart",true,Argument_ENTITY); + current->add("ScheduleStart",true,Argument_ENTITY); + current->add("ActualFinish",true,Argument_ENTITY); + current->add("EarlyFinish",true,Argument_ENTITY); + current->add("LateFinish",true,Argument_ENTITY); + current->add("ScheduleFinish",true,Argument_ENTITY); + current->add("ScheduleDuration",true,Argument_DOUBLE); + current->add("ActualDuration",true,Argument_DOUBLE); + current->add("RemainingTime",true,Argument_DOUBLE); + current->add("FreeFloat",true,Argument_DOUBLE); + current->add("TotalFloat",true,Argument_DOUBLE); + current->add("IsCritical",true,Argument_BOOL); + current->add("StatusTime",true,Argument_ENTITY); + current->add("StartFloat",true,Argument_DOUBLE); + current->add("FinishFloat",true,Argument_DOUBLE); + current->add("Completion",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcServiceLife] = new IfcEntityDescriptor(Type::IfcServiceLife,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("ServiceLifeType",false,Argument_ENUMERATION); + current->add("ServiceLifeDuration",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSite] = new IfcEntityDescriptor(Type::IfcSite,entity_descriptor_map.find(Type::IfcSpatialStructureElement)->second); + current->add("RefLatitude",true,Argument_VECTOR_INT); + current->add("RefLongitude",true,Argument_VECTOR_INT); + current->add("RefElevation",true,Argument_DOUBLE); + current->add("LandTitleNumber",true,Argument_STRING); + current->add("SiteAddress",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcSlabType] = new IfcEntityDescriptor(Type::IfcSlabType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcSpace] = new IfcEntityDescriptor(Type::IfcSpace,entity_descriptor_map.find(Type::IfcSpatialStructureElement)->second); + current->add("InteriorOrExteriorSpace",false,Argument_ENUMERATION); + current->add("ElevationWithFlooring",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSpaceHeaterType] = new IfcEntityDescriptor(Type::IfcSpaceHeaterType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcSpaceProgram] = new IfcEntityDescriptor(Type::IfcSpaceProgram,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("SpaceProgramIdentifier",false,Argument_STRING); + current->add("MaxRequiredArea",true,Argument_DOUBLE); + current->add("MinRequiredArea",true,Argument_DOUBLE); + current->add("RequestedLocation",true,Argument_ENTITY); + current->add("StandardRequiredArea",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSpaceType] = new IfcEntityDescriptor(Type::IfcSpaceType,entity_descriptor_map.find(Type::IfcSpatialStructureElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcStackTerminalType] = new IfcEntityDescriptor(Type::IfcStackTerminalType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcStairFlightType] = new IfcEntityDescriptor(Type::IfcStairFlightType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcStructuralAction] = new IfcEntityDescriptor(Type::IfcStructuralAction,entity_descriptor_map.find(Type::IfcStructuralActivity)->second); + current->add("DestabilizingLoad",false,Argument_BOOL); + current->add("CausedBy",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcStructuralConnection] = new IfcEntityDescriptor(Type::IfcStructuralConnection,entity_descriptor_map.find(Type::IfcStructuralItem)->second); + current->add("AppliedCondition",true,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcStructuralCurveConnection] = new IfcEntityDescriptor(Type::IfcStructuralCurveConnection,entity_descriptor_map.find(Type::IfcStructuralConnection)->second); + current = entity_descriptor_map[Type::IfcStructuralCurveMember] = new IfcEntityDescriptor(Type::IfcStructuralCurveMember,entity_descriptor_map.find(Type::IfcStructuralMember)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcStructuralCurveMemberVarying] = new IfcEntityDescriptor(Type::IfcStructuralCurveMemberVarying,entity_descriptor_map.find(Type::IfcStructuralCurveMember)->second); + current = entity_descriptor_map[Type::IfcStructuralLinearAction] = new IfcEntityDescriptor(Type::IfcStructuralLinearAction,entity_descriptor_map.find(Type::IfcStructuralAction)->second); + current->add("ProjectedOrTrue",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcStructuralLinearActionVarying] = new IfcEntityDescriptor(Type::IfcStructuralLinearActionVarying,entity_descriptor_map.find(Type::IfcStructuralLinearAction)->second); + current->add("VaryingAppliedLoadLocation",false,Argument_ENTITY); + current->add("SubsequentAppliedLoads",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcStructuralLoadGroup] = new IfcEntityDescriptor(Type::IfcStructuralLoadGroup,entity_descriptor_map.find(Type::IfcGroup)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current->add("ActionType",false,Argument_ENUMERATION); + current->add("ActionSource",false,Argument_ENUMERATION); + current->add("Coefficient",true,Argument_DOUBLE); + current->add("Purpose",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcStructuralPlanarAction] = new IfcEntityDescriptor(Type::IfcStructuralPlanarAction,entity_descriptor_map.find(Type::IfcStructuralAction)->second); + current->add("ProjectedOrTrue",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcStructuralPlanarActionVarying] = new IfcEntityDescriptor(Type::IfcStructuralPlanarActionVarying,entity_descriptor_map.find(Type::IfcStructuralPlanarAction)->second); + current->add("VaryingAppliedLoadLocation",false,Argument_ENTITY); + current->add("SubsequentAppliedLoads",false,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcStructuralPointAction] = new IfcEntityDescriptor(Type::IfcStructuralPointAction,entity_descriptor_map.find(Type::IfcStructuralAction)->second); + current = entity_descriptor_map[Type::IfcStructuralPointConnection] = new IfcEntityDescriptor(Type::IfcStructuralPointConnection,entity_descriptor_map.find(Type::IfcStructuralConnection)->second); + current = entity_descriptor_map[Type::IfcStructuralPointReaction] = new IfcEntityDescriptor(Type::IfcStructuralPointReaction,entity_descriptor_map.find(Type::IfcStructuralReaction)->second); + current = entity_descriptor_map[Type::IfcStructuralResultGroup] = new IfcEntityDescriptor(Type::IfcStructuralResultGroup,entity_descriptor_map.find(Type::IfcGroup)->second); + current->add("TheoryType",false,Argument_ENUMERATION); + current->add("ResultForLoadGroup",true,Argument_ENTITY); + current->add("IsLinear",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcStructuralSurfaceConnection] = new IfcEntityDescriptor(Type::IfcStructuralSurfaceConnection,entity_descriptor_map.find(Type::IfcStructuralConnection)->second); + current = entity_descriptor_map[Type::IfcSubContractResource] = new IfcEntityDescriptor(Type::IfcSubContractResource,entity_descriptor_map.find(Type::IfcConstructionResource)->second); + current->add("SubContractor",true,Argument_ENTITY); + current->add("JobDescription",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcSwitchingDeviceType] = new IfcEntityDescriptor(Type::IfcSwitchingDeviceType,entity_descriptor_map.find(Type::IfcFlowControllerType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcSystem] = new IfcEntityDescriptor(Type::IfcSystem,entity_descriptor_map.find(Type::IfcGroup)->second); + current = entity_descriptor_map[Type::IfcTankType] = new IfcEntityDescriptor(Type::IfcTankType,entity_descriptor_map.find(Type::IfcFlowStorageDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcTimeSeriesSchedule] = new IfcEntityDescriptor(Type::IfcTimeSeriesSchedule,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("ApplicableDates",true,Argument_ENTITY_LIST); + current->add("TimeSeriesScheduleType",false,Argument_ENUMERATION); + current->add("TimeSeries",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcTransformerType] = new IfcEntityDescriptor(Type::IfcTransformerType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcTransportElement] = new IfcEntityDescriptor(Type::IfcTransportElement,entity_descriptor_map.find(Type::IfcElement)->second); + current->add("OperationType",true,Argument_ENUMERATION); + current->add("CapacityByWeight",true,Argument_DOUBLE); + current->add("CapacityByNumber",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcTrimmedCurve] = new IfcEntityDescriptor(Type::IfcTrimmedCurve,entity_descriptor_map.find(Type::IfcBoundedCurve)->second); + current->add("BasisCurve",false,Argument_ENTITY); + current->add("Trim1",false,Argument_ENTITY_LIST); + current->add("Trim2",false,Argument_ENTITY_LIST); + current->add("SenseAgreement",false,Argument_BOOL); + current->add("MasterRepresentation",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcTubeBundleType] = new IfcEntityDescriptor(Type::IfcTubeBundleType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcUnitaryEquipmentType] = new IfcEntityDescriptor(Type::IfcUnitaryEquipmentType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcValveType] = new IfcEntityDescriptor(Type::IfcValveType,entity_descriptor_map.find(Type::IfcFlowControllerType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcVirtualElement] = new IfcEntityDescriptor(Type::IfcVirtualElement,entity_descriptor_map.find(Type::IfcElement)->second); + current = entity_descriptor_map[Type::IfcWallType] = new IfcEntityDescriptor(Type::IfcWallType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcWasteTerminalType] = new IfcEntityDescriptor(Type::IfcWasteTerminalType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcWorkControl] = new IfcEntityDescriptor(Type::IfcWorkControl,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("Identifier",false,Argument_STRING); + current->add("CreationDate",false,Argument_ENTITY); + current->add("Creators",true,Argument_ENTITY_LIST); + current->add("Purpose",true,Argument_STRING); + current->add("Duration",true,Argument_DOUBLE); + current->add("TotalFloat",true,Argument_DOUBLE); + current->add("StartTime",false,Argument_ENTITY); + current->add("FinishTime",true,Argument_ENTITY); + current->add("WorkControlType",true,Argument_ENUMERATION); + current->add("UserDefinedControlType",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcWorkPlan] = new IfcEntityDescriptor(Type::IfcWorkPlan,entity_descriptor_map.find(Type::IfcWorkControl)->second); + current = entity_descriptor_map[Type::IfcWorkSchedule] = new IfcEntityDescriptor(Type::IfcWorkSchedule,entity_descriptor_map.find(Type::IfcWorkControl)->second); + current = entity_descriptor_map[Type::IfcZone] = new IfcEntityDescriptor(Type::IfcZone,entity_descriptor_map.find(Type::IfcGroup)->second); + current = entity_descriptor_map[Type::Ifc2DCompositeCurve] = new IfcEntityDescriptor(Type::Ifc2DCompositeCurve,entity_descriptor_map.find(Type::IfcCompositeCurve)->second); + current = entity_descriptor_map[Type::IfcActionRequest] = new IfcEntityDescriptor(Type::IfcActionRequest,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("RequestID",false,Argument_STRING); + current = entity_descriptor_map[Type::IfcAirTerminalBoxType] = new IfcEntityDescriptor(Type::IfcAirTerminalBoxType,entity_descriptor_map.find(Type::IfcFlowControllerType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcAirTerminalType] = new IfcEntityDescriptor(Type::IfcAirTerminalType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcAirToAirHeatRecoveryType] = new IfcEntityDescriptor(Type::IfcAirToAirHeatRecoveryType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcAngularDimension] = new IfcEntityDescriptor(Type::IfcAngularDimension,entity_descriptor_map.find(Type::IfcDimensionCurveDirectedCallout)->second); + current = entity_descriptor_map[Type::IfcAsset] = new IfcEntityDescriptor(Type::IfcAsset,entity_descriptor_map.find(Type::IfcGroup)->second); + current->add("AssetID",false,Argument_STRING); + current->add("OriginalValue",false,Argument_ENTITY); + current->add("CurrentValue",false,Argument_ENTITY); + current->add("TotalReplacementCost",false,Argument_ENTITY); + current->add("Owner",false,Argument_ENTITY); + current->add("User",false,Argument_ENTITY); + current->add("ResponsiblePerson",false,Argument_ENTITY); + current->add("IncorporationDate",false,Argument_ENTITY); + current->add("DepreciatedValue",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcBSplineCurve] = new IfcEntityDescriptor(Type::IfcBSplineCurve,entity_descriptor_map.find(Type::IfcBoundedCurve)->second); + current->add("Degree",false,Argument_INT); + current->add("ControlPointsList",false,Argument_ENTITY_LIST); + current->add("CurveForm",false,Argument_ENUMERATION); + current->add("ClosedCurve",false,Argument_BOOL); + current->add("SelfIntersect",false,Argument_BOOL); + current = entity_descriptor_map[Type::IfcBeamType] = new IfcEntityDescriptor(Type::IfcBeamType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcBezierCurve] = new IfcEntityDescriptor(Type::IfcBezierCurve,entity_descriptor_map.find(Type::IfcBSplineCurve)->second); + current = entity_descriptor_map[Type::IfcBoilerType] = new IfcEntityDescriptor(Type::IfcBoilerType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcBuildingElement] = new IfcEntityDescriptor(Type::IfcBuildingElement,entity_descriptor_map.find(Type::IfcElement)->second); + current = entity_descriptor_map[Type::IfcBuildingElementComponent] = new IfcEntityDescriptor(Type::IfcBuildingElementComponent,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current = entity_descriptor_map[Type::IfcBuildingElementPart] = new IfcEntityDescriptor(Type::IfcBuildingElementPart,entity_descriptor_map.find(Type::IfcBuildingElementComponent)->second); + current = entity_descriptor_map[Type::IfcBuildingElementProxy] = new IfcEntityDescriptor(Type::IfcBuildingElementProxy,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("CompositionType",true,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcBuildingElementProxyType] = new IfcEntityDescriptor(Type::IfcBuildingElementProxyType,entity_descriptor_map.find(Type::IfcBuildingElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCableCarrierFittingType] = new IfcEntityDescriptor(Type::IfcCableCarrierFittingType,entity_descriptor_map.find(Type::IfcFlowFittingType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCableCarrierSegmentType] = new IfcEntityDescriptor(Type::IfcCableCarrierSegmentType,entity_descriptor_map.find(Type::IfcFlowSegmentType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCableSegmentType] = new IfcEntityDescriptor(Type::IfcCableSegmentType,entity_descriptor_map.find(Type::IfcFlowSegmentType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcChillerType] = new IfcEntityDescriptor(Type::IfcChillerType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCircle] = new IfcEntityDescriptor(Type::IfcCircle,entity_descriptor_map.find(Type::IfcConic)->second); + current->add("Radius",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcCoilType] = new IfcEntityDescriptor(Type::IfcCoilType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcColumn] = new IfcEntityDescriptor(Type::IfcColumn,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current = entity_descriptor_map[Type::IfcCompressorType] = new IfcEntityDescriptor(Type::IfcCompressorType,entity_descriptor_map.find(Type::IfcFlowMovingDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCondenserType] = new IfcEntityDescriptor(Type::IfcCondenserType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCondition] = new IfcEntityDescriptor(Type::IfcCondition,entity_descriptor_map.find(Type::IfcGroup)->second); + current = entity_descriptor_map[Type::IfcConditionCriterion] = new IfcEntityDescriptor(Type::IfcConditionCriterion,entity_descriptor_map.find(Type::IfcControl)->second); + current->add("Criterion",false,Argument_ENTITY); + current->add("CriterionDateTime",false,Argument_ENTITY); + current = entity_descriptor_map[Type::IfcConstructionEquipmentResource] = new IfcEntityDescriptor(Type::IfcConstructionEquipmentResource,entity_descriptor_map.find(Type::IfcConstructionResource)->second); + current = entity_descriptor_map[Type::IfcConstructionMaterialResource] = new IfcEntityDescriptor(Type::IfcConstructionMaterialResource,entity_descriptor_map.find(Type::IfcConstructionResource)->second); + current->add("Suppliers",true,Argument_ENTITY_LIST); + current->add("UsageRatio",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcConstructionProductResource] = new IfcEntityDescriptor(Type::IfcConstructionProductResource,entity_descriptor_map.find(Type::IfcConstructionResource)->second); + current = entity_descriptor_map[Type::IfcCooledBeamType] = new IfcEntityDescriptor(Type::IfcCooledBeamType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCoolingTowerType] = new IfcEntityDescriptor(Type::IfcCoolingTowerType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCovering] = new IfcEntityDescriptor(Type::IfcCovering,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("PredefinedType",true,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcCurtainWall] = new IfcEntityDescriptor(Type::IfcCurtainWall,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current = entity_descriptor_map[Type::IfcDamperType] = new IfcEntityDescriptor(Type::IfcDamperType,entity_descriptor_map.find(Type::IfcFlowControllerType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcDiameterDimension] = new IfcEntityDescriptor(Type::IfcDiameterDimension,entity_descriptor_map.find(Type::IfcDimensionCurveDirectedCallout)->second); + current = entity_descriptor_map[Type::IfcDiscreteAccessory] = new IfcEntityDescriptor(Type::IfcDiscreteAccessory,entity_descriptor_map.find(Type::IfcElementComponent)->second); + current = entity_descriptor_map[Type::IfcDiscreteAccessoryType] = new IfcEntityDescriptor(Type::IfcDiscreteAccessoryType,entity_descriptor_map.find(Type::IfcElementComponentType)->second); + current = entity_descriptor_map[Type::IfcDistributionChamberElementType] = new IfcEntityDescriptor(Type::IfcDistributionChamberElementType,entity_descriptor_map.find(Type::IfcDistributionFlowElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcDistributionControlElementType] = new IfcEntityDescriptor(Type::IfcDistributionControlElementType,entity_descriptor_map.find(Type::IfcDistributionElementType)->second); + current = entity_descriptor_map[Type::IfcDistributionElement] = new IfcEntityDescriptor(Type::IfcDistributionElement,entity_descriptor_map.find(Type::IfcElement)->second); + current = entity_descriptor_map[Type::IfcDistributionFlowElement] = new IfcEntityDescriptor(Type::IfcDistributionFlowElement,entity_descriptor_map.find(Type::IfcDistributionElement)->second); + current = entity_descriptor_map[Type::IfcDistributionPort] = new IfcEntityDescriptor(Type::IfcDistributionPort,entity_descriptor_map.find(Type::IfcPort)->second); + current->add("FlowDirection",true,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcDoor] = new IfcEntityDescriptor(Type::IfcDoor,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("OverallHeight",true,Argument_DOUBLE); + current->add("OverallWidth",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcDuctFittingType] = new IfcEntityDescriptor(Type::IfcDuctFittingType,entity_descriptor_map.find(Type::IfcFlowFittingType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcDuctSegmentType] = new IfcEntityDescriptor(Type::IfcDuctSegmentType,entity_descriptor_map.find(Type::IfcFlowSegmentType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcDuctSilencerType] = new IfcEntityDescriptor(Type::IfcDuctSilencerType,entity_descriptor_map.find(Type::IfcFlowTreatmentDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcEdgeFeature] = new IfcEntityDescriptor(Type::IfcEdgeFeature,entity_descriptor_map.find(Type::IfcFeatureElementSubtraction)->second); + current->add("FeatureLength",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcElectricApplianceType] = new IfcEntityDescriptor(Type::IfcElectricApplianceType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcElectricFlowStorageDeviceType] = new IfcEntityDescriptor(Type::IfcElectricFlowStorageDeviceType,entity_descriptor_map.find(Type::IfcFlowStorageDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcElectricGeneratorType] = new IfcEntityDescriptor(Type::IfcElectricGeneratorType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcElectricHeaterType] = new IfcEntityDescriptor(Type::IfcElectricHeaterType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcElectricMotorType] = new IfcEntityDescriptor(Type::IfcElectricMotorType,entity_descriptor_map.find(Type::IfcEnergyConversionDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcElectricTimeControlType] = new IfcEntityDescriptor(Type::IfcElectricTimeControlType,entity_descriptor_map.find(Type::IfcFlowControllerType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcElectricalCircuit] = new IfcEntityDescriptor(Type::IfcElectricalCircuit,entity_descriptor_map.find(Type::IfcSystem)->second); + current = entity_descriptor_map[Type::IfcElectricalElement] = new IfcEntityDescriptor(Type::IfcElectricalElement,entity_descriptor_map.find(Type::IfcElement)->second); + current = entity_descriptor_map[Type::IfcEnergyConversionDevice] = new IfcEntityDescriptor(Type::IfcEnergyConversionDevice,entity_descriptor_map.find(Type::IfcDistributionFlowElement)->second); + current = entity_descriptor_map[Type::IfcFanType] = new IfcEntityDescriptor(Type::IfcFanType,entity_descriptor_map.find(Type::IfcFlowMovingDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcFilterType] = new IfcEntityDescriptor(Type::IfcFilterType,entity_descriptor_map.find(Type::IfcFlowTreatmentDeviceType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcFireSuppressionTerminalType] = new IfcEntityDescriptor(Type::IfcFireSuppressionTerminalType,entity_descriptor_map.find(Type::IfcFlowTerminalType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcFlowController] = new IfcEntityDescriptor(Type::IfcFlowController,entity_descriptor_map.find(Type::IfcDistributionFlowElement)->second); + current = entity_descriptor_map[Type::IfcFlowFitting] = new IfcEntityDescriptor(Type::IfcFlowFitting,entity_descriptor_map.find(Type::IfcDistributionFlowElement)->second); + current = entity_descriptor_map[Type::IfcFlowInstrumentType] = new IfcEntityDescriptor(Type::IfcFlowInstrumentType,entity_descriptor_map.find(Type::IfcDistributionControlElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcFlowMovingDevice] = new IfcEntityDescriptor(Type::IfcFlowMovingDevice,entity_descriptor_map.find(Type::IfcDistributionFlowElement)->second); + current = entity_descriptor_map[Type::IfcFlowSegment] = new IfcEntityDescriptor(Type::IfcFlowSegment,entity_descriptor_map.find(Type::IfcDistributionFlowElement)->second); + current = entity_descriptor_map[Type::IfcFlowStorageDevice] = new IfcEntityDescriptor(Type::IfcFlowStorageDevice,entity_descriptor_map.find(Type::IfcDistributionFlowElement)->second); + current = entity_descriptor_map[Type::IfcFlowTerminal] = new IfcEntityDescriptor(Type::IfcFlowTerminal,entity_descriptor_map.find(Type::IfcDistributionFlowElement)->second); + current = entity_descriptor_map[Type::IfcFlowTreatmentDevice] = new IfcEntityDescriptor(Type::IfcFlowTreatmentDevice,entity_descriptor_map.find(Type::IfcDistributionFlowElement)->second); + current = entity_descriptor_map[Type::IfcFooting] = new IfcEntityDescriptor(Type::IfcFooting,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcMember] = new IfcEntityDescriptor(Type::IfcMember,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current = entity_descriptor_map[Type::IfcPile] = new IfcEntityDescriptor(Type::IfcPile,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current->add("ConstructionType",true,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcPlate] = new IfcEntityDescriptor(Type::IfcPlate,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current = entity_descriptor_map[Type::IfcRailing] = new IfcEntityDescriptor(Type::IfcRailing,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("PredefinedType",true,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRamp] = new IfcEntityDescriptor(Type::IfcRamp,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("ShapeType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRampFlight] = new IfcEntityDescriptor(Type::IfcRampFlight,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current = entity_descriptor_map[Type::IfcRationalBezierCurve] = new IfcEntityDescriptor(Type::IfcRationalBezierCurve,entity_descriptor_map.find(Type::IfcBezierCurve)->second); + current->add("WeightsData",false,Argument_VECTOR_DOUBLE); + current = entity_descriptor_map[Type::IfcReinforcingElement] = new IfcEntityDescriptor(Type::IfcReinforcingElement,entity_descriptor_map.find(Type::IfcBuildingElementComponent)->second); + current->add("SteelGrade",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcReinforcingMesh] = new IfcEntityDescriptor(Type::IfcReinforcingMesh,entity_descriptor_map.find(Type::IfcReinforcingElement)->second); + current->add("MeshLength",true,Argument_DOUBLE); + current->add("MeshWidth",true,Argument_DOUBLE); + current->add("LongitudinalBarNominalDiameter",false,Argument_DOUBLE); + current->add("TransverseBarNominalDiameter",false,Argument_DOUBLE); + current->add("LongitudinalBarCrossSectionArea",false,Argument_DOUBLE); + current->add("TransverseBarCrossSectionArea",false,Argument_DOUBLE); + current->add("LongitudinalBarSpacing",false,Argument_DOUBLE); + current->add("TransverseBarSpacing",false,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcRoof] = new IfcEntityDescriptor(Type::IfcRoof,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("ShapeType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcRoundedEdgeFeature] = new IfcEntityDescriptor(Type::IfcRoundedEdgeFeature,entity_descriptor_map.find(Type::IfcEdgeFeature)->second); + current->add("Radius",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcSensorType] = new IfcEntityDescriptor(Type::IfcSensorType,entity_descriptor_map.find(Type::IfcDistributionControlElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcSlab] = new IfcEntityDescriptor(Type::IfcSlab,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("PredefinedType",true,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcStair] = new IfcEntityDescriptor(Type::IfcStair,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("ShapeType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcStairFlight] = new IfcEntityDescriptor(Type::IfcStairFlight,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("NumberOfRiser",true,Argument_INT); + current->add("NumberOfTreads",true,Argument_INT); + current->add("RiserHeight",true,Argument_DOUBLE); + current->add("TreadLength",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcStructuralAnalysisModel] = new IfcEntityDescriptor(Type::IfcStructuralAnalysisModel,entity_descriptor_map.find(Type::IfcSystem)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current->add("OrientationOf2DPlane",true,Argument_ENTITY); + current->add("LoadedBy",true,Argument_ENTITY_LIST); + current->add("HasResults",true,Argument_ENTITY_LIST); + current = entity_descriptor_map[Type::IfcTendon] = new IfcEntityDescriptor(Type::IfcTendon,entity_descriptor_map.find(Type::IfcReinforcingElement)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current->add("NominalDiameter",false,Argument_DOUBLE); + current->add("CrossSectionArea",false,Argument_DOUBLE); + current->add("TensionForce",true,Argument_DOUBLE); + current->add("PreStress",true,Argument_DOUBLE); + current->add("FrictionCoefficient",true,Argument_DOUBLE); + current->add("AnchorageSlip",true,Argument_DOUBLE); + current->add("MinCurvatureRadius",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcTendonAnchor] = new IfcEntityDescriptor(Type::IfcTendonAnchor,entity_descriptor_map.find(Type::IfcReinforcingElement)->second); + current = entity_descriptor_map[Type::IfcVibrationIsolatorType] = new IfcEntityDescriptor(Type::IfcVibrationIsolatorType,entity_descriptor_map.find(Type::IfcDiscreteAccessoryType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcWall] = new IfcEntityDescriptor(Type::IfcWall,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current = entity_descriptor_map[Type::IfcWallStandardCase] = new IfcEntityDescriptor(Type::IfcWallStandardCase,entity_descriptor_map.find(Type::IfcWall)->second); + current = entity_descriptor_map[Type::IfcWindow] = new IfcEntityDescriptor(Type::IfcWindow,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current->add("OverallHeight",true,Argument_DOUBLE); + current->add("OverallWidth",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcActuatorType] = new IfcEntityDescriptor(Type::IfcActuatorType,entity_descriptor_map.find(Type::IfcDistributionControlElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcAlarmType] = new IfcEntityDescriptor(Type::IfcAlarmType,entity_descriptor_map.find(Type::IfcDistributionControlElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcBeam] = new IfcEntityDescriptor(Type::IfcBeam,entity_descriptor_map.find(Type::IfcBuildingElement)->second); + current = entity_descriptor_map[Type::IfcChamferEdgeFeature] = new IfcEntityDescriptor(Type::IfcChamferEdgeFeature,entity_descriptor_map.find(Type::IfcEdgeFeature)->second); + current->add("Width",true,Argument_DOUBLE); + current->add("Height",true,Argument_DOUBLE); + current = entity_descriptor_map[Type::IfcControllerType] = new IfcEntityDescriptor(Type::IfcControllerType,entity_descriptor_map.find(Type::IfcDistributionControlElementType)->second); + current->add("PredefinedType",false,Argument_ENUMERATION); + current = entity_descriptor_map[Type::IfcDistributionChamberElement] = new IfcEntityDescriptor(Type::IfcDistributionChamberElement,entity_descriptor_map.find(Type::IfcDistributionFlowElement)->second); + current = entity_descriptor_map[Type::IfcDistributionControlElement] = new IfcEntityDescriptor(Type::IfcDistributionControlElement,entity_descriptor_map.find(Type::IfcDistributionElement)->second); + current->add("ControlElementId",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcElectricDistributionPoint] = new IfcEntityDescriptor(Type::IfcElectricDistributionPoint,entity_descriptor_map.find(Type::IfcFlowController)->second); + current->add("DistributionPointFunction",false,Argument_ENUMERATION); + current->add("UserDefinedFunction",true,Argument_STRING); + current = entity_descriptor_map[Type::IfcReinforcingBar] = new IfcEntityDescriptor(Type::IfcReinforcingBar,entity_descriptor_map.find(Type::IfcReinforcingElement)->second); + current->add("NominalDiameter",false,Argument_DOUBLE); + current->add("CrossSectionArea",false,Argument_DOUBLE); + current->add("BarLength",true,Argument_DOUBLE); + current->add("BarRole",false,Argument_ENUMERATION); + current->add("BarSurface",true,Argument_ENUMERATION); +} +int Type::GetAttributeIndex(Enum t, const std::string& a) { + if (entity_descriptor_map.empty()) ::InitDescriptorMap(); + std::map::const_iterator i = entity_descriptor_map.find(t); + if ( i == entity_descriptor_map.end() ) throw IfcException("Type not found"); + else return i->second->getArgumentIndex(a); +} + +int Type::GetAttributeCount(Enum t) { + if (entity_descriptor_map.empty()) ::InitDescriptorMap(); + std::map::const_iterator i = entity_descriptor_map.find(t); + if ( i == entity_descriptor_map.end() ) throw IfcException("Type not found"); + else return i->second->getArgumentCount(); +} + +ArgumentType Type::GetAttributeType(Enum t, unsigned char a) { + if (entity_descriptor_map.empty()) ::InitDescriptorMap(); + std::map::const_iterator i = entity_descriptor_map.find(t); + if ( i == entity_descriptor_map.end() ) throw IfcException("Type not found"); + else return i->second->getArgumentType(a); +} + +const std::string& Type::GetAttributeName(Enum t, unsigned char a) { + if (entity_descriptor_map.empty()) ::InitDescriptorMap(); + std::map::const_iterator i = entity_descriptor_map.find(t); + if ( i == entity_descriptor_map.end() ) throw IfcException("Type not found"); + else return i->second->getArgumentName(a); +} + +bool Type::GetAttributeOptional(Enum t, unsigned char a) { + if (entity_descriptor_map.empty()) ::InitDescriptorMap(); + std::map::const_iterator i = entity_descriptor_map.find(t); + if ( i == entity_descriptor_map.end() ) throw IfcException("Type not found"); + else return i->second->getArgumentOptional(a); +} + diff --git a/src/ifcparse/Ifc2x3-rt.h b/src/ifcparse/Ifc2x3-rt.h new file mode 100644 index 0000000000..4afeedb347 --- /dev/null +++ b/src/ifcparse/Ifc2x3-rt.h @@ -0,0 +1,42 @@ +/******************************************************************************** + * * + * This file is part of IfcOpenShell. * + * * + * IfcOpenShell is free software: you can redistribute it and/or modify * + * it under the terms of the Lesser GNU General Public License as published by * + * the Free Software Foundation, either version 3.0 of the License, or * + * (at your option) any later version. * + * * + * IfcOpenShell is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * Lesser GNU General Public License for more details. * + * * + * You should have received a copy of the Lesser GNU General Public License * + * along with this program. If not, see . * + * * + ********************************************************************************/ + +/******************************************************************************** + * * + * This file has been generated from IFC2X3_TC1.exp. Do not make modifications * + * but instead modify the python script that has been used to generate this. * + * * + ********************************************************************************/ + +#ifndef IFC2X3RT_H +#define IFC2X3RT_H + +#include "../ifcparse/ArgumentType.h" + +namespace Ifc2x3 { +namespace Type { + int GetAttributeCount(Enum t); + int GetAttributeIndex(Enum t, const std::string& a); + IfcUtil::ArgumentType GetAttributeType(Enum t, unsigned char a); + const std::string& GetAttributeName(Enum t, unsigned char a); + bool GetAttributeOptional(Enum t, unsigned char a); +}} + +#endif + diff --git a/src/ifcparse/Ifc2x3.cpp b/src/ifcparse/Ifc2x3.cpp index 1b33e0d84e..8011dce75a 100644 --- a/src/ifcparse/Ifc2x3.cpp +++ b/src/ifcparse/Ifc2x3.cpp @@ -24,10 +24,11 @@ * * ********************************************************************************/ -#include "Ifc2x3.h" -#include "IfcException.h" -#include "IfcWrite.h" -#include "IfcWritableEntity.h" +#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/IfcException.h" +#include "../ifcparse/IfcWrite.h" +#include "../ifcparse/IfcWritableEntity.h" +#include "../ifcparse/ArgumentType.h" using namespace Ifc2x3; using namespace IfcParse; @@ -805,7 +806,7 @@ std::string Type::ToString(Enum v) { std::map string_map; void Ifc2x3::InitStringMap() { - string_map["IFCABSORBEDDOSEMEASURE" ] = Type::IfcAbsorbedDoseMeasure; + string_map["IFCABSORBEDDOSEMEASURE" ] = Type::IfcAbsorbedDoseMeasure; string_map["IFCACCELERATIONMEASURE" ] = Type::IfcAccelerationMeasure; string_map["IFCAMOUNTOFSUBSTANCEMEASURE" ] = Type::IfcAmountOfSubstanceMeasure; string_map["IFCANGULARVELOCITYMEASURE" ] = Type::IfcAngularVelocityMeasure; @@ -1563,8 +1564,10 @@ void Ifc2x3::InitStringMap() { string_map["IFCWORKSCHEDULE" ] = Type::IfcWorkSchedule; string_map["IFCZSHAPEPROFILEDEF" ] = Type::IfcZShapeProfileDef; string_map["IFCZONE" ] = Type::IfcZone; + } Type::Enum Type::FromString(const std::string& s) { + if (string_map.empty()) ::Ifc2x3::InitStringMap(); std::map::const_iterator it = string_map.find(s); if ( it == string_map.end() ) throw IfcException("Unable to find find keyword in schema"); else return it->second; @@ -12008,4 +12011,4 @@ bool IfcZone::is(Type::Enum v) const { return v == Type::IfcZone || IfcGroup::is Type::Enum IfcZone::type() const { return Type::IfcZone; } Type::Enum IfcZone::Class() { return Type::IfcZone; } IfcZone::IfcZone(IfcAbstractEntityPtr e) { if (!is(Type::IfcZone)) throw IfcException("Unable to find find keyword in schema"); entity = e; } -IfcZone::IfcZone(IfcGloballyUniqueId v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, optional< IfcLabel > v3_Name, optional< IfcText > v4_Description, optional< IfcLabel > v5_ObjectType) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } ; if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } ; if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } ; entity = e; EntityBuffer::Add(this); } \ No newline at end of file +IfcZone::IfcZone(IfcGloballyUniqueId v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, optional< IfcLabel > v3_Name, optional< IfcText > v4_Description, optional< IfcLabel > v5_ObjectType) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } ; if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } ; if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } ; entity = e; EntityBuffer::Add(this); } diff --git a/src/ifcparse/Ifc2x3.h b/src/ifcparse/Ifc2x3.h index 688ef39083..0fe6ad1fbb 100644 --- a/src/ifcparse/Ifc2x3.h +++ b/src/ifcparse/Ifc2x3.h @@ -30,11 +30,13 @@ #include #include #include +#include #include #include "../ifcparse/IfcUtil.h" #include "../ifcparse/IfcException.h" +#include "../ifcparse/ArgumentType.h" #include "../ifcparse/Ifc2x3enum.h" using namespace IfcUtil; diff --git a/src/ifcparse/Ifc2x3enum.h b/src/ifcparse/Ifc2x3enum.h index 94ba86b184..a4ef8f001a 100644 --- a/src/ifcparse/Ifc2x3enum.h +++ b/src/ifcparse/Ifc2x3enum.h @@ -27,6 +27,8 @@ #ifndef IFC2X3ENUM_H #define IFC2X3ENUM_H +#include "../ifcparse/ArgumentType.h" + namespace Ifc2x3 { namespace Type { diff --git a/src/ifcparse/IfcCharacterDecoder.cpp b/src/ifcparse/IfcCharacterDecoder.cpp index 4f869ddb0f..d1ecab9484 100644 --- a/src/ifcparse/IfcCharacterDecoder.cpp +++ b/src/ifcparse/IfcCharacterDecoder.cpp @@ -30,7 +30,7 @@ #include "../ifcparse/IfcCharacterDecoder.h" #include "../ifcparse/IfcException.h" -#include "../ifcparse/IfcFile.h" +#include "../ifcparse/IfcSpfStream.h" #define FIRST_SOLIDUS (1 << 1) #define PAGE (1 << 2) @@ -67,6 +67,7 @@ #define CLEAR_HEX(C) (C &= ~(HEX(1)&HEX(2)&HEX(3)&HEX(4)&HEX(5)&HEX(6)&HEX(7)&HEX(8))) using namespace IfcParse; +using namespace IfcWrite; void IfcCharacterDecoder::addChar(std::stringstream& s,const UChar32& ch) { #ifdef HAVE_ICU @@ -296,3 +297,71 @@ std::string IfcCharacterDecoder::compatibility_charset = ""; #else char IfcCharacterDecoder::substitution_character = '_'; #endif + + +IfcCharacterEncoder::IfcCharacterEncoder(const std::string& input) { +#ifdef HAVE_ICU + if ( !converter) converter = ucnv_open("utf-8", &status); +#endif + str = input; +} + +IfcCharacterEncoder::~IfcCharacterEncoder() { +#ifdef HAVE_ICU + if ( !converter) ucnv_close(converter); + converter = 0; +#endif +} + +IfcCharacterEncoder::operator std::string() { + std::ostringstream oss; + oss.put('\''); +#ifdef HAVE_ICU + // Either 2 or 4 to uses \X2 or \X4 respectively. + // Currently hardcoded to 4, but \X2 might be + // sufficient for nearly all purposes. + const int num_bytes = 4; + const std::string num_bytes_str = std::string(1,num_bytes + 0x30); + + + UChar32 ch; + + const char* source = str.c_str(); + const char* limit = &*str.end(); + + bool in_extended = false; + + while(source < limit) { + ch = ucnv_getNextUChar(converter, &source, limit, &status); + const bool within_spf_range = ch >= 0x20 && ch <= 0x7e; + if ( in_extended && within_spf_range ) { + oss << "\\X0\\"; + } else if ( !in_extended && !within_spf_range ) { + oss << "\\X" << num_bytes_str << "\\"; + } + if ( within_spf_range ) { + oss.put(ch); + if ( ch == '\\' || ch == '\'' ) oss.put(ch); + } else { + oss << std::hex << std::setw(num_bytes*2) << std::uppercase << std::setfill('0') << (int) ch; + } + in_extended = !within_spf_range; + } + + if ( in_extended ) oss << "\\X0\\"; +#else + for (std::string::const_iterator i = str.begin(); i != str.end(); ++i) { + char ch = *i; + if ( ch == '\\' || ch == '\'' ) oss.put(ch); + oss.put(ch); + } +#endif + oss.put('\''); + return oss.str(); +} + + +#ifdef HAVE_ICU +UErrorCode IfcCharacterEncoder::status = U_ZERO_ERROR; +UConverter* IfcCharacterEncoder::converter = 0; +#endif \ No newline at end of file diff --git a/src/ifcparse/IfcCharacterDecoder.h b/src/ifcparse/IfcCharacterDecoder.h index e9e8c94dbd..da59c0aaa8 100644 --- a/src/ifcparse/IfcCharacterDecoder.h +++ b/src/ifcparse/IfcCharacterDecoder.h @@ -36,7 +36,7 @@ typedef unsigned int UChar32; #endif -#include "../ifcparse/IfcFile.h" +#include "../ifcparse/IfcSpfStream.h" namespace IfcParse { @@ -73,4 +73,21 @@ namespace IfcParse { } +namespace IfcWrite { + + class IfcCharacterEncoder { + private: + std::string str; +#ifdef HAVE_ICU + static UErrorCode status; + static UConverter* converter; +#endif + public: + IfcCharacterEncoder(const std::string& input); + ~IfcCharacterEncoder(); + operator std::string(); + }; + +} + #endif diff --git a/src/ifcparse/IfcFile.h b/src/ifcparse/IfcFile.h index df6021b37b..6f7b0ab1bc 100644 --- a/src/ifcparse/IfcFile.h +++ b/src/ifcparse/IfcFile.h @@ -1,81 +1,78 @@ -/******************************************************************************** - * * - * This file is part of IfcOpenShell. * - * * - * IfcOpenShell is free software: you can redistribute it and/or modify * - * it under the terms of the Lesser GNU General Public License as published by * - * the Free Software Foundation, either version 3.0 of the License, or * - * (at your option) any later version. * - * * - * IfcOpenShell is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * Lesser GNU General Public License for more details. * - * * - * You should have received a copy of the Lesser GNU General Public License * - * along with this program. If not, see . * - * * - ********************************************************************************/ - - /******************************************************************************** - * * - * Reads a file in chunks of BUF_SIZE and provides functions to access its * - * contents randomly and character by character * - * * - ********************************************************************************/ - #ifndef IFCFILE_H #define IFCFILE_H -#include -#include +#include -// As of IfcOpenShell version 0.3.0 the paging functionality, which -// loads a file on disk into multiple chunks, has been disabled. -// It proved to be an inefficient way of working with large files, -// as often these did not facilitate to be parsed in a sequential -// manner efficiently, to enable the paging functionality uncomment -// the following statement. -//const int BUF_SIZE = (128 * 1024 * 1024); +#include "IfcUtil.h" +#include "IfcParse.h" namespace IfcParse { - /// The IfcSpfStream class represents a ISO 10303-21 IFC-SPF file in memory. - /// The file is interpreted as a sequence of tokens which are lazily - /// interpreted only when requested. If the size of the file is - /// larger than BUF_SIZE, the file is split into seperate pages, of - /// which only one is simultaneously kept in memory, for files - /// that define their entities not in a sequential nature, this is - /// detrimental for the performance of the parser. - class IfcSpfStream { - private: - std::ifstream stream; - char* buffer; - unsigned int ptr; - unsigned int len; - void ReadBuffer(bool inc=true); -#ifdef BUF_SIZE - unsigned int offset; - bool paging; -#endif - public: - bool valid; - bool eof; - unsigned int size; - IfcSpfStream(const std::string& fn); - IfcSpfStream(std::istream& f, int len); - IfcSpfStream(void* data, int len); - /// Returns the character at the cursor - char Peek(); - /// Returns the character at specified offset - char Read(unsigned int offset); - /// Increment the file cursor and reads new page if necessary - void Inc(); - void Close(); - /// Moves the file cursor to an arbitrary offset in the file - void Seek(unsigned int offset); - /// Returns the cursor position - unsigned int Tell(); - }; + +typedef IfcUtil::IfcSchemaEntity IfcEntity; +//typedef IfcEntities IfcEntities; +typedef std::map MapEntitiesByType; +typedef std::map MapEntityById; +typedef std::map MapEntityByGuid; +typedef std::map MapEntitiesByRef; +typedef std::map MapOffsetById; + +/// This class provides several static convenience functions and variables +/// and provide access to the entities in an IFC file +class IfcFile { +private: + MapEntityById byid; + MapEntitiesByType bytype; + MapEntitiesByRef byref; + MapEntityByGuid byguid; + MapOffsetById offsets; + unsigned int lastId; + unsigned int MaxId; +public: + typedef MapEntityById::const_iterator const_iterator; + IfcFile(); + ~IfcFile(); + /// Returns the first entity in the file, this probably is the entity with the lowest id (EXPRESS ENTITY_INSTANCE_NAME) + const_iterator begin() const; + /// Returns the last entity in the file, this probably is the entity with the highes id (EXPRESS ENTITY_INSTANCE_NAME) + const_iterator end() const; + IfcParse::IfcSpfStream* file; + IfcParse::Tokens* tokens; + /// Returns all entities in the file that match the template argument. + /// NOTE: This also returns subtypes of the requested type, for example: + /// IfcWall will also return IfcWallStandardCase entities + template + typename T::list EntitiesByType() { + IfcEntities e = EntitiesByType(T::Class()); + typename T::list l ( new IfcTemplatedEntityList() ); + if ( e && e->Size() ) + for ( IfcEntityList::it it = e->begin(); it != e->end(); ++ it ) { + l->push(reinterpret_pointer_cast(*it)); + } + return l; + } + /// Returns all entities in the file that match the positional argument. + /// NOTE: This also returns subtypes of the requested type, for example: + /// IfcWall will also return IfcWallStandardCase entities + IfcEntities EntitiesByType(Ifc2x3::Type::Enum t); + /// Returns all entities in the file that match the positional argument. + /// NOTE: This also returns subtypes of the requested type, for example: + /// IfcWall will also return IfcWallStandardCase entities + IfcEntities EntitiesByType(const std::string& t); + /// Returns all entities in the file that reference the id + IfcEntities EntitiesByReference(int id); + /// Returns the entity with the specified id + IfcEntity EntityById(int id); + /// Returns the entity with the specified GlobalId + Ifc2x3::IfcRoot::ptr EntityByGuid(const std::string& guid); + bool Init(const std::string& fn); + bool Init(std::istream& fn, int len); + bool Init(void* data, int len); + bool Init(IfcParse::IfcSpfStream* f); + unsigned int FreshId() { MaxId ++; return MaxId; } + void AddEntity(IfcUtil::IfcSchemaEntity e); + void AddEntities(IfcEntities es); +}; + } -#endif +#endif \ No newline at end of file diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index b24fc388ff..359e4d7048 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -24,9 +24,10 @@ #include "../ifcparse/IfcCharacterDecoder.h" #include "../ifcparse/IfcParse.h" +#include "../ifcparse/IfcFile.h" #include "../ifcparse/IfcException.h" #include "../ifcparse/IfcUtil.h" -#include "../ifcparse/IfcFile.h" +#include "../ifcparse/IfcSpfStream.h" #include "../ifcparse/IfcWritableEntity.h" using namespace IfcParse; @@ -468,7 +469,13 @@ TokenArgument::operator IfcUtil::IfcSchemaEntity() const { return token.first->f TokenArgument::operator IfcEntities() const { throw IfcException("Argument is not a list of entities"); } unsigned int TokenArgument::Size() const { return 1; } ArgumentPtr TokenArgument::operator [] (unsigned int i) const { throw IfcException("Argument is not a list of arguments"); } -std::string TokenArgument::toString(bool upper) const { return TokenFunc::toString(token); } +std::string TokenArgument::toString(bool upper) const { + if ( upper && TokenFunc::isString(token) ) { + return IfcWrite::IfcCharacterEncoder(TokenFunc::asString(token)); + } else { + return TokenFunc::toString(token); + } +} bool TokenArgument::isNull() const { return TokenFunc::isOperator(token,'$'); } // // Functions for casting the EntityArgument to other types @@ -488,10 +495,18 @@ ArgumentPtr EntityArgument::operator [] (unsigned int i) const { throw IfcExcept std::string EntityArgument::toString(bool upper) const { ArgumentPtr arg = entity->wrappedValue(); IfcParse::TokenArgument* token_arg = dynamic_cast(arg); - std::string token_string = ( token_arg ) ? TokenFunc::toString(token_arg->token) : ""; + const bool is_string = TokenFunc::isString(token_arg->token); + std::string token_string = token_arg ? (is_string + ? TokenFunc::asString(token_arg->token) + : TokenFunc::toString(token_arg->token)) + : std::string(); std::string dt = Ifc2x3::Type::ToString(entity->type()); if ( upper ) { for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p); + if (is_string) token_string = IfcWrite::IfcCharacterEncoder(token_string); + } else { + token_string.insert(token_string.begin(),'\''); + token_string.push_back('\''); } return dt + "(" + token_string + ")"; } @@ -662,7 +677,8 @@ bool IfcFile::Init(IfcParse::IfcSpfStream* f) { if ( currentId ) { try { e = new Entity(currentId,this); - entity = Ifc2x3::SchemaEntity(e); + //entity = Ifc2x3::SchemaEntity(e); + entity = new Ifc::IfcUntypedEntity(e); } catch (IfcException ex) { currentId = 0; Logger::Message(Logger::LOG_ERROR,ex.what()); diff --git a/src/ifcparse/IfcParse.h b/src/ifcparse/IfcParse.h index 1ea57d9095..26fab70bf9 100644 --- a/src/ifcparse/IfcParse.h +++ b/src/ifcparse/IfcParse.h @@ -41,7 +41,8 @@ #include "../ifcparse/IfcCharacterDecoder.h" #include "../ifcparse/IfcUtil.h" #include "../ifcparse/Ifc2x3.h" -#include "../ifcparse/IfcFile.h" +#include "../ifcparse/IfcSpfStream.h" +#include "../ifcparse/IfcUntypedEntity.h" namespace IfcParse { @@ -210,71 +211,6 @@ namespace IfcParse { bool isWritable(); }; -typedef IfcUtil::IfcSchemaEntity IfcEntity; -//typedef IfcEntities IfcEntities; -typedef std::map MapEntitiesByType; -typedef std::map MapEntityById; -typedef std::map MapEntityByGuid; -typedef std::map MapEntitiesByRef; -typedef std::map MapOffsetById; - -/// This class provides several static convenience functions and variables -/// and provide access to the entities in an IFC file -class IfcFile { -private: - MapEntityById byid; - MapEntitiesByType bytype; - MapEntitiesByRef byref; - MapEntityByGuid byguid; - MapOffsetById offsets; - unsigned int lastId; - unsigned int MaxId; -public: - typedef MapEntityById::const_iterator const_iterator; - IfcFile(); - ~IfcFile(); - /// Returns the first entity in the file, this probably is the entity with the lowest id (EXPRESS ENTITY_INSTANCE_NAME) - const_iterator begin() const; - /// Returns the last entity in the file, this probably is the entity with the highes id (EXPRESS ENTITY_INSTANCE_NAME) - const_iterator end() const; - IfcParse::IfcSpfStream* file; - IfcParse::Tokens* tokens; - /// Returns all entities in the file that match the template argument. - /// NOTE: This also returns subtypes of the requested type, for example: - /// IfcWall will also return IfcWallStandardCase entities - template - typename T::list EntitiesByType() { - IfcEntities e = EntitiesByType(T::Class()); - typename T::list l ( new IfcTemplatedEntityList() ); - if ( e && e->Size() ) - for ( IfcEntityList::it it = e->begin(); it != e->end(); ++ it ) { - l->push(reinterpret_pointer_cast(*it)); - } - return l; - } - /// Returns all entities in the file that match the positional argument. - /// NOTE: This also returns subtypes of the requested type, for example: - /// IfcWall will also return IfcWallStandardCase entities - IfcEntities EntitiesByType(Ifc2x3::Type::Enum t); - /// Returns all entities in the file that match the positional argument. - /// NOTE: This also returns subtypes of the requested type, for example: - /// IfcWall will also return IfcWallStandardCase entities - IfcEntities EntitiesByType(const std::string& t); - /// Returns all entities in the file that reference the id - IfcEntities EntitiesByReference(int id); - /// Returns the entity with the specified id - IfcEntity EntityById(int id); - /// Returns the entity with the specified GlobalId - Ifc2x3::IfcRoot::ptr EntityByGuid(const std::string& guid); - bool Init(const std::string& fn); - bool Init(std::istream& fn, int len); - bool Init(void* data, int len); - bool Init(IfcParse::IfcSpfStream* f); - unsigned int FreshId() { MaxId ++; return MaxId; } - void AddEntity(IfcUtil::IfcSchemaEntity e); - void AddEntities(IfcEntities es); -}; - double UnitPrefixToValue( Ifc2x3::IfcSIPrefix::IfcSIPrefix v ); } diff --git a/src/ifcparse/IfcSpfStream.h b/src/ifcparse/IfcSpfStream.h new file mode 100644 index 0000000000..19d4646a2e --- /dev/null +++ b/src/ifcparse/IfcSpfStream.h @@ -0,0 +1,81 @@ +/******************************************************************************** + * * + * This file is part of IfcOpenShell. * + * * + * IfcOpenShell is free software: you can redistribute it and/or modify * + * it under the terms of the Lesser GNU General Public License as published by * + * the Free Software Foundation, either version 3.0 of the License, or * + * (at your option) any later version. * + * * + * IfcOpenShell is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * Lesser GNU General Public License for more details. * + * * + * You should have received a copy of the Lesser GNU General Public License * + * along with this program. If not, see . * + * * + ********************************************************************************/ + + /******************************************************************************** + * * + * Reads a file in chunks of BUF_SIZE and provides functions to access its * + * contents randomly and character by character * + * * + ********************************************************************************/ + +#ifndef IFCSPFSTREAM_H +#define IFCSPFSTREAM_H + +#include +#include + +// As of IfcOpenShell version 0.3.0 the paging functionality, which +// loads a file on disk into multiple chunks, has been disabled. +// It proved to be an inefficient way of working with large files, +// as often these did not facilitate to be parsed in a sequential +// manner efficiently, to enable the paging functionality uncomment +// the following statement. +//const int BUF_SIZE = (128 * 1024 * 1024); + +namespace IfcParse { + /// The IfcSpfStream class represents a ISO 10303-21 IFC-SPF file in memory. + /// The file is interpreted as a sequence of tokens which are lazily + /// interpreted only when requested. If the size of the file is + /// larger than BUF_SIZE, the file is split into seperate pages, of + /// which only one is simultaneously kept in memory, for files + /// that define their entities not in a sequential nature, this is + /// detrimental for the performance of the parser. + class IfcSpfStream { + private: + std::ifstream stream; + char* buffer; + unsigned int ptr; + unsigned int len; + void ReadBuffer(bool inc=true); +#ifdef BUF_SIZE + unsigned int offset; + bool paging; +#endif + public: + bool valid; + bool eof; + unsigned int size; + IfcSpfStream(const std::string& fn); + IfcSpfStream(std::istream& f, int len); + IfcSpfStream(void* data, int len); + /// Returns the character at the cursor + char Peek(); + /// Returns the character at specified offset + char Read(unsigned int offset); + /// Increment the file cursor and reads new page if necessary + void Inc(); + void Close(); + /// Moves the file cursor to an arbitrary offset in the file + void Seek(unsigned int offset); + /// Returns the cursor position + unsigned int Tell(); + }; +} + +#endif diff --git a/src/ifcparse/IfcUntypedEntity.cpp b/src/ifcparse/IfcUntypedEntity.cpp new file mode 100644 index 0000000000..a7e62cbbf9 --- /dev/null +++ b/src/ifcparse/IfcUntypedEntity.cpp @@ -0,0 +1,156 @@ +#include + +#include "IfcWritableEntity.h" + +#include "IfcUtil.h" +#include "IfcWrite.h" +#include "Ifc2x3-rt.h" + +IfcWrite::IfcWritableEntity* Ifc::IfcUntypedEntity::writable_entity() { + IfcWrite::IfcWritableEntity* e; + if (entity->isWritable()) { + e = (IfcWrite::IfcWritableEntity*) entity; + } else { + entity = e = new IfcWrite::IfcWritableEntity(entity); + } + return e; +} +Ifc::IfcUntypedEntity::IfcUntypedEntity(const std::string& s) { + std::string S = s; + for (std::string::iterator i = S.begin(); i != S.end(); ++i ) *i = toupper(*i); + _type = Ifc2x3::Type::FromString(S); + entity = new IfcWrite::IfcWritableEntity(_type); +} +Ifc::IfcUntypedEntity::IfcUntypedEntity(IfcAbstractEntity* e) { + entity = e; + _type = e->type(); +} +bool Ifc::IfcUntypedEntity::is(Ifc2x3::Type::Enum v) const { + Ifc2x3::Type::Enum _ty = _type; + if (v == _ty) return true; + while (_ty != -1) { + _ty = Ifc2x3::Type::Parent(_ty); + if (v == _ty) return true; + } + return false; +} +std::string Ifc::IfcUntypedEntity::is_a() const { + return Ifc2x3::Type::ToString(_type); +} +bool Ifc::IfcUntypedEntity::is_a(const std::string& s) const { + std::string S = s; + for (std::string::iterator i = S.begin(); i != S.end(); ++i ) *i = toupper(*i); + return is(Ifc2x3::Type::FromString(S)); +} +Ifc2x3::Type::Enum Ifc::IfcUntypedEntity::type() const { + return _type; +} +unsigned int Ifc::IfcUntypedEntity::getArgumentCount() const { + return Ifc2x3::Type::GetAttributeCount(_type); +} +IfcUtil::ArgumentType Ifc::IfcUntypedEntity::getArgumentType(unsigned int i) const { + return Ifc2x3::Type::GetAttributeType(_type,i); +} +ArgumentPtr Ifc::IfcUntypedEntity::getArgument(unsigned int i) const { + return entity->getArgument(i); +} +const char* Ifc::IfcUntypedEntity::getArgumentName(unsigned int i) const { + return Ifc2x3::Type::GetAttributeName(_type,i).c_str(); +} +void Ifc::IfcUntypedEntity::invalid_argument(unsigned int i, const std::string& t) { + const std::string arg_name = Ifc2x3::Type::GetAttributeName(_type,i); + throw IfcException(t + " is not a valid type for '" + arg_name + "'"); +} +void Ifc::IfcUntypedEntity::setArgument(unsigned int i, int v) { + IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i); + if (arg_type == Argument_INT) { + writable_entity()->setArgument(i,v); + } else invalid_argument(i,"INT"); +} +void Ifc::IfcUntypedEntity::setArgument(unsigned int i, bool v) { + IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i); + if (arg_type == Argument_BOOL) { + writable_entity()->setArgument(i,v); + } else invalid_argument(i,"BOOL"); +} +void Ifc::IfcUntypedEntity::setArgument(unsigned int i, double v) { + IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i); + if (arg_type == Argument_DOUBLE) { + writable_entity()->setArgument(i,v); + } else invalid_argument(i,"DOUBLE"); +} +void Ifc::IfcUntypedEntity::setArgument(unsigned int i, const std::string& a) { + IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i); + if (arg_type == Argument_STRING) { + writable_entity()->setArgument(i,a); + } else if (arg_type == Argument_ENUMERATION) { + writable_entity()->setArgument(i,a); + } else invalid_argument(i,"STRING"); +} +void Ifc::IfcUntypedEntity::setArgument(unsigned int i, const std::vector& v) { + IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i); + if (arg_type == Argument_VECTOR_INT) { + writable_entity()->setArgument(i,v); + } else invalid_argument(i,"LIST of INT"); +} +void Ifc::IfcUntypedEntity::setArgument(unsigned int i, const std::vector& v) { + IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i); + if (arg_type == Argument_VECTOR_DOUBLE) { + writable_entity()->setArgument(i,v); + } else invalid_argument(i,"LIST of DOUBLE"); +} +void Ifc::IfcUntypedEntity::setArgument(unsigned int i, const std::vector& v) { + IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i); + if (arg_type == Argument_VECTOR_STRING) { + writable_entity()->setArgument(i,v); + } else invalid_argument(i,"LIST of STRING"); +} +void Ifc::IfcUntypedEntity::setArgument(unsigned int i, Ifc::IfcUntypedEntity* v) { + IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i); + if (arg_type == Argument_ENTITY) { + writable_entity()->setArgument(i,v); + } else invalid_argument(i,"ENTITY"); +} +void Ifc::IfcUntypedEntity::setArgument(unsigned int i, IfcEntities v) { + IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i); + if (arg_type == Argument_ENTITY_LIST) { + writable_entity()->setArgument(i,v); + } else invalid_argument(i,"LIST of ENTITY"); +} +std::pair Ifc::IfcUntypedEntity::get_argument(unsigned i) { + return std::pair(getArgumentType(i),getArgument(i)); +} +std::pair Ifc::IfcUntypedEntity::get_argument(const std::string& a) { + return get_argument(Ifc2x3::Type::GetAttributeIndex(_type,a)); +} +unsigned Ifc::IfcUntypedEntity::getArgumentIndex(const std::string& a) const { + return Ifc2x3::Type::GetAttributeIndex(_type,a); +} +std::string Ifc::IfcUntypedEntity::toString() { + return entity->toString(false); +} +bool Ifc::IfcUntypedEntity::is_valid() { + const unsigned arg_count = getArgumentCount(); + bool valid = true; + std::ostringstream oss; + oss << "Argument "; + for (unsigned i = 0; i < arg_count; ++i) { + bool is_null = true; + try { + const Argument& arg = *getArgument(i); + is_null = arg.isNull(); + } catch(IfcException) {} + if (!Ifc2x3::Type::GetAttributeOptional(_type,i) && is_null) { + if (!valid) { + oss << ", "; + } + oss << "\"" << getArgumentName(i) << "\""; + valid = false; + } + } + oss << " not optional"; + if (!valid) { + throw IfcException(oss.str()); + } + return valid; +} diff --git a/src/ifcparse/IfcUntypedEntity.h b/src/ifcparse/IfcUntypedEntity.h new file mode 100644 index 0000000000..c1827a7c5e --- /dev/null +++ b/src/ifcparse/IfcUntypedEntity.h @@ -0,0 +1,51 @@ +#ifndef IFCUNTYPEDENTITY_H +#define IFCUNTYPEDENTITY_H + +#include + +#include "IfcUtil.h" +#include "IfcWrite.h" +#include "IfcWritableEntity.h" + +namespace Ifc { + + class IfcUntypedEntity : public IfcUtil::IfcBaseEntity { + private: + Ifc2x3::Type::Enum _type; + IfcWrite::IfcWritableEntity* writable_entity(); + void invalid_argument(unsigned int i, const std::string& t); + public: + IfcUntypedEntity(const std::string& s); + IfcUntypedEntity(IfcAbstractEntity* e); + bool is(Ifc2x3::Type::Enum v) const; + Ifc2x3::Type::Enum type() const; + bool is_a(const std::string& s) const; + std::string is_a() const; + unsigned int getArgumentCount() const; + IfcUtil::ArgumentType getArgumentType(unsigned int i) const; + ArgumentPtr getArgument(unsigned int i) const; + const char* getArgumentName(unsigned int i) const; + unsigned getArgumentIndex(const std::string& a) const; + + void setArgument(unsigned int i, int v); + void setArgument(unsigned int i, bool v); + void setArgument(unsigned int i, double v); + void setArgument(unsigned int i, const std::string& v); + void setArgument(unsigned int i, const std::vector& v); + void setArgument(unsigned int i, const std::vector& v); + void setArgument(unsigned int i, const std::vector& v); + void setArgument(unsigned int i, IfcUntypedEntity* v); + void setArgument(unsigned int i, IfcEntities v); + + std::string toString(); + + // TODO: Write as SWIG extension methods + std::pair get_argument(unsigned i); + std::pair get_argument(const std::string& a); + + bool is_valid(); + }; + +} + +#endif \ No newline at end of file diff --git a/src/ifcparse/IfcUtil.h b/src/ifcparse/IfcUtil.h index 70b3785b4c..dd758c4a19 100644 --- a/src/ifcparse/IfcUtil.h +++ b/src/ifcparse/IfcUtil.h @@ -23,9 +23,13 @@ #include #include #include +#include #include "../ifcparse/SharedPointer.h" #include "../ifcparse/Ifc2x3enum.h" +#include "../ifcparse/ArgumentType.h" +#include "../ifcparse/IfcException.h" + class IfcAbstractEntity; //typedef SHARED_PTR IfcAbstractEntityPtr; @@ -47,12 +51,66 @@ inline T* reinterpret_pointer_cast(F* from) { } namespace IfcUtil { - enum ArgumentType { - Argument_INT, Argument_BOOL, Argument_DOUBLE, Argument_STRING, Argument_VECTOR_INT, Argument_VECTOR_DOUBLE, Argument_VECTOR_STRING, Argument_ENTITY, Argument_ENTITY_LIST, Argument_ENUMERATION, Argument_UNKNOWN - }; -} -namespace IfcUtil { + class IfcEntityDescriptor { + public: + class IfcArgumentDescriptor + { + public: + std::string name; + bool optional; + ArgumentType type; + IfcArgumentDescriptor(const std::string& name, bool optional, ArgumentType type) + : name(name), optional(optional), type(type) {} + }; + private: + Ifc2x3::Type::Enum type; + IfcEntityDescriptor* parent; + std::vector arguments; + unsigned argument_start() { + return parent ? parent->getArgumentCount() : 0; + } + IfcArgumentDescriptor& get_argument(unsigned i) { + if (i < arguments.size()) return arguments[i]; + else throw IfcParse::IfcException("Argument out of range"); + } + public: + IfcEntityDescriptor(Ifc2x3::Type::Enum type, IfcEntityDescriptor* parent) + : type(type), parent(parent) {} + void add(const std::string& name, bool optional, ArgumentType type) { + arguments.push_back(IfcArgumentDescriptor(name, optional, type)); + } + unsigned getArgumentCount() { + return (parent ? parent->getArgumentCount() : 0) + arguments.size(); + } + std::string& getArgumentName(unsigned i) { + const unsigned a = argument_start(); + return i < a + ? parent->getArgumentName(i) + : get_argument(i-a).name; + } + ArgumentType getArgumentType(unsigned i) { + const unsigned a = argument_start(); + return i < a + ? parent->getArgumentType(i) + : get_argument(i-a).type; + } + bool getArgumentOptional(unsigned i) { + const unsigned a = argument_start(); + return i < a + ? parent->getArgumentOptional(i) + : get_argument(i-a).optional; + } + unsigned getArgumentIndex(const std::string& s) { + unsigned a = argument_start(); + for(std::vector::const_iterator i = arguments.begin(); i != arguments.end(); ++i) { + if (i->name == s) return a; + a++; + } + if (parent) return parent->getArgumentIndex(s); + throw IfcParse::IfcException(std::string("Argument ") + s + " not found on " + Ifc2x3::Type::ToString(type)); + } + }; class IfcBaseClass { public: diff --git a/src/ifcparse/IfcWritableEntity.h b/src/ifcparse/IfcWritableEntity.h index ed919df508..6d0d942d58 100644 --- a/src/ifcparse/IfcWritableEntity.h +++ b/src/ifcparse/IfcWritableEntity.h @@ -31,6 +31,8 @@ #ifndef IFCWRITABLEENTITY_H #define IFCWRITABLEENTITY_H +#include + #include "IfcUtil.h" namespace IfcWrite { diff --git a/src/ifcparse/IfcWrite.cpp b/src/ifcparse/IfcWrite.cpp index 8c594e4038..4f52e763fd 100644 --- a/src/ifcparse/IfcWrite.cpp +++ b/src/ifcparse/IfcWrite.cpp @@ -17,9 +17,11 @@ * * ********************************************************************************/ -#include "IfcParse.h" -#include "IfcWrite.h" -#include "IfcWritableEntity.h" +#include "../ifcparse/IfcParse.h" +#include "../ifcparse/IfcFile.h" +#include "../ifcparse/IfcWrite.h" +#include "../ifcparse/IfcWritableEntity.h" +#include "../ifcparse/IfcCharacterDecoder.h" using namespace IfcWrite; @@ -69,7 +71,7 @@ IfcEntities IfcWritableEntity::getInverse(Ifc2x3::Type::Enum c, int i, const std } std::string IfcWritableEntity::datatype() { return Ifc2x3::Type::ToString(_type); } -ArgumentPtr IfcWritableEntity::getArgument (unsigned int i) { if ( i >= getArgumentCount() ) throw; return args[i]; } +ArgumentPtr IfcWritableEntity::getArgument (unsigned int i) { if ( i >= getArgumentCount() ) throw IfcParse::IfcException("Argument not set"); return args[i]; } unsigned int IfcWritableEntity::getArgumentCount() {return args.size(); } Ifc2x3::Type::Enum IfcWritableEntity::type() const { return _type; } bool IfcWritableEntity::is(Ifc2x3::Type::Enum v) const { return _type == v; } @@ -152,33 +154,33 @@ void IfcWritableEntity::setArgument(int i,const std::vector& v){ arg_writable(i,true); } -IfcWriteNullArgument::operator int() const { throw; } -IfcWriteNullArgument::operator bool() const { throw; } -IfcWriteNullArgument::operator double() const { throw; } -IfcWriteNullArgument::operator std::string() const { throw; } -IfcWriteNullArgument::operator std::vector() const { throw; } -IfcWriteNullArgument::operator std::vector() const { throw; } -IfcWriteNullArgument::operator std::vector() const { throw; } -IfcWriteNullArgument::operator IfcUtil::IfcSchemaEntity() const { throw; } -IfcWriteNullArgument::operator IfcEntities() const { throw; } +IfcWriteNullArgument::operator int() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteNullArgument::operator bool() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteNullArgument::operator double() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteNullArgument::operator std::string() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteNullArgument::operator std::vector() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteNullArgument::operator std::vector() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteNullArgument::operator std::vector() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteNullArgument::operator IfcUtil::IfcSchemaEntity() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteNullArgument::operator IfcEntities() const { throw IfcParse::IfcException("Invalid cast"); } bool IfcWriteNullArgument::isNull() const { return true; } -ArgumentPtr IfcWriteNullArgument::operator [] (unsigned int i) const { throw; } +ArgumentPtr IfcWriteNullArgument::operator [] (unsigned int i) const { throw IfcParse::IfcException("Invalid cast"); } std::string IfcWriteNullArgument::toString(bool upper) const { return "$"; } -unsigned int IfcWriteNullArgument::Size() const { throw; } +unsigned int IfcWriteNullArgument::Size() const { throw IfcParse::IfcException("Invalid cast"); } IfcWriteEntityListArgument::IfcWriteEntityListArgument(const IfcEntities& v) { value = v; } -IfcWriteEntityListArgument::operator int() const { throw; } -IfcWriteEntityListArgument::operator bool() const { throw; } -IfcWriteEntityListArgument::operator double() const { throw; } -IfcWriteEntityListArgument::operator std::string() const { throw; } -IfcWriteEntityListArgument::operator std::vector() const { throw; } -IfcWriteEntityListArgument::operator std::vector() const { throw; } -IfcWriteEntityListArgument::operator std::vector() const { throw; } -IfcWriteEntityListArgument::operator IfcUtil::IfcSchemaEntity() const { throw; } +IfcWriteEntityListArgument::operator int() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEntityListArgument::operator bool() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEntityListArgument::operator double() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEntityListArgument::operator std::string() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEntityListArgument::operator std::vector() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEntityListArgument::operator std::vector() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEntityListArgument::operator std::vector() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEntityListArgument::operator IfcUtil::IfcSchemaEntity() const { throw IfcParse::IfcException("Invalid cast"); } IfcWriteEntityListArgument::operator IfcEntities() const { return value; } bool IfcWriteEntityListArgument::isNull() const { return false; } unsigned int IfcWriteEntityListArgument::Size() const { return value->Size(); } -ArgumentPtr IfcWriteEntityListArgument::operator [] (unsigned int i) const { throw; } +ArgumentPtr IfcWriteEntityListArgument::operator [] (unsigned int i) const { throw IfcParse::IfcException("Invalid cast"); } std::string IfcWriteEntityListArgument::toString(bool upper) const { std::ostringstream ss; ss << "("; @@ -196,19 +198,19 @@ std::string IfcWriteEntityListArgument::toString(bool upper) const { } IfcWriteEnumerationArgument::IfcWriteEnumerationArgument(int v, const char* c) {data=v; enumeration_value = c;} -IfcWriteEnumerationArgument::operator int() const { throw; } -IfcWriteEnumerationArgument::operator bool() const { throw; } -IfcWriteEnumerationArgument::operator double() const { throw; } +IfcWriteEnumerationArgument::operator int() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEnumerationArgument::operator bool() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEnumerationArgument::operator double() const { throw IfcParse::IfcException("Invalid cast"); } IfcWriteEnumerationArgument::operator std::string() const { return std::string(enumeration_value); } -IfcWriteEnumerationArgument::operator std::vector() const { throw; } -IfcWriteEnumerationArgument::operator std::vector() const { throw; } -IfcWriteEnumerationArgument::operator std::vector() const { throw; } -IfcWriteEnumerationArgument::operator IfcUtil::IfcSchemaEntity() const { throw; } -IfcWriteEnumerationArgument::operator IfcEntities() const { throw; } +IfcWriteEnumerationArgument::operator std::vector() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEnumerationArgument::operator std::vector() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEnumerationArgument::operator std::vector() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEnumerationArgument::operator IfcUtil::IfcSchemaEntity() const { throw IfcParse::IfcException("Invalid cast"); } +IfcWriteEnumerationArgument::operator IfcEntities() const { throw IfcParse::IfcException("Invalid cast"); } bool IfcWriteEnumerationArgument::isNull() const { return false; } -ArgumentPtr IfcWriteEnumerationArgument::operator [] (unsigned int i) const { throw; } +ArgumentPtr IfcWriteEnumerationArgument::operator [] (unsigned int i) const { throw IfcParse::IfcException("Invalid cast"); } std::string IfcWriteEnumerationArgument::toString(bool upper) const { return std::string(".") + enumeration_value + '.';} -unsigned int IfcWriteEnumerationArgument::Size() const { throw; } +unsigned int IfcWriteEnumerationArgument::Size() const { throw IfcParse::IfcException("Invalid cast"); } IfcWriteIntegralArgument::IfcWriteIntegralArgument(int v) {data=new int(v); type = Argument_INT;} IfcWriteIntegralArgument::IfcWriteIntegralArgument(bool v) {data=new bool(v); type = Argument_BOOL;} @@ -245,15 +247,15 @@ IfcWriteIntegralArgument::~IfcWriteIntegralArgument() { break; } } -IfcWriteIntegralArgument::operator int() const { if ( type != Argument_INT ) throw; return *(int*)data; } -IfcWriteIntegralArgument::operator bool() const { if ( type != Argument_BOOL ) throw; return *(bool*)data; } -IfcWriteIntegralArgument::operator double() const { if ( type != Argument_DOUBLE ) throw; return *(double*)data; } -IfcWriteIntegralArgument::operator std::string() const { if ( type != Argument_STRING ) throw; return *(std::string*)data; } -IfcWriteIntegralArgument::operator std::vector() const { if ( type != Argument_VECTOR_DOUBLE ) throw; return *(std::vector*)data; } -IfcWriteIntegralArgument::operator std::vector() const { if ( type != Argument_VECTOR_INT ) throw; return *(std::vector*)data; } -IfcWriteIntegralArgument::operator std::vector() const { if ( type != Argument_VECTOR_STRING ) throw; return *(std::vector*)data; } -IfcWriteIntegralArgument::operator IfcUtil::IfcSchemaEntity() const { if ( type != Argument_ENTITY ) throw; return (IfcUtil::IfcSchemaEntity)data; } -IfcWriteIntegralArgument::operator IfcEntities() const { throw; } +IfcWriteIntegralArgument::operator int() const { if ( type != Argument_INT ) throw IfcParse::IfcException("Invalid cast"); return *(int*)data; } +IfcWriteIntegralArgument::operator bool() const { if ( type != Argument_BOOL ) throw IfcParse::IfcException("Invalid cast"); return *(bool*)data; } +IfcWriteIntegralArgument::operator double() const { if ( type != Argument_DOUBLE ) throw IfcParse::IfcException("Invalid cast"); return *(double*)data; } +IfcWriteIntegralArgument::operator std::string() const { if ( type != Argument_STRING ) throw IfcParse::IfcException("Invalid cast"); return *(std::string*)data; } +IfcWriteIntegralArgument::operator std::vector() const { if ( type != Argument_VECTOR_DOUBLE ) throw IfcParse::IfcException("Invalid cast"); return *(std::vector*)data; } +IfcWriteIntegralArgument::operator std::vector() const { if ( type != Argument_VECTOR_INT ) throw IfcParse::IfcException("Invalid cast"); return *(std::vector*)data; } +IfcWriteIntegralArgument::operator std::vector() const { if ( type != Argument_VECTOR_STRING ) throw IfcParse::IfcException("Invalid cast"); return *(std::vector*)data; } +IfcWriteIntegralArgument::operator IfcUtil::IfcSchemaEntity() const { if ( type != Argument_ENTITY ) throw IfcParse::IfcException("Invalid cast"); return (IfcUtil::IfcSchemaEntity)data; } +IfcWriteIntegralArgument::operator IfcEntities() const { throw IfcParse::IfcException("Invalid cast"); } bool IfcWriteIntegralArgument::isNull() const { return false; } unsigned int IfcWriteIntegralArgument::Size() const { switch ( type ) { @@ -267,11 +269,11 @@ unsigned int IfcWriteIntegralArgument::Size() const { return ((std::vector*) data)->size(); break; default: - throw; + throw IfcParse::IfcException("Invalid cast"); break; } } -ArgumentPtr IfcWriteIntegralArgument::operator [] (unsigned int i) const { throw; } +ArgumentPtr IfcWriteIntegralArgument::operator [] (unsigned int i) const { throw IfcParse::IfcException("Invalid cast"); } std::string IfcWriteIntegralArgument::toString(bool upper) const { std::ostringstream ss; switch ( type ) { @@ -284,10 +286,12 @@ std::string IfcWriteIntegralArgument::toString(bool upper) const { case Argument_DOUBLE: ss << *(double*) data; break; - case Argument_STRING: - ss << '\'' << *(std::string*) data << '\''; - break; - case Argument_VECTOR_INT: + case Argument_STRING: { + std::string d = *(std::string*) data; + if ( upper ) d = IfcCharacterEncoder(d); + ss << d; + break; + } case Argument_VECTOR_INT: ss << "("; {const std::vector& v = *(std::vector*) data; for ( std::vector::const_iterator it = v.begin(); it != v.end(); ++ it ) { @@ -322,16 +326,16 @@ std::string IfcWriteIntegralArgument::toString(bool upper) const { ss << "#" << e->id(); }} break; - default: throw; + default: throw IfcParse::IfcException("Invalid cast"); } return ss.str(); } -IfcEntities IfcSelectHelperEntity::getInverse(Ifc2x3::Type::Enum,int,const std::string &) {throw;} -IfcEntities IfcSelectHelperEntity::getInverse(Ifc2x3::Type::Enum) {throw;} +IfcEntities IfcSelectHelperEntity::getInverse(Ifc2x3::Type::Enum,int,const std::string &) {throw IfcParse::IfcException("Invalid cast");} +IfcEntities IfcSelectHelperEntity::getInverse(Ifc2x3::Type::Enum) {throw IfcParse::IfcException("Invalid cast");} std::string IfcSelectHelperEntity::datatype() { return Ifc2x3::Type::ToString(_type); } ArgumentPtr IfcSelectHelperEntity::getArgument(unsigned int i) { - if ( i != 0 ) throw; + if ( i != 0 ) throw IfcParse::IfcException("Invalid cast"); return arg; } unsigned int IfcSelectHelperEntity::getArgumentCount() { return 1; } @@ -346,8 +350,8 @@ std::string IfcSelectHelperEntity::toString(bool upper) { ss << dt << "(" << arg->toString(upper) << ")"; return ss.str(); } -unsigned int IfcSelectHelperEntity::id() { throw; } -bool IfcSelectHelperEntity::isWritable() { throw; } +unsigned int IfcSelectHelperEntity::id() { throw IfcParse::IfcException("Invalid cast"); } +bool IfcSelectHelperEntity::isWritable() { throw IfcParse::IfcException("Invalid cast"); } IfcSelectHelper::IfcSelectHelper(const std::string& v, Ifc2x3::Type::Enum t) { IfcWriteArgument* a = new IfcWriteIntegralArgument(v); @@ -361,7 +365,7 @@ IfcSelectHelper::IfcSelectHelper(int v, Ifc2x3::Type::Enum t) { IfcWriteArgument* a = new IfcWriteIntegralArgument(v); this->entity = new IfcSelectHelperEntity(t,a); } -IfcSelectHelper::IfcSelectHelper(float v, Ifc2x3::Type::Enum t) { +IfcSelectHelper::IfcSelectHelper(double v, Ifc2x3::Type::Enum t) { IfcWriteArgument* a = new IfcWriteIntegralArgument(v); this->entity = new IfcSelectHelperEntity(t,a); } diff --git a/src/ifcparse/IfcWrite.h b/src/ifcparse/IfcWrite.h index 565351f523..dc33159c47 100644 --- a/src/ifcparse/IfcWrite.h +++ b/src/ifcparse/IfcWrite.h @@ -170,7 +170,7 @@ namespace IfcWrite { IfcSelectHelper(const std::string& v, Ifc2x3::Type::Enum t=Ifc2x3::Type::IfcText); IfcSelectHelper(const char* const v, Ifc2x3::Type::Enum t=Ifc2x3::Type::IfcText); IfcSelectHelper(int v, Ifc2x3::Type::Enum t=Ifc2x3::Type::IfcInteger); - IfcSelectHelper(float v, Ifc2x3::Type::Enum t=Ifc2x3::Type::IfcReal); + IfcSelectHelper(double v, Ifc2x3::Type::Enum t=Ifc2x3::Type::IfcReal); IfcSelectHelper(bool v, Ifc2x3::Type::Enum t=Ifc2x3::Type::IfcBoolean); bool is(Ifc2x3::Type::Enum t) const; Ifc2x3::Type::Enum type() const; diff --git a/src/ifcwrap/IfcPython.i b/src/ifcwrap/IfcPython.i index 3510e9cf91..00fa83e631 100644 --- a/src/ifcwrap/IfcPython.i +++ b/src/ifcwrap/IfcPython.i @@ -19,16 +19,139 @@ %include "std_vector.i" %include "std_string.i" +%include "exception.i" + +%ignore Ifc::IfcUntypedEntity::is; +%ignore Ifc::IfcUntypedEntity::type; +%ignore Ifc::IfcUntypedEntity::getArgument; +%ignore Ifc::IfcUntypedEntity::IfcUntypedEntity(IfcAbstractEntity); + +%ignore IfcParse::IfcFile::Init; +%ignore IfcParse::IfcFile::EntityById; +%ignore IfcParse::IfcFile::EntityByGuid; +%ignore IfcParse::IfcFile::AddEntity; +%ignore operator<<; + +%rename("by_type") EntitiesByType; +%rename("get_argument_count") getArgumentCount; +%rename("get_argument_type") getArgumentType; +%rename("get_argument_name") getArgumentName; +%rename("get_argument_index") getArgumentIndex; +%rename("set_argument") setArgument; +%rename("__repr__") toString; +%rename("Entity") IfcUntypedEntity; + +%typemap(out) IfcEntities { + const unsigned size = $1->Size(); + $result = PyList_New(size); + for (unsigned i = 0; i < size; ++i) { + PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr((*$1)[i]), SWIGTYPE_p_Ifc__IfcUntypedEntity, 0); + PyList_SetItem($result,i,o); + } +} + +%typemap(out) std::pair { + const Argument& arg = *($1.second); + const ArgumentType type = $1.first; + if (arg.isNull()) { + $result = Py_None; + } else { + switch(type) { + case Argument_INT: + $result = PyInt_FromLong((int)arg); + break; + case Argument_BOOL: + $result = PyBool_FromLong((bool)arg); + break; + case Argument_DOUBLE: + $result = PyFloat_FromDouble(arg); + break; + case Argument_ENUMERATION: + case Argument_STRING: { + const std::string s = arg; + $result = PyString_FromString(s.c_str()); + break; } + case Argument_VECTOR_INT: { + const std::vector v = arg; + const unsigned size = v.size(); + $result = PyList_New(size); + for (unsigned int i = 0; i < size; ++i) { + PyList_SetItem($result,i,PyInt_FromLong(v[i])); + } + break; } + case Argument_VECTOR_DOUBLE: { + const std::vector v = arg; + const unsigned size = v.size(); + $result = PyList_New(size); + for (unsigned int i = 0; i < size; ++i) { + PyList_SetItem($result,i,PyFloat_FromDouble(v[i])); + } + break; } + case Argument_VECTOR_STRING: { + const std::vector v = arg; + const unsigned size = v.size(); + $result = PyList_New(size); + for (unsigned int i = 0; i < size; ++i) { + PyList_SetItem($result,i,PyString_FromString(v[i].c_str())); + } + break; } + case Argument_ENTITY: { + IfcUtil::IfcSchemaEntity e = arg; + $result = SWIG_NewPointerObj(SWIG_as_voidptr(e), SWIGTYPE_p_Ifc__IfcUntypedEntity, 0); + break; } + case Argument_ENTITY_LIST: { + IfcEntities es = arg; + const unsigned size = es->Size(); + $result = PyList_New(size); + for (unsigned i = 0; i < size; ++i) { + PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr((*es)[i]), SWIGTYPE_p_Ifc__IfcUntypedEntity, 0); + PyList_SetItem($result,i,o); + } + break; } + case Argument_UNKNOWN: + default: + SWIG_exception(SWIG_RuntimeError,"Unknown argument type"); + break; + } + } +} + +%exception { + try { + $action + } catch(::IfcParse::IfcException& e) { + SWIG_exception(SWIG_RuntimeError,e.what()); + } +} + +%module IfcImport %{ + #include "../ifcparse/IfcException.h" + #include "Interface.h" + using namespace Ifc; + using namespace IfcParse; +%} %include "Interface.h" -%module IfcImport %{ - #include "Interface.h" - using namespace IfcGeomObjects; -%} +%extend IfcParse::IfcFile { + Ifc::IfcUntypedEntity* by_id(unsigned id) { + return (IfcUntypedEntity*) $self->EntityById(id); + } + Ifc::IfcUntypedEntity* by_guid(const std::string& guid) { + return (IfcUntypedEntity*) $self->EntityByGuid(guid); + } + void add(Ifc::IfcUntypedEntity* e) { + $self->AddEntity(e); + } + void write(const std::string& fn) { + std::ofstream f(fn); + f << (*$self); + } +} + namespace std { - %template(IntVector) vector; - %template(FloatVector) vector; - %template(ObjVector) vector; + %template(Ints) vector; + %template(Doubles) vector; + %template(Strings) vector; }; \ No newline at end of file diff --git a/src/ifcwrap/Interface.h b/src/ifcwrap/Interface.h index aa13f393d6..12ce7c3d93 100644 --- a/src/ifcwrap/Interface.h +++ b/src/ifcwrap/Interface.h @@ -1,82 +1,93 @@ -/******************************************************************************** - * * - * This file is part of IfcOpenShell. * - * * - * IfcOpenShell is free software: you can redistribute it and/or modify * - * it under the terms of the Lesser GNU General Public License as published by * - * the Free Software Foundation, either version 3.0 of the License, or * - * (at your option) any later version. * - * * - * IfcOpenShell is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * Lesser GNU General Public License for more details. * - * * - * You should have received a copy of the Lesser GNU General Public License * - * along with this program. If not, see . * - * * - ********************************************************************************/ +#define IFCUNTYPEDENTITY_H -namespace IfcGeomObjects { +#include +#include - const int WELD_VERTICES = 1; - const int USE_WORLD_COORDS = 2; - const int CONVERT_BACK_UNITS = 3; - const int USE_BREP_DATA = 4; - const int SEW_SHELLS = 5; - const int FASTER_BOOLEANS = 6; - const int FORCE_CCW_FACE_ORIENTATION = 7; +#include "../ifcparse/IfcUtil.h" +#include "../ifcparse/Ifc2x3.h" - class IfcMesh { +#include "../ifcgeom/IfcGeom.h" + + +namespace Ifc { + class IfcUntypedEntity : public IfcUtil::IfcBaseEntity { + private: + Ifc2x3::Type::Enum _type; public: - int id; - std::vector verts; - std::vector faces; - std::vector edges; - std::vector normals; - std::string brep_data; + IfcUntypedEntity(const std::string& s); + bool is(Ifc2x3::Type::Enum v) const; + Ifc2x3::Type::Enum type() const; + bool is_a(const std::string& s) const; + std::string is_a() const; + unsigned int getArgumentCount() const; + IfcUtil::ArgumentType getArgumentType(unsigned int i) const; + ArgumentPtr getArgument(unsigned int i) const; + ArgumentPtr getArgument(const std::string& a) const; + const char* getArgumentName(unsigned int i) const; + unsigned getArgumentIndex(const std::string& a) const; + + void setArgument(unsigned int i, int v); + void setArgument(unsigned int i, bool v); + void setArgument(unsigned int i, double v); + void setArgument(unsigned int i, const std::string& v); + void setArgument(unsigned int i, const std::vector& v); + void setArgument(unsigned int i, const std::vector& v); + void setArgument(unsigned int i, const std::vector& v); + void setArgument(unsigned int i, IfcUntypedEntity* v); + void setArgument(unsigned int i, IfcEntities v); + + std::string toString(); + + std::pair get_argument(unsigned i); + std::pair get_argument(const std::string& a); + + bool is_valid(); + }; +} + +typedef IfcUtil::IfcSchemaEntity IfcEntity; +typedef std::map MapEntitiesByType; +typedef std::map MapEntityById; +typedef std::map MapEntityByGuid; +typedef std::map MapEntitiesByRef; +typedef std::map MapOffsetById; + +namespace IfcParse { + class IfcSpfStream; + class Tokens; + + class IfcFile { + private: + MapEntityById byid; + MapEntitiesByType bytype; + MapEntitiesByRef byref; + MapEntityByGuid byguid; + MapOffsetById offsets; + unsigned int lastId; + unsigned int MaxId; + IfcParse::IfcSpfStream* file; + IfcParse::Tokens* tokens; + public: + bool Init(const std::string& fn); + IfcEntities EntitiesByType(const std::string& t); + IfcEntity EntityById(int id); + Ifc2x3::IfcRoot::ptr EntityByGuid(const std::string& guid); + void AddEntity(IfcUtil::IfcSchemaEntity e); + IfcFile(); + ~IfcFile(); }; - class IfcObject { - public: - int id; - int parent_id; - std::string name; - std::string type; - std::string guid; - std::vector matrix; - const std::vector name_as_intvector() { - std::vector r; - for ( std::string::const_iterator it = name.begin(); it != name.end(); ++ it ) r.push_back(*it); - return r; - } - const std::vector type_as_intvector() { - std::vector r; - for ( std::string::const_iterator it = type.begin(); it != type.end(); ++ it ) r.push_back(*it); - return r; - } - const std::vector guid_as_intvector() { - std::vector r; - for ( std::string::const_iterator it = guid.begin(); it != guid.end(); ++ it ) r.push_back(*it); - return r; - } - }; + IfcParse::IfcFile* open(const std::string& s) { + IfcParse::IfcFile* f = new IfcParse::IfcFile(); + f->Init(s); + return f; + } - class IfcGeomObject : public IfcObject { - public: - IfcMesh* mesh; - }; + std::string create_shape(Ifc::IfcUntypedEntity* e) { + if (!e->is(Ifc2x3::Type::IfcProduct)) throw IfcException("Entity is not an IfcProduct"); + Ifc2x3::IfcProduct* ifc_product = (Ifc2x3::IfcProduct*) e; + return IfcGeom::create_brep_data(ifc_product); + } +} - bool Next(); - const IfcGeomObject* Get(); - bool Init(const std::string fn); - bool InitUCS2(const char* fn) { - return Init(std::string(fn+1)); - } - void Settings(int setting, bool value); - int Progress(); - const IfcObject* GetObject(int id); - bool CleanUp(); - std::string GetLog(); - -}; \ No newline at end of file +std::ostream& operator<< (std::ostream& os, const IfcParse::IfcFile& f); \ No newline at end of file diff --git a/win/IfcParse.vcproj b/win/IfcParse.vcproj index 266dc18f2f..6f41b07dff 100644 --- a/win/IfcParse.vcproj +++ b/win/IfcParse.vcproj @@ -149,6 +149,18 @@ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > + + + + + @@ -165,10 +177,18 @@ RelativePath="..\src\ifcparse\IfcCharacterDecoder.cpp" > + + + + @@ -176,17 +196,21 @@ - - - + + + + + @@ -199,6 +223,14 @@ RelativePath="..\src\ifcparse\IfcParse.h" > + + + +