OpenStudio:model
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages

#include "ComponentData.hpp"

Inheritance diagram for openstudio::model::ComponentData:

Public Member Functions

virtual ~ComponentData ()=default
 ComponentData (const ComponentData &other)=default
 ComponentData (ComponentData &&other)=default
ComponentDataoperator= (const ComponentData &)=default
ComponentDataoperator= (ComponentData &&)=default
UUID uuid () const
UUID versionUUID () const
boost::optional< intcreationTimestamp () const
boost::optional< intversionTimestamp () const
ModelObject primaryComponentObject () const
std::vector< ModelObjectcomponentObjects () const
ModelObject getComponentObject (unsigned objectIndex) const
UUID createVersionUUID ()
unsigned numComponentObjects () const

Static Public Member Functions

static IddObjectType iddObjectType ()

Related Functions

using ComponentDataVector = std::vector< ComponentData >
using OptionalComponentData = boost::optional< ComponentData >

Detailed Description

ComponentData is a ModelObject that wraps the OpenStudio IDD object 'OS:ComponentData'.

It is used in Components to provide a contents list and data (unique identifiers and timestamps) that link the Component back to the Building Component Library (BCL). It is used in Models to indicate which objects are associated with which Components.

Constructor & Destructor Documentation

virtual openstudio::model::ComponentData::~ComponentData ( )
virtualdefault
openstudio::model::ComponentData::ComponentData ( const ComponentData other)
default
openstudio::model::ComponentData::ComponentData ( ComponentData &&  other)
default

Member Function Documentation

std::vector<ModelObject> openstudio::model::ComponentData::componentObjects ( ) const

Returns all of the ModelObjects that are part of this Component.

The primaryComponentObject() will be listed first.

UUID openstudio::model::ComponentData::createVersionUUID ( )

Creates and returns a new value for versionUUID().

boost::optional<int> openstudio::model::ComponentData::creationTimestamp ( ) const

Timestamp at time of creation (when the uuid was initially generated).

Unix timestamp from January 1, 1970 00:00 GMT, in seconds.

ModelObject openstudio::model::ComponentData::getComponentObject ( unsigned  objectIndex) const

Returns the ModelObject at objectIndex in the contents.

Throws an openstudio::Exception if objectIndex >= numComponentObjects.

static IddObjectType openstudio::model::ComponentData::iddObjectType ( )
static
unsigned openstudio::model::ComponentData::numComponentObjects ( ) const

Returns the number of objects in the Component described by this object.

Must be >= 1.

ComponentData& openstudio::model::ComponentData::operator= ( const ComponentData )
default
ComponentData& openstudio::model::ComponentData::operator= ( ComponentData &&  )
default
ModelObject openstudio::model::ComponentData::primaryComponentObject ( ) const

Returns the primary object of this component, which defines the Component's overall type.

This method is equivalent to getComponentObject(0).

UUID openstudio::model::ComponentData::uuid ( ) const

The unique identifier of the component.

This identifier is generated on initial construction with ModelObject::createComponent, and then maintained as-is for the life of the Component. It is used to track the Component across multiple models, on disk (.osc and .osm), in the project::ProjectDatabase, and in local and online BCLs.

boost::optional<int> openstudio::model::ComponentData::versionTimestamp ( ) const

Timestamp of last versioning event (creation of versionUUID).

Unix timestamp from January 1, 1970 00:00 GMT, in seconds.

UUID openstudio::model::ComponentData::versionUUID ( ) const

Returns the unique identifier of the current version of the component.

This UUID is automatically regenerated when any Component data changes.

Friends And Related Function Documentation

using ComponentDataVector = std::vector<ComponentData>
related
using OptionalComponentData = boost::optional<ComponentData>
related