mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 06:00:51 +00:00
- Correctly format REALs according to ISO 10303-21 instead of C++ std::stream double formatting
- Add the IfcHierarchyHelper to assist in the creation of IFC files - Add the IfcOpenHouse example for writing topological geometry and tessellated Open Cascade shapes to IFC
This commit is contained in:
@@ -74,6 +74,9 @@ typedef IfcBaseClass* IfcSchemaEntity;
|
||||
|
||||
}
|
||||
|
||||
template <class T>
|
||||
class IfcTemplatedEntityList;
|
||||
|
||||
class IfcEntityList {
|
||||
std::vector<IfcUtil::IfcSchemaEntity> ls;
|
||||
public:
|
||||
@@ -86,6 +89,12 @@ public:
|
||||
it end();
|
||||
IfcUtil::IfcSchemaEntity operator[] (int i);
|
||||
int Size() const;
|
||||
template <class U>
|
||||
typename U::list as() {
|
||||
typename U::list r(new IfcTemplatedEntityList<U>());
|
||||
for ( it i = begin(); i != end(); ++ i ) if ((*i)->is(U::Class())) r->push((U*)*i);
|
||||
return r;
|
||||
}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
@@ -104,6 +113,12 @@ public:
|
||||
for ( it i = begin(); i != end(); ++ i ) r->push(*i);
|
||||
return r;
|
||||
}
|
||||
template <class U>
|
||||
typename U::list as() {
|
||||
typename U::list r(new IfcTemplatedEntityList<U>());
|
||||
for ( it i = begin(); i != end(); ++ i ) if ((*i)->is(U::Class())) r->push(*i);
|
||||
return r;
|
||||
}
|
||||
};
|
||||
|
||||
namespace IfcUtil {
|
||||
|
||||
Reference in New Issue
Block a user