OpenStudio:model
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends 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 () override=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...
 
- Public Member Functions inherited from openstudio::WorkspaceExtensibleGroup
bool canBeSource () const
 
std::vector< unsigned > getSourceFieldIndices (const Handle &targetHandle) const
 
boost::optional< WorkspaceObjectgetTarget (unsigned fieldIndex) const
 
std::vector< WorkspaceObjectgetTargets () const
 
bool isSource () const
 
bool setPointer (unsigned fieldIndex, const Handle &targetHandle)
 
bool setPointer (unsigned fieldIndex, const Handle &targetHandle, bool checkValidity)
 
virtual ~WorkspaceExtensibleGroup () override=default
 
- Public Member Functions inherited from openstudio::IdfExtensibleGroup
cast () const
 
std::vector< unsigned > dataFields () const
 
bool empty () const
 
boost::optional< std::string > fieldComment (unsigned fieldIndex, bool returnDefault=false) const
 
std::vector< std::string > fieldComments (bool returnDefault=false) const
 
std::vector< std::string > fields (bool returnDefault=false) const
 
std::vector< std::string > fieldsWithHandles (bool returnDefault=false) const
 
boost::optional< double > getDouble (unsigned fieldIndex, bool returnDefault=false) const
 
boost::optional< std::string > getField (unsigned index, bool returnDefault=false) const
 
boost::optional< intgetInt (unsigned fieldIndex, bool returnDefault=false) const
 
getObject () const
 
boost::optional< T > getOptionalObject () const
 
boost::optional< std::string > getString (unsigned fieldIndex, bool returnDefault=false) const
 
boost::optional< unsigned > getUnsigned (unsigned fieldIndex, bool returnDefault=false) const
 
unsigned groupIndex () const
 
IdfExtensibleGroup insertClone (unsigned groupIndex) const
 
bool isEmpty (unsigned fieldIndex) const
 
bool isValid (unsigned fieldIndex) const
 
unsigned numFields () const
 
std::vector< unsigned > objectListFields () const
 
bool operator!= (const IdfExtensibleGroup &other) const
 
bool operator== (const IdfExtensibleGroup &other) const
 
boost::optional< T > optionalCast () const
 
IdfExtensibleGroup pushClone () const
 
std::vector< unsigned > requiredFields () const
 
bool setDouble (unsigned fieldIndex, double value)
 
bool setFieldComment (unsigned fieldIndex, const std::string &cmnt)
 
bool setFields (const std::vector< std::string > &values)
 
bool setInt (unsigned fieldIndex, int value)
 
bool setString (unsigned fieldIndex, const std::string &value)
 
bool setString (unsigned fieldIndex, const std::string &value, bool checkValidity)
 
bool setUnsigned (unsigned fieldIndex, unsigned value)
 
virtual ~IdfExtensibleGroup ()=default
 

Additional Inherited Members

- Public Types inherited from openstudio::IdfExtensibleGroup
typedef std::vector
< IdfExtensibleGroup
IdfExtensibleGroupVector
 
- Protected Types inherited from openstudio::WorkspaceExtensibleGroup
typedef
detail::WorkspaceObject_Impl 
ImplType
 
- Protected Member Functions inherited from openstudio::WorkspaceExtensibleGroup
 WorkspaceExtensibleGroup (std::shared_ptr< detail::WorkspaceObject_Impl > impl, unsigned index)
 

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 ( )
overridevirtualdefault
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