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

#include "ScheduleBase.hpp"

Inheritance diagram for openstudio::model::ScheduleBase:

Public Member Functions

virtual ~ScheduleBase ()
boost::optional
< ScheduleTypeLimits
scheduleTypeLimits () const
bool setScheduleTypeLimits (const ScheduleTypeLimits &scheduleTypeLimits)
bool resetScheduleTypeLimits ()
void ensureNoLeapDays ()

Related Functions

typedef boost::optional
< ScheduleBase
OptionalScheduleBase
typedef std::vector< ScheduleBaseScheduleBaseVector

Detailed Description

ScheduleBase is a ResourceObject that serves as a base class for Schedule and ScheduleDay, that is, objects with ScheduleTypeLimits.

This class provides getters and setters for ScheduleTypeLimits. Note that while users can explicitly set their own ScheduleTypeLimits, we recommend using the ScheduleTypeRegistry and related non-member functions, or letting user ModelObjects set this field, instead.

Constructor & Destructor Documentation

virtual openstudio::model::ScheduleBase::~ScheduleBase ( )
inlinevirtual

Member Function Documentation

void openstudio::model::ScheduleBase::ensureNoLeapDays ( )
bool openstudio::model::ScheduleBase::resetScheduleTypeLimits ( )

Returns true if the scheduleTypeLimits() of this object is successfully cleared.

Will fail if this object is being used by an object that expects it to have a ScheduleTypeLimits.

boost::optional<ScheduleTypeLimits> openstudio::model::ScheduleBase::scheduleTypeLimits ( ) const

Returns the ScheduleTypeLimits of this object, if set.

bool openstudio::model::ScheduleBase::setScheduleTypeLimits ( const ScheduleTypeLimits scheduleTypeLimits)

Returns true if scheduleTypeLimits is compatible with this object and is actually set.

The operation will fail if the Schedule or ScheduleDay is in use in a way that restricts the allowable ScheduleTypeLimits and the new value (scheduleTypeLimits) is incompatible with that use. For instance, if a Schedule is used with a Lights object, then only properly configured fractional ScheduleTypeLimits will succeed. ScheduleDay objects used in a ScheduleRuleset or a ScheduleRule are restricted to use ScheduleTypeLimits compatible with those of their (ScheduleRuleset or ScheduleRule) parent.

Friends And Related Function Documentation

typedef boost::optional<ScheduleBase> OptionalScheduleBase
related
typedef std::vector<ScheduleBase> ScheduleBaseVector
related