⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 base_property.h

📁 270的linux说明
💻 H
字号:
/*

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.

*///==============================================================================// base_Property.h //       Declaration of : base class Property//                        base class ArrayProperty////                        class  ByteProperty;//                        class  IntProperty;//                        class  UIntProperty;//                        class  Int64Property;//                        class  UInt64Property;//                        class  StringProperty;//                        class  BoolProperty;//                        class  DatetimeProperty;//                        class  FloatProperty;//                        class  ByteArrayProperty;//                        class  IntArrayProperty;//                        class  UIntArrayProperty;//                        class  Int64ArrayProperty;//                        class  UInt64ArrayProperty;//                        class  StringArrayProperty;//                        class  BoolArrayProperty;//                        class  DatetimeArrayProperty;//                        class  FloatArrayProperty;//==============================================================================#ifndef _CLIENT_BASE_PROPERTY_H#define _CLIENT_BASE_PROPERTY_H#include "inc/framework/win2linux.h"#include "inc/framework/basetypes.h"#include "base_Object.h"#include "base_Enum.h"#include "base_EventClient.h"namespace Intel{	namespace Mobile	{		namespace BaseAPI		{			class InstanceObject;			class Observer;			//==============================================================================			// Base Class for all properties			class Property : public EventClient			{			public:				Property( void *pImpl, const IntelMobileChar* pszType  = NULL );				virtual ~Property();				const InstanceObject*  GetParent() const;				//========================================================				IntelMobileChar* GetName    () const;				bool     IsNull     () const;				bool     IsSettable () const;				bool     IsStatic   () const;				IntelMobileChar* GetType	() const;				IntelMobileChar* GetNameType() const;				void	 SetNameType( IntelMobileChar* sNameType );				bool	IsAvailable()  const;				virtual bool AddObserver   ( Event::EventType eType, Observer& observer );				virtual bool RemoveObserver( Event::EventType eType, Observer& observer );				virtual bool IsEventAvailable( Event::EventType eType );				protected:				void	CheckValid() const;			private:				// For process-associated property				bool	IsProcessProperty () const;				IntelMobileChar* m_sType;				IntelMobileChar* m_sNameType;			};			//==============================================================================			// Base Class ArrayProperty			class ArrayProperty : public Property			{			public:				ArrayProperty( void *pImpl, const IntelMobileChar* pszType  = NULL );				virtual ~ArrayProperty();				unsigned __int32 GetSize() const;			}; // class ArrayProperty			//==============================================================================			// Class ByteProperty			class ByteProperty : public Property			{			public:				ByteProperty( void *pImpl );				unsigned char    GetValue();				bool SetValue( unsigned char Value );			};			//==============================================================================			// Class IntProperty			class IntProperty : public Property			{			public:				IntProperty( void *pImpl );				__int32  GetValue();				bool SetValue( __int32 Value );			};			//==============================================================================			// Class UIntProperty			class UIntProperty : public Property			{			public:				UIntProperty( void *pImpl );				unsigned __int32  GetValue();				bool SetValue( unsigned __int32 Value );			};			//==============================================================================			// Class Int64Property			class Int64Property : public Property			{			public:				Int64Property( void *pImpl );				__int64  GetValue();				bool SetValue( __int64 Value );			};			//==============================================================================			// Class UInt64Property			class UInt64Property : public Property			{			public:				UInt64Property( void *pImpl );				unsigned __int64  GetValue();				bool SetValue( unsigned __int64 Value );			};			//==============================================================================			// Class StringProperty			class StringProperty : public Property			{			public:				StringProperty( void *pImpl );				IntelMobileChar*  GetValue();				bool SetValue( IntelMobileChar* Value );			};			//==============================================================================			// Class BoolProperty			class BoolProperty : public Property			{			public:				BoolProperty( void *pImpl );				bool  GetValue();				bool SetValue( bool Value );			};			//==============================================================================			// Class DateTimeProperty			class DateTimeProperty : public Property			{			public:				DateTimeProperty( void *pImpl );				DATE  GetValue();				bool SetValue( DATE Value );			};			//==============================================================================			// Class FloatProperty			class FloatProperty : public Property			{			public:				FloatProperty( void *pImpl );				float  GetValue();				bool SetValue( float Value );			};			//==============================================================================			// Class ByteArrayProperty			class ByteArrayProperty : public ArrayProperty			{			public:				ByteArrayProperty( void *pImpl );				unsigned char  GetValue( unsigned __int32 Offset );				bool SetValue( unsigned __int32 Offset, unsigned char Value );				__int32 Add( unsigned char Value );				bool Insert( unsigned __int32 Offset, unsigned char Value );				bool Remove( unsigned char Value );				bool Contains(  unsigned char Value );			};			//==============================================================================			// Class IntArrayProperty			class IntArrayProperty : public ArrayProperty			{			public:				IntArrayProperty( void *pImpl );				__int32  GetValue( unsigned __int32 Offset );				bool SetValue( unsigned __int32 Offset, __int32 Value );				__int32 Add( __int32 Value );				bool Insert( unsigned __int32 Offset, __int32 Value );				bool Remove( __int32 Value );				bool Contains(  __int32 Value );			};			//==============================================================================			// Class UIntArrayProperty			class UIntArrayProperty : public ArrayProperty			{			public:				UIntArrayProperty( void *pImpl );				unsigned __int32  GetValue( unsigned __int32 Offset );				bool SetValue( unsigned __int32 Offset, unsigned __int32 Value );				__int32 Add( unsigned __int32 Value );				bool Insert( unsigned __int32 Offset, unsigned __int32 Value );				bool Remove( unsigned __int32 Value );				bool Contains(  unsigned __int32 Value );			};			//==============================================================================			// Class Int64ArrayProperty			class Int64ArrayProperty : public ArrayProperty			{			public:				Int64ArrayProperty( void *pImpl );				__int64 GetValue( unsigned __int32 Offset );				bool SetValue( unsigned __int32 Offset, __int64 Value );				__int32 Add( __int64 Value );				bool Insert( unsigned __int32 Offset, __int64 Value );				bool Remove( __int64 Value );				bool Contains(  __int64 Value );			};			//==============================================================================			// Class UInt64ArrayProperty			class UInt64ArrayProperty : public ArrayProperty			{			public:				UInt64ArrayProperty( void *pImpl );				unsigned __int64 GetValue( unsigned __int32 Offset );				bool SetValue( unsigned __int32 Offset, unsigned __int64 Value );				__int32 Add( unsigned __int64 Value );				bool Insert( unsigned __int32 Offset, unsigned __int64 Value );				bool Remove( unsigned __int64 Value );				bool Contains(  unsigned __int64 Value );			};			//==============================================================================			// Class StringArrayProperty			class StringArrayProperty : public ArrayProperty			{			public:				StringArrayProperty( void *pImpl );				IntelMobileChar* GetValue( unsigned __int32 Offset );				bool SetValue( unsigned __int32 Offset, IntelMobileChar* Value );				__int32 Add( IntelMobileChar* Value );				bool Insert( unsigned __int32 Offset, IntelMobileChar* Value );				bool Remove( IntelMobileChar* Value );				bool Contains( IntelMobileChar* Value );			};			//==============================================================================			// Class BoolArrayProperty			class BoolArrayProperty : public ArrayProperty			{			public:				BoolArrayProperty( void *pImpl );				bool GetValue( unsigned __int32 Offset );				bool SetValue( unsigned __int32 Offset, bool Value );				__int32 Add( bool Value );				bool Insert( unsigned __int32 Offset, bool Value );				bool Remove( bool Value );				bool Contains( bool Value );			};			//==============================================================================			// Class DateTimeArrayProperty			class DateTimeArrayProperty : public ArrayProperty			{			public:				DateTimeArrayProperty( void *pImpl );				DATE GetValue( unsigned __int32 Offset );				bool SetValue( unsigned __int32 Offset, DATE Value );				__int32 Add( DATE Value );				bool Insert( unsigned __int32 Offset, DATE Value );				bool Remove( DATE Value );				bool Contains( DATE Value );			};			//==============================================================================			// Class FloatArrayProperty			class FloatArrayProperty : public ArrayProperty			{			public:				FloatArrayProperty( void *pImpl );				float GetValue( unsigned __int32 Offset );				bool SetValue( unsigned __int32 Offset, float Value );				__int32 Add( float Value );				bool Insert( unsigned __int32 Offset, float Value );				bool Remove( float Value );				bool Contains( float Value );			};		}	}}//==============================================================================#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -