#include <ScheduleTypeRegistry.hpp>
Public Member Functions | |
std::vector< std::string > | classNames () const |
Returns the names of classes that have ScheduleTypes registered with the ScheduleTypeRegistry. More... | |
std::string | getDefaultName (const ScheduleType &scheduleType) const |
ScheduleTypeLimits | getOrCreateScheduleTypeLimits (const ScheduleType &scheduleType, Model &model) const |
Finds and returns a compatible ScheduleTypeLimits already in model, or creates and returns a new one. More... | |
ScheduleType | getScheduleType (const std::string &className, const std::string &scheduleDisplayName) const |
Returns a particular ScheduleType, based on the className and scheduleDisplayName keys. More... | |
std::vector< ScheduleType > | getScheduleTypesByClassName (const std::string &className) const |
Returns all the ScheduleTypes registered for className. More... | |
Related Functions | |
(Note that these are not member functions.) | |
bool | checkOrAssignScheduleTypeLimits (const std::string &className, const std::string &scheduleDisplayName, Schedule &schedule) |
If schedule.scheduleTypeLimtis(), returns true if that ScheduleTypeLimits isCompatible and otherwise returns false. More... | |
std::vector< ScheduleTypeLimits > | getCompatibleScheduleTypeLimits (const Model &model, const std::string &className, const std::string &scheduleDisplayName) |
Returns all of the ScheduleTypeLimtis already in model that are compatible with className and scheduleDisplayName. More... | |
bool | isCompatible (const std::string &className, const std::string &scheduleDisplayName, const ScheduleTypeLimits &candidate) |
Returns true if candidate is consistent with the ScheduleType that corresponds to className and scheduleRelationshipName. More... | |
using | ScheduleTypeRegistry = openstudio::Singleton< ScheduleTypeRegistrySingleton > |
Singleton class that contains a registry of all types of schedules that can exist in a Model.
Do not use directly, but rather, use the ScheduleTypeRegistry typedef (e.g.
).
std::vector<std::string> openstudio::model::ScheduleTypeRegistrySingleton::classNames | ( | ) | const |
Returns the names of classes that have ScheduleTypes registered with the ScheduleTypeRegistry.
std::string openstudio::model::ScheduleTypeRegistrySingleton::getDefaultName | ( | const ScheduleType & | scheduleType | ) | const |
ScheduleTypeLimits openstudio::model::ScheduleTypeRegistrySingleton::getOrCreateScheduleTypeLimits | ( | const ScheduleType & | scheduleType, |
Model & | model | ||
) | const |
Finds and returns a compatible ScheduleTypeLimits already in model, or creates and returns a new one.
If the scheduleType is not fully specified, that is, if at least one of lowerLimitValue and upperLimitValue are not fixed, a new ScheduleTypeLimits is always created so the user can change those limits at will.
ScheduleType openstudio::model::ScheduleTypeRegistrySingleton::getScheduleType | ( | const std::string & | className, |
const std::string & | scheduleDisplayName | ||
) | const |
Returns a particular ScheduleType, based on the className and scheduleDisplayName keys.
Throws if there is no such ScheduleType registered.
std::vector<ScheduleType> openstudio::model::ScheduleTypeRegistrySingleton::getScheduleTypesByClassName | ( | const std::string & | className | ) | const |
Returns all the ScheduleTypes registered for className.
|
related |
If schedule.scheduleTypeLimtis(), returns true if that ScheduleTypeLimits isCompatible and otherwise returns false.
Otherwise, uses ScheduleTypeRegistrySingleton::getOrCreateScheduleTypeLimits to find an appropriate ScheduleTypeLimits and then calls Schedule::setScheduleTypeLimtis, which should succeed in this case. This method is used by all of the ModelObject methods that set schedules.
|
related |
Returns all of the ScheduleTypeLimtis already in model that are compatible with className and scheduleDisplayName.
May be used instead of ScheduleTypeRegistrySingleton::getOrCreateScheduleTypeLimits to reduce the number of ScheduleTypeLimits that are ultimately created and present in a model.
|
related |
Returns true if candidate is consistent with the ScheduleType that corresponds to className and scheduleRelationshipName.
Throws if there is no such ScheduleType.
|
related |