?? valuethreshold.cpp
字號:
/*
Copyright (c) 2008, Intel Corporation.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*///==============================================================================// ValueThreshold.cpp // Implementation of base class ValueThreshold//==============================================================================#include "./ValueThreshold.h" #include "../ThresholdImpl/ValueThreshold_Impl.h" #include "../Base/base_Property.h"using namespace Intel::Mobile::ThresholdAPI;//==============================================================================// C-Tor() : Default constructor//==============================================================================ValueThreshold::ValueThreshold(){}//==============================================================================// D-Tor() : //==============================================================================ValueThreshold::~ValueThreshold(){}//==============================================================================// GetNotifyMatch() : //==============================================================================bool ValueThreshold::GetNotifyMatch() const { CheckValid( IntelMobileText("ValueThreshold"), IntelMobileText("GetNotifyMatch") ); return (*reinterpret_cast<ValueThresholdImplPtr*>(m_pImpl))->GetNotifyMatch(); } // GetNotifyHigh()//==============================================================================// GetNotifyDiffer() : //==============================================================================bool ValueThreshold::GetNotifyDiffer() const { CheckValid( IntelMobileText("ValueThreshold"), IntelMobileText("GetNotifyDiffer") ); return (*reinterpret_cast<ValueThresholdImplPtr*>(m_pImpl))->GetNotifyDiffer(); } // GetNotifyDiffer()//==============================================================================// SetNotifyMatch() : //==============================================================================bool ValueThreshold::SetNotifyMatch( bool bNotify ) { CheckValid( IntelMobileText("ValueThreshold"), IntelMobileText("SetNotifyMatch") ); return (*reinterpret_cast<ValueThresholdImplPtr*>(m_pImpl))->SetNotifyMatch( bNotify ); } // SetNotifyMatch()//==============================================================================// SetNotifyDiffer() : //==============================================================================bool ValueThreshold::SetNotifyDiffer( bool bNotify ) { CheckValid( IntelMobileText("ValueThreshold"), IntelMobileText("SetNotifyDiffer") ); return (*reinterpret_cast<ValueThresholdImplPtr*>(m_pImpl))->SetNotifyDiffer( bNotify ); } // SetNotifyDiffer()// END CLASS DEFINITION ValueThreshold//------------------------------------------------------------------------// // Class: StringValueThreshold////------------------------------------------------------------------------//==============================================================================// C-Tor() : Constructor//==============================================================================StringValueThreshold::StringValueThreshold(){ // Instantiate a new SmartPointer containing a new Impl object m_pImpl = new StringValueThresholdImplPtr( new StringValueThresholdImpl( this, IntelMobileText("") ) );}//==============================================================================// SetObservedProperty() : //==============================================================================bool StringValueThreshold::SetObservedProperty( const StringProperty& observedProperty ){ CheckValid( IntelMobileText("StringValueThreshold"), IntelMobileText("SetObservedProperty") ); return Threshold::SetObservedProperty( observedProperty ); } // SetObservedProperty()//==============================================================================// SetValue() : //==============================================================================bool StringValueThreshold::SetValue( const IntelMobileChar* pszValue ){ CheckValid( IntelMobileText("StringValueThreshold"), IntelMobileText("SetValue") ); return (*reinterpret_cast<StringValueThresholdImplPtr*>(m_pImpl))->SetValue( pszValue ); } // SetValue() //==============================================================================// GetValue() : //==============================================================================const IntelMobileChar* StringValueThreshold::GetValue( ) const{ CheckValid( IntelMobileText("StringValueThreshold"), IntelMobileText("GetValue") ); return (*reinterpret_cast<StringValueThresholdImplPtr*>(m_pImpl))->GetValue();} // GetValue()//end class StringValueThreshold //ByteValueThreshold::ByteValueThreshold()// : m_Value(0)//{//}//ByteValueThreshold::ByteValueThreshold( unsigned char value, bool notifyMatch, bool notifyDiffer, Property* pObservedProperty, long granularityPeriod, ThresholdObserver* thresholdObserver)// : m_Value(value)// , ValueThreshold(notifyMatch, notifyDiffer, pObservedProperty, granularityPeriod, thresholdObserver)//{//}//void ByteValueThreshold::SetValue(unsigned char value) { m_Value = value; }//unsigned char ByteValueThreshold::GetValue() { return m_Value; }////end class ByteValueThreshold ////////IntValueThreshold::IntValueThreshold()// : m_Value(0)//{//}//IntValueThreshold::IntValueThreshold( int value, bool notifyMatch, bool notifyDiffer, Property* pObservedProperty, long granularityPeriod, ThresholdObserver* thresholdObserver)// : m_Value(value)// , ValueThreshold(notifyMatch, notifyDiffer, pObservedProperty, granularityPeriod, thresholdObserver)//{//}//void IntValueThreshold::SetValue(int value) { m_Value = value; }//int IntValueThreshold::GetValue() { return m_Value; }////end class IntValueThreshold ////////UIntValueThreshold::UIntValueThreshold()// : m_Value(0)//{//}//UIntValueThreshold::UIntValueThreshold( unsigned int value, bool notifyMatch, bool notifyDiffer, Property* pObservedProperty, long granularityPeriod, ThresholdObserver* thresholdObserver)// : m_Value(value)// , ValueThreshold(notifyMatch, notifyDiffer, pObservedProperty, granularityPeriod, thresholdObserver)//{//}//void UIntValueThreshold::SetValue(unsigned int value) { m_Value = value; }//unsigned int UIntValueThreshold::GetValue() { return m_Value; }////end class UIntValueThreshold ////////Int64ValueThreshold::Int64ValueThreshold()// : m_Value(0)//{//}//Int64ValueThreshold::Int64ValueThreshold( __int64 value, bool notifyMatch, bool notifyDiffer, Property* pObservedProperty, long granularityPeriod, ThresholdObserver* thresholdObserver)// : m_Value(value)// , ValueThreshold(notifyMatch, notifyDiffer, pObservedProperty, granularityPeriod, thresholdObserver)//{//}//void Int64ValueThreshold::SetValue(__int64 value) { m_Value = value; }//__int64 Int64ValueThreshold::GetValue() { return m_Value; }////end class Int64ValueThreshold ////////UInt64ValueThreshold::UInt64ValueThreshold()// : m_Value(0)//{//}//UInt64ValueThreshold::UInt64ValueThreshold( unsigned __int64 value, bool notifyMatch, bool notifyDiffer, Property* pObservedProperty, long granularityPeriod, ThresholdObserver* thresholdObserver)// : m_Value(value)// , ValueThreshold(notifyMatch, notifyDiffer, pObservedProperty, granularityPeriod, thresholdObserver)//{//}//void UInt64ValueThreshold::SetValue(unsigned __int64 value) { m_Value = value; }//unsigned __int64 UInt64ValueThreshold::GetValue() { return m_Value; }////end class UInt64ValueThreshold ////////DateValueThreshold::DateValueThreshold()// : m_Value(0)//{//}//DateValueThreshold::DateValueThreshold( DATE value, bool notifyMatch, bool notifyDiffer, Property* pObservedProperty, long granularityPeriod, ThresholdObserver* thresholdObserver)// : m_Value(value)// , ValueThreshold(notifyMatch, notifyDiffer, pObservedProperty, granularityPeriod, thresholdObserver)//{//}//void DateValueThreshold::SetValue(DATE value) { m_Value = value; }//DATE DateValueThreshold::GetValue() { return m_Value; }////end class DateValueThreshold ////////FloatValueThreshold::FloatValueThreshold()// : m_Value(0)//{//}//FloatValueThreshold::FloatValueThreshold( float value, bool notifyMatch, bool notifyDiffer, Property* pObservedProperty, long granularityPeriod, ThresholdObserver* thresholdObserver)// : m_Value(value)// , ValueThreshold(notifyMatch, notifyDiffer, pObservedProperty, granularityPeriod, thresholdObserver)//{//}//void FloatValueThreshold::SetValue(float value) { m_Value = value; }//float FloatValueThreshold::GetValue() { return m_Value; }////end class FloatValueThreshold //////
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -