----------------------------------------------------------------------------- Clears all switch points from the schedule -----------------------------------------------------------------------------
| 3609 | // Clears all switch points from the schedule |
| 3610 | //----------------------------------------------------------------------------- |
| 3611 | void Manager::ClearSwitchPoints |
| 3612 | ( |
| 3613 | ValueID const& _id |
| 3614 | ) |
| 3615 | { |
| 3616 | if( ValueID::ValueType_Schedule == _id.GetType() ) |
| 3617 | { |
| 3618 | if( Driver* driver = GetDriver( _id.GetHomeId() ) ) |
| 3619 | { |
| 3620 | LockGuard LG(driver->m_nodeMutex); |
| 3621 | if( ValueSchedule* value = static_cast<ValueSchedule*>( driver->GetValue( _id ) ) ) |
| 3622 | { |
| 3623 | value->ClearSwitchPoints(); |
| 3624 | value->Release(); |
| 3625 | } else { |
| 3626 | OZW_ERROR(OZWException::OZWEXCEPTION_INVALID_VALUEID, "Invalid ValueID passed to ClearSwitchPoints"); |
| 3627 | } |
| 3628 | } |
| 3629 | } else { |
| 3630 | OZW_ERROR(OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID, "ValueID passed to ClearSwitchPoints is not a Schedule Value"); |
| 3631 | } |
| 3632 | } |
| 3633 | |
| 3634 | //----------------------------------------------------------------------------- |
| 3635 | // <Manager::GetSwitchPoint> |