Class IfcFile¶
Defined in File IfcFile.h
Inheritance Relationships¶
Derived Type¶
public IfcHierarchyHelper< Schema >
(Template Class IfcHierarchyHelper)
Class Documentation¶
-
class
IfcParse
::
IfcFile
¶ This class provides several static convenience functions and variables and provide access to the entities in an IFC file
Subclassed by IfcHierarchyHelper< Schema >
Public Types
-
typedef std::map<const IfcParse::declaration*, IfcEntityList::ptr>
entities_by_type_t
¶
-
typedef boost::unordered_map<unsigned int, IfcUtil::IfcBaseClass*>
entity_by_id_t
¶
-
typedef std::map<std::string, IfcUtil::IfcBaseClass*>
entity_by_guid_t
¶
-
typedef std::map<unsigned int, std::vector<unsigned int>>
entities_by_ref_t
¶
-
typedef std::map<unsigned int, IfcEntityList::ptr>
ref_map_t
¶
-
typedef entity_by_id_t::const_iterator
const_iterator
¶
Public Functions
-
IfcFile
(const std::string &fn)¶
-
IfcFile
(std::istream &fn, int len)¶
-
IfcFile
(void *data, int len)¶
-
IfcFile
(IfcParse::IfcSpfStream *f)¶
-
IfcFile
(const IfcParse::schema_definition *schema = IfcParse::schema_by_name("IFC4"))¶
-
~IfcFile
()¶
-
bool
good
() const¶
-
const_iterator
begin
() const¶ Returns the first entity in the file, this probably is the entity with the lowest id (EXPRESS ENTITY_INSTANCE_NAME)
-
const_iterator
end
() const¶ Returns the last entity in the file, this probably is the entity with the highest id (EXPRESS ENTITY_INSTANCE_NAME)
-
type_iterator
types_begin
() const¶
-
type_iterator
types_end
() const¶
-
type_iterator
types_incl_super_begin
() const¶
-
type_iterator
types_incl_super_end
() const¶
-
template<class
T
>
T::list::ptrinstances_by_type
()¶ 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
-
IfcEntityList::ptr
instances_by_type
(const IfcParse::declaration*)¶ 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
-
IfcEntityList::ptr
instances_by_type_excl_subtypes
(const IfcParse::declaration*)¶ Returns all entities in the file that match the positional argument.
-
IfcEntityList::ptr
instances_by_type
(const std::string &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
-
IfcEntityList::ptr
instances_by_type_excl_subtypes
(const std::string &t)¶ Returns all entities in the file that match the positional argument.
-
IfcEntityList::ptr
instances_by_reference
(int id)¶ Returns all entities in the file that reference the id.
-
IfcUtil::IfcBaseClass *
instance_by_id
(int id)¶ Returns the entity with the specified id.
-
IfcUtil::IfcBaseClass *
instance_by_guid
(const std::string &guid)¶ Returns the entity with the specified GlobalId.
-
IfcEntityList::ptr
traverse
(IfcUtil::IfcBaseClass *instance, int max_level = -1)¶ Performs a depth-first traversal, returning all entity instance attributes as a flat list. NB: includes the root instance specified in the first function argument.
-
IfcEntityList::ptr
getInverse
(int instance_id, const IfcParse::declaration *type, int attribute_index)¶
-
void
mark_entity_as_modified
(int id)¶ Marks entity as modified so that potential cache for it is invalidated.
- Todo:
Currently the whole cache is invalidated. Implement more fine-grained invalidation.
-
unsigned int
FreshId
()¶
-
IfcUtil::IfcBaseClass *
addEntity
(IfcUtil::IfcBaseClass *entity)¶
-
void
addEntities
(IfcEntityList::ptr es)¶
-
void
removeEntity
(IfcUtil::IfcBaseClass *entity)¶ Removes entity instance from file and unsets references.
Attention when running removeEntity inside a loop over a list of entities to be removed. This invalidates the iterator. A workaround is to reverse the loop: boost::shared_ptr<IfcEntityList> entities = …; for (auto it = entities->end() - 1; it >= entities->begin(); it) { IfcUtil::IfcBaseClass *const inst = *it; model->removeEntity(inst); }
-
const IfcSpfHeader &
header
() const¶
-
IfcSpfHeader &
header
()¶
-
std::string
createTimestamp
() const¶
-
void
seek_to
(const IfcEntityInstanceData &data)¶
-
void
try_read_semicolon
()¶
-
void
register_inverse
(unsigned, IfcUtil::IfcBaseClass*)¶
-
void
unregister_inverse
(unsigned, IfcUtil::IfcBaseClass*)¶
-
const IfcParse::schema_definition *
schema
() const¶
-
std::pair<IfcUtil::IfcBaseClass*, double>
getUnit
(const std::string &unit_type)¶
-
bool
parsing_complete
() const¶
-
bool &
parsing_complete
()¶
-
void
build_inverses
()¶
-
class
type_iterator
: private const_iterator¶ Public Functions
-
type_iterator
()¶
-
type_iterator
(const entities_by_type_t::const_iterator &it)¶
-
const entities_by_type_t::key_type *
operator->
() const¶
-
const entities_by_type_t::key_type &
operator*
() const¶
-
type_iterator &
operator++
()¶
-
type_iterator
operator++
(int)¶
-
bool
operator!=
(const type_iterator &other) const¶
-
-
typedef std::map<const IfcParse::declaration*, IfcEntityList::ptr>