OpenStudio:model
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
openstudio::model::ModelExtensibleGroup Class Reference

#include <ModelExtensibleGroup.hpp>

+ Inheritance diagram for openstudio::model::ModelExtensibleGroup:

Public Member Functions

 ModelExtensibleGroup (const ModelExtensibleGroup &other)=default
 
 ModelExtensibleGroup (ModelExtensibleGroup &&other)=default
 
ModelExtensibleGroupoperator= (const ModelExtensibleGroup &)=default
 
ModelExtensibleGroupoperator= (ModelExtensibleGroup &&)=default
 
virtual ~ModelExtensibleGroup ()=default
 
Template Methods
template<typename T >
boost::optional< T > getModelObjectTarget (unsigned fieldIndex) const
 Get the ModelObject of type T pointed to from fieldIndex of this extensible group, if possible. More...
 
template<typename T >
std::vector< T > getModelObjectTargets () const
 Get all the ModelObjects of type T pointed to from this extensible group. More...
 
bool setSchedule (unsigned index, const std::string &className, const std::string &scheduleDisplayName, Schedule &schedule)
 Sets index to point to schedule if schedule's ScheduleTypeLimits are compatible with the ScheduleType in the ScheduleTypeRegistry for (className,scheduleDisplayName), or if schedule's ScheduleTypeLimits have not yet been set (in which case the ScheduleTypeRegistry is used to retrieve or create an appropriate one). More...
 

Detailed Description

ModelExtensibleGroup is a WorkspaceExtensibleGroup with additional methods added to support extensible ModelObjects.

The ExtensibleGroup inheritance hierarchy roughly follows the IdfObject <- WorkspaceObject <- ModelObject <- etc. hierarchy, except that all concrete ModelObjects with ExtensibleGroup derived classes derive directly from ModelExtensibleGroup–there are no extensions of ModelExtensibleGroup for intermediate abstract classes.

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename T >
boost::optional<T> openstudio::model::ModelExtensibleGroup::getModelObjectTarget ( unsigned  fieldIndex) const
inline

Get the ModelObject of type T pointed to from fieldIndex of this extensible group, if possible.

template<typename T >
std::vector<T> openstudio::model::ModelExtensibleGroup::getModelObjectTargets ( ) const
inline

Get all the ModelObjects of type T pointed to from this extensible group.

Return value will always be .empty() if this extensible group object is .empty().

ModelExtensibleGroup& openstudio::model::ModelExtensibleGroup::operator= ( const ModelExtensibleGroup )
default
ModelExtensibleGroup& openstudio::model::ModelExtensibleGroup::operator= ( ModelExtensibleGroup &&  )
default
bool openstudio::model::ModelExtensibleGroup::setSchedule ( unsigned  index,
const std::string &  className,
const std::string &  scheduleDisplayName,
Schedule schedule 
)

Sets index to point to schedule if schedule's ScheduleTypeLimits are compatible with the ScheduleType in the ScheduleTypeRegistry for (className,scheduleDisplayName), or if schedule's ScheduleTypeLimits have not yet been set (in which case the ScheduleTypeRegistry is used to retrieve or create an appropriate one).

Because ModelExtensibleGroup has no knowledge of its model, you should ensure that schedule belongs to the right model in the first place