📄 base_property.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 BASE_PROPERTY_H_INTELMBOIELCPP#define BASE_PROPERTY_H_INTELMBOIELCPP//#include <wtypes.h>#include "base_Object.h"#include "base_Enum.h"#include "base_EventProperty.h" // Events Supportnamespace Intel{ namespace Mobile { namespace Battery { class BatteryInstance; }; namespace Context { class BandwidthInstance; class ConnectivityInstance; class PowerInstance; class StorageInstance; class DisplayInstance; }; namespace Network { class LinkProtocolInstance; class NetworkAdapterInstance; class Protocol802_11Instance; class Protocol802_3Instance; class ProtocolWwanInstance; class ProtocolGprsInstance; class ProtocolCdmaInstance; class RadioAdapterInstance; class WiredAdapterInstance; class ProtocolBluetoothPanInstance; }; namespace Storage { class PhysicalDiskInstance; class LogicalDiskInstance; class MemoryInstance; }; namespace Processor { class ProcessorClass; class ProcessorCollection; class ProcessorInstance; class X86ProcessorInstance; class CoreInstance; class X86CoreInstance; class LogicalInstance; class X86LogicalInstance; class ArmProcessorInstance; class ArmCoreInstance; class ArmLogicalInstance; }; namespace Display { class DisplayAdapterInstance; class ::CObserverWrapper;
class DisplayAdapterFactory; }; namespace Rfid { class RfidReaderInstance; }; namespace Base { class InstanceObject; class Observer; //============================================================================== // Base Class for all properties class Property : public Object { friend class ::CObserverWrapper; public: Property( InstanceObject &parent ); void Init( void *pImpl ); public: virtual ~Property(); const InstanceObject* GetParent() const; StringObject GetName () const; StringObject GetType () const; bool IsNull () const; bool IsSettable () const; bool IsStatic () const; bool IsAvailable() const; private: InstanceObject& m_Parent; bool m_EventFlag; public: EventProperty Changed; // The changed event. }; //============================================================================== // Base Class ArrayProperty class ArrayProperty : public Property { protected: ArrayProperty( InstanceObject &parent ); public: virtual ~ArrayProperty(); unsigned __int32 GetSize() const; }; // class ArrayProperty //============================================================================== // Class ByteProperty class ByteProperty : public Property { friend class ::CObserverWrapper; friend class Intel::Mobile::Battery::BatteryInstance; friend class Intel::Mobile::Context::BandwidthInstance; friend class Intel::Mobile::Context::ConnectivityInstance; friend class Intel::Mobile::Context::PowerInstance; friend class Intel::Mobile::Context::StorageInstance; friend class Intel::Mobile::Context::DisplayInstance; friend class Intel::Mobile::Network::LinkProtocolInstance; friend class Intel::Mobile::Network::NetworkAdapterInstance; friend class Intel::Mobile::Network::Protocol802_11Instance; friend class Intel::Mobile::Network::Protocol802_3Instance; friend class Intel::Mobile::Network::ProtocolWwanInstance; friend class Intel::Mobile::Network::ProtocolGprsInstance; friend class Intel::Mobile::Network::ProtocolCdmaInstance; friend class Intel::Mobile::Network::RadioAdapterInstance; friend class Intel::Mobile::Network::WiredAdapterInstance; friend class Intel::Mobile::Network::ProtocolBluetoothPanInstance; friend class Intel::Mobile::Processor::ProcessorInstance; friend class Intel::Mobile::Processor::X86ProcessorInstance; friend class Intel::Mobile::Processor::ArmProcessorInstance; friend class Intel::Mobile::Storage::PhysicalDiskInstance; friend class Intel::Mobile::Storage::LogicalDiskInstance; friend class Intel::Mobile::Storage::MemoryInstance; friend class Intel::Mobile::Display::DisplayAdapterInstance; friend class Intel::Mobile::Rfid::RfidReaderInstance; private: ByteProperty( InstanceObject &parent ); public: unsigned char GetValue(); bool SetValue( unsigned char Value ); }; //============================================================================== // Class IntProperty class IntProperty : public Property { friend class ::CObserverWrapper; friend class Intel::Mobile::Battery::BatteryInstance; friend class Intel::Mobile::Context::BandwidthInstance; friend class Intel::Mobile::Context::ConnectivityInstance; friend class Intel::Mobile::Context::PowerInstance; friend class Intel::Mobile::Context::StorageInstance; friend class Intel::Mobile::Context::DisplayInstance; friend class Intel::Mobile::Network::LinkProtocolInstance; friend class Intel::Mobile::Network::NetworkAdapterInstance; friend class Intel::Mobile::Network::Protocol802_11Instance; friend class Intel::Mobile::Network::Protocol802_3Instance; friend class Intel::Mobile::Network::ProtocolWwanInstance; friend class Intel::Mobile::Network::ProtocolGprsInstance; friend class Intel::Mobile::Network::ProtocolCdmaInstance; friend class Intel::Mobile::Network::RadioAdapterInstance; friend class Intel::Mobile::Network::WiredAdapterInstance; friend class Intel::Mobile::Network::ProtocolBluetoothPanInstance; friend class Intel::Mobile::Processor::ProcessorInstance; friend class Intel::Mobile::Processor::X86ProcessorInstance; friend class Intel::Mobile::Processor::ArmProcessorInstance; friend class Intel::Mobile::Storage::PhysicalDiskInstance; friend class Intel::Mobile::Storage::LogicalDiskInstance; friend class Intel::Mobile::Storage::MemoryInstance; friend class Intel::Mobile::Display::DisplayAdapterInstance; friend class Intel::Mobile::Rfid::RfidReaderInstance; private: IntProperty( InstanceObject &parent ); public: __int32 GetValue(); bool SetValue( __int32 Value ); }; //============================================================================== // Class UIntProperty class UIntProperty : public Property { friend class ::CObserverWrapper; friend class Intel::Mobile::Battery::BatteryInstance; friend class Intel::Mobile::Context::BandwidthInstance; friend class Intel::Mobile::Context::ConnectivityInstance; friend class Intel::Mobile::Context::PowerInstance; friend class Intel::Mobile::Context::StorageInstance; friend class Intel::Mobile::Context::DisplayInstance; friend class Intel::Mobile::Network::LinkProtocolInstance; friend class Intel::Mobile::Network::NetworkAdapterInstance; friend class Intel::Mobile::Network::Protocol802_11Instance; friend class Intel::Mobile::Network::Protocol802_3Instance; friend class Intel::Mobile::Network::ProtocolWwanInstance; friend class Intel::Mobile::Network::ProtocolGprsInstance; friend class Intel::Mobile::Network::ProtocolCdmaInstance; friend class Intel::Mobile::Network::RadioAdapterInstance; friend class Intel::Mobile::Network::WiredAdapterInstance; friend class Intel::Mobile::Network::ProtocolBluetoothPanInstance; friend class Intel::Mobile::Processor::ProcessorInstance; friend class Intel::Mobile::Processor::X86ProcessorInstance; friend class Intel::Mobile::Processor::ArmProcessorInstance; friend class Intel::Mobile::Processor::CoreInstance; friend class Intel::Mobile::Processor::LogicalInstance; friend class Intel::Mobile::Storage::PhysicalDiskInstance; friend class Intel::Mobile::Storage::LogicalDiskInstance; friend class Intel::Mobile::Storage::MemoryInstance; friend class Intel::Mobile::Display::DisplayAdapterInstance; friend class Intel::Mobile::Rfid::RfidReaderInstance; private: UIntProperty( InstanceObject &parent ); public: unsigned __int32 GetValue(); bool SetValue( unsigned __int32 Value ); }; //============================================================================== // Class Int64Property class Int64Property : public Property { friend class ::CObserverWrapper; friend class Intel::Mobile::Battery::BatteryInstance; friend class Intel::Mobile::Context::BandwidthInstance; friend class Intel::Mobile::Context::ConnectivityInstance; friend class Intel::Mobile::Context::PowerInstance; friend class Intel::Mobile::Context::StorageInstance; friend class Intel::Mobile::Context::DisplayInstance; friend class Intel::Mobile::Network::LinkProtocolInstance; friend class Intel::Mobile::Network::NetworkAdapterInstance; friend class Intel::Mobile::Network::Protocol802_11Instance; friend class Intel::Mobile::Network::Protocol802_3Instance; friend class Intel::Mobile::Network::ProtocolWwanInstance; friend class Intel::Mobile::Network::ProtocolGprsInstance; friend class Intel::Mobile::Network::ProtocolCdmaInstance; friend class Intel::Mobile::Network::RadioAdapterInstance;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -