VICUS Library
Documentation of Vicus library
Loading...
Searching...
No Matches
VICUS::ZoneTemplate Class Reference

#include <VICUS_ZoneTemplate.h>

Inheritance diagram for VICUS::ZoneTemplate:
[legend]

Public Types

enum  SubTemplateType {
  ST_IntLoadPerson , ST_IntLoadEquipment , ST_IntLoadLighting , ST_IntLoadOther ,
  ST_ControlThermostat , ST_ControlShading , ST_ControlVentilationNatural , ST_Infiltration ,
  ST_VentilationNatural , ST_IdealHeatingCooling , NUM_ST
}
 
- Public Types inherited from VICUS::AbstractDBElement
enum  ComparisonResult { Equal , OnlyMetaDataDiffers , Different }
 

Public Member Functions

 ZoneTemplate ()
 
VICUS_READWRITE_OVERRIDE VICUS_COMPARE_WITH_ID bool isValid (const Database< InternalLoad > &intLoadDB, const Database< ZoneControlThermostat > &thermostatDB, const Database< Schedule > &schedulesDB, const Database< Infiltration > &infiltraionDB, const Database< VentilationNatural > &ventilationDB, const Database< ZoneIdealHeatingCooling > &idealHeatingCoolingDB, const Database< ZoneControlShading > &ctrlShadingDB, const Database< ZoneControlNaturalVentilation > &ctrlNatVentDB) const
 
unsigned int subTemplateCount () const
 
SubTemplateType usedReference (unsigned int index) const
 
ComparisonResult equal (const AbstractDBElement *other) const override
 
- Public Member Functions inherited from VICUS::AbstractDBElement
 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
 
void collectChildren (std::set< const AbstractDBElement * > &allChildrenRefs) const
 
void collectLocalChildren (std::set< AbstractDBElement * > &localChildrenRefs) const
 
const QString sourceName () const
 

Public Attributes

IBK::MultiLanguageString m_notes
 
IBK::MultiLanguageString m_dataSource
 
IDType m_idReferences [NUM_ST]
 
- Public Attributes inherited from VICUS::AbstractDBElement
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
 

Detailed Description

Container class that references one or more zone control/sub-templates that define zone behavior/controls.

Member Enumeration Documentation

◆ SubTemplateType

Types used to identify individual sub-templates.

Note
Do not change the order! First have a look to Project::generateBuildingProjectData()
Enumerator
ST_IntLoadPerson 
ST_IntLoadEquipment 
ST_IntLoadLighting 
ST_IntLoadOther 
ST_ControlThermostat 
ST_ControlShading 
ST_ControlVentilationNatural 
ST_Infiltration 
ST_VentilationNatural 
ST_IdealHeatingCooling 
NUM_ST 

Constructor & Destructor Documentation

◆ ZoneTemplate()

VICUS::ZoneTemplate::ZoneTemplate ( )

Member Function Documentation

◆ equal()

AbstractDBElement::ComparisonResult VICUS::ZoneTemplate::equal ( const AbstractDBElement other) const
overridevirtual

Comparison operator

Implements VICUS::AbstractDBElement.

◆ isValid()

bool VICUS::ZoneTemplate::isValid ( const Database< InternalLoad > &  intLoadDB,
const Database< ZoneControlThermostat > &  thermostatDB,
const Database< Schedule > &  schedulesDB,
const Database< Infiltration > &  infiltraionDB,
const Database< VentilationNatural > &  ventilationDB,
const Database< ZoneIdealHeatingCooling > &  idealHeatingCoolingDB,
const Database< ZoneControlShading > &  ctrlShadingDB,
const Database< ZoneControlNaturalVentilation > &  ctrlNatVentDB 
) const

Checks if all referenced ZoneTemplate is valid.

◆ subTemplateCount()

unsigned int VICUS::ZoneTemplate::subTemplateCount ( ) const

Returns number of assigned sub-templates (needed by tree-model).

◆ usedReference()

ZoneTemplate::SubTemplateType VICUS::ZoneTemplate::usedReference ( unsigned int  index) const

Returns the type of reference by index, counting only the used references, i.e. references not INVALID_ID. For example, if m_idReferences[ST_IntLoadPerson] == INVALID_ID and m_idReferences[ST_IntLoadEquipment] has a valid ID, than usedReference(0) returns ST_IntLoadEquipment.

Returns
Returns type of corresponding id reference or NUM_ST, if index is larger than the number of non-empty id references.

Member Data Documentation

◆ m_dataSource

IBK::MultiLanguageString VICUS::ZoneTemplate::m_dataSource

Data source.

◆ m_idReferences

IDType VICUS::ZoneTemplate::m_idReferences[NUM_ST]

Stores id references for all sub-templates.

◆ m_notes

IBK::MultiLanguageString VICUS::ZoneTemplate::m_notes

Notes.


The documentation for this class was generated from the following files: