void Numeric<t_type>::get(t_type &outValue) const throw (ValueOutOfRange) { if (std::numeric_limits<t_type>::is_signed) { LONGLONG result = 0; bool converted = internal::convert(mData, result, sizeof(t_type), mIngoreWhitespace, mBase); if (!converted) ZS_THROW_CUSTOM(ValueOutOfRange, "Cannot convert value (generic): " + mData) outValue = static_cast<t_type>(result); return; } ULONGLONG result = 0; bool converted = internal::convert(mData, result, sizeof(t_type), mIngoreWhitespace, mBase); if (!converted) ZS_THROW_CUSTOM(ValueOutOfRange, "Cannot convert value: " + mData) outValue = static_cast<t_type>(result); }
void Numeric<Time>::get(Time &outValue) const throw (ValueOutOfRange) { Time result; bool converted = internal::convert(mData, result, mIngoreWhitespace); if (!converted) ZS_THROW_CUSTOM(ValueOutOfRange, "Cannot convert value (Time): " + mData) outValue = result; }
void Numeric<float>::get(float &outValue) const throw (ValueOutOfRange) { float result = 0; bool converted = internal::convert(mData, result, mIngoreWhitespace); if (!converted) ZS_THROW_CUSTOM(ValueOutOfRange, "Cannot convert value (float): " + mData) outValue = result; }
//------------------------------------------------------------------------- void MessageQueueThreadUsingCurrentGUIMessageQueueForWindows::notifyMessagePosted() { AutoLock lock(mLock); if (NULL == mHWND) { ZS_THROW_CUSTOM(Exceptions::MessageQueueAlreadyDeleted, "message posted to message queue after message queue was deleted.") } ZS_THROW_BAD_STATE_IF(0 == ::PostMessage(mHWND, getGlobal().mCustomMessage, (WPARAM)0, (LPARAM)0)) }