VICUS Library
Documentation of Vicus library
|
#include <VICUS_AbstractDBElement.h>
Public Types | |
enum | ComparisonResult { Equal , OnlyMetaDataDiffers , Different } |
Public Member Functions | |
AbstractDBElement ()=default | |
AbstractDBElement (unsigned int id, const IBK::MultiLanguageString &name) | |
virtual | ~AbstractDBElement () |
virtual void | readXML (const TiXmlElement *element)=0 |
virtual TiXmlElement * | writeXML (TiXmlElement *parent) const =0 |
virtual ComparisonResult | equal (const AbstractDBElement *other) const =0 |
void | collectChildren (std::set< const AbstractDBElement * > &allChildrenRefs) const |
void | collectLocalChildren (std::set< AbstractDBElement * > &localChildrenRefs) const |
const QString | sourceName () const |
Public Attributes | |
unsigned int | m_id = INVALID_ID |
IBK::MultiLanguageString | m_displayName |
QColor | m_color |
bool | m_builtIn = false |
bool | m_local = true |
std::set< AbstractDBElement * > | m_childrenRefs |
bool | m_isReferenced = false |
std::string | m_errorMsg |
Abstract base class of all database elements, needed to have generic DB table model implementations. ID and display name are mandatory elements for each db element.
|
default |
Default constructor.
|
inline |
Initializing constructor.
|
virtual |
Virtual destructor, definition is in VICUS_Material.cpp.
void VICUS::AbstractDBElement::collectChildren | ( | std::set< const AbstractDBElement * > & | allChildrenRefs | ) | const |
Collects all pointers to child elements
void VICUS::AbstractDBElement::collectLocalChildren | ( | std::set< AbstractDBElement * > & | localChildrenRefs | ) | const |
Collects all pointers to child elements which are local
|
pure virtual |
Comparison of database element by content, without ID.
Implemented in VICUS::AcousticTemplate, VICUS::BoundaryCondition, VICUS::Component, VICUS::Construction, VICUS::EPDDataset, VICUS::Infiltration, VICUS::InternalLoad, VICUS::Material, VICUS::NetworkComponent, VICUS::NetworkController, VICUS::NetworkFluid, VICUS::NetworkPipe, VICUS::Schedule, VICUS::SubNetwork, VICUS::SubSurfaceComponent, VICUS::SupplySystem, VICUS::SurfaceHeating, VICUS::VentilationNatural, VICUS::Window, VICUS::WindowGlazingSystem, VICUS::ZoneControlNaturalVentilation, VICUS::ZoneControlShading, VICUS::ZoneControlThermostat, VICUS::ZoneIdealHeatingCooling, and VICUS::ZoneTemplate.
|
pure virtual |
Implemented in VICUS::SupplySystem.
const QString VICUS::AbstractDBElement::sourceName | ( | ) | const |
Source name for display purposes.
|
pure virtual |
Implemented in VICUS::SupplySystem.
bool VICUS::AbstractDBElement::m_builtIn = false |
If true, this is a built-in DB element and cannot be modified/removed.
std::set<AbstractDBElement*> VICUS::AbstractDBElement::m_childrenRefs |
Pointer to elements which are referenced by this element
QColor VICUS::AbstractDBElement::m_color |
False-color for this DB element (optional, may not be necessary for all DB elements).
IBK::MultiLanguageString VICUS::AbstractDBElement::m_displayName |
The description text for this DB element.
|
mutable |
Holds error string in order to give users a tooltip in db dialog.
unsigned int VICUS::AbstractDBElement::m_id = INVALID_ID |
Unique ID of this DB element.
|
mutable |
If true, this element is referenced in the current project
bool VICUS::AbstractDBElement::m_local = true |
Determines wether this element is kept local in the current project or should be stored into the userDB (false).