#include <ModelExtensibleGroup.hpp>
Public Member Functions | |
virtual | ~ModelExtensibleGroup () |
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... | |
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.
|
inlinevirtual |
|
inline |
Get the ModelObject of type T pointed to from fieldIndex of this extensible group, if possible.
|
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().
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