|
VICUS Library
Documentation of Vicus library
|
#include <VICUS_Object.h>
Public Member Functions | |
| Object ()=default | |
| Object (Object const &)=default | |
| virtual | ~Object () |
| Object * | findChild (unsigned int ID) |
| const Object * | findChild (unsigned int ID) const |
| void | collectChildIDs (std::set< unsigned int > &nodeContainer) const |
| virtual const char * | typeinfo () const =0 |
| QString | info () const |
Public Attributes | |
| Object * | m_parent = nullptr |
| unsigned int | m_id = INVALID_ID |
| bool | m_selected = false |
| bool | m_visible = true |
| QString | m_displayName |
| std::string | m_ifcGUID |
Protected Attributes | |
| std::vector< Object * > | m_children |
Base class for all objects that have a parent and are shown in the navigation tree widget.
Also, each object has a unique ID m_id that is used throughout the user interface and data model to identify it.
Note: whenever you add/remove an object in the item hierarchy, make sure to call updateParents() in top level node.
|
default |
Standard C'tor.
|
default |
Default copy constructor.
|
virtual |
D'tor.
| void VICUS::Object::collectChildIDs | ( | std::set< unsigned int > & | nodeContainer | ) | const |
Recursively selected all unique IDs of children, includes the object's ID itself as well.
| Object * VICUS::Object::findChild | ( | unsigned int | ID | ) |
Recursively searches through data hierarchy and returns pointer to object matching the given ID.
| const Object * VICUS::Object::findChild | ( | unsigned int | ID | ) | const |
Same as function above, const version.
| QString VICUS::Object::info | ( | ) | const |
Returns a descriptive string with object type, ID and optionally displayname that helps identifying this object.
|
pure virtual |
Returns a short descriptive string usable for error messages that identifies the object type.
Implemented in VICUS::Building, VICUS::BuildingLevel, VICUS::Network, VICUS::NetworkEdge, VICUS::NetworkNode, VICUS::Room, VICUS::SubSurface, and VICUS::Surface.
|
protected |
List of all children.
| QString VICUS::Object::m_displayName |
The descriptive name of the object.
| unsigned int VICUS::Object::m_id = INVALID_ID |
Persistant ID of object (not the unique ID, may not be unique in DB model, must be handled appropriately in error handling).
| std::string VICUS::Object::m_ifcGUID |
Contains a GUID to a IFC object in case of import from IFC.
| Object* VICUS::Object::m_parent = nullptr |
Parent pointer, do not modify.
| bool VICUS::Object::m_selected = false |
Stores visibility information for this surface.
| bool VICUS::Object::m_visible = true |
Stores visibility information for this surface (serialized manually in derived classes).