CIMKeyBinding Class Reference

#include <CIMObjectPath.h>

Public Types

enum  Type { BOOLEAN, STRING, NUMERIC, REFERENCE }
 

Public Member Functions

 CIMKeyBinding ()
 
 CIMKeyBinding (const CIMKeyBinding &x)
 
 CIMKeyBinding (const CIMName &name, const String &value, Type type)
 
 CIMKeyBinding (const CIMName &name, const CIMValue &value)
 
 ~CIMKeyBinding ()
 
CIMKeyBindingoperator= (const CIMKeyBinding &x)
 
const CIMNamegetName () const
 
void setName (const CIMName &name)
 
const StringgetValue () const
 
void setValue (const String &value)
 
Type getType () const
 
void setType (Type type)
 
Boolean equal (CIMValue value)
 

Detailed Description

The CIMKeyBinding class associates a key name, value, and type. It is used to represent a key binding in a CIMObjectPath.

Member Enumeration Documentation

◆ Type

The CIMKeyBinding Type corresponds to the CIM-XML key binding definition, in which the CIMType values are mapped into categories.

Enumerator
BOOLEAN 

Boolean type

STRING 

String, Char16, and CIMDateTime types

NUMERIC 

Integer and real number types

REFERENCE 

CIMObjectPath (reference) type

Constructor & Destructor Documentation

◆ CIMKeyBinding() [1/4]

CIMKeyBinding::CIMKeyBinding ( )

Constructs a CIMKeyBinding object with null values.

◆ CIMKeyBinding() [2/4]

CIMKeyBinding::CIMKeyBinding ( const CIMKeyBinding x)

Constructs a CIMKeyBinding object from the value of a specified CIMKeyBinding object.

Parameters
xThe CIMKeyBinding object from which to construct a new CIMKeyBinding object.

◆ CIMKeyBinding() [3/4]

CIMKeyBinding::CIMKeyBinding ( const CIMName name,
const String value,
Type  type 
)

Constructs a CIMKeyBinding with a name, value, and type.

Parameters
nameA CIMName containing the key name.
valueA String value for this key.
typeA CIMKeyBinding::Type specifying the type of this key.

◆ CIMKeyBinding() [4/4]

CIMKeyBinding::CIMKeyBinding ( const CIMName name,
const CIMValue value 
)

Constructs a CIMKeyBinding with a key name and CIMValue. The key value and type are taken from the CIMValue. CIM types are converted to key binding types using this mapping:

boolean - BOOLEAN
uint8 - NUMERIC
sint8 - NUMERIC
uint16 - NUMERIC
sint16 - NUMERIC
uint32 - NUMERIC
sint32 - NUMERIC
uint64 - NUMERIC
sint64 - NUMERIC
real32 - NUMERIC
real64 - NUMERIC
char16 - STRING
string - STRING
datetime - STRING
reference - REFERENCE

A value of type CIMTYPE_OBJECT cannot be used in a key binding.

Parameters
nameA CIMName containing the key name.
valueA CIMValue specifying the value and type of this key.
Exceptions
TypeMismatchExceptionIf the type is not a valid key type, false otherwise.

◆ ~CIMKeyBinding()

CIMKeyBinding::~CIMKeyBinding ( )

Destructs the CIMKeyBinding object.

Member Function Documentation

◆ equal()

Boolean CIMKeyBinding::equal ( CIMValue  value)

Compares the value and type of the key binding with a specified CIMValue.

Parameters
valueThe CIMValue to be compared.
Returns
True if the value and type of the key binding are the same as the specified CIMValue, false otherwise.

◆ getName()

const CIMName& CIMKeyBinding::getName ( ) const

Gets the key name for the key binding.

Returns
A CIMName containing the key name.

◆ getType()

Type CIMKeyBinding::getType ( ) const

Gets the key type for the key binding.

Returns
A CIMKeyBinding::Type containing the key type.

◆ getValue()

const String& CIMKeyBinding::getValue ( ) const

Gets the key value for the key binding.

Returns
A String containing the key value.

◆ operator=()

CIMKeyBinding& CIMKeyBinding::operator= ( const CIMKeyBinding x)

Assigns the value of the specified CIMKeyBinding object to this object.

Parameters
xThe CIMKeyBinding object from which to assign this CIMKeyBinding object.
Returns
A reference to this CIMKeyBinding object.

◆ setName()

void CIMKeyBinding::setName ( const CIMName name)

Sets the key name for the key binding.

Parameters
nameA CIMName containing the key name.

◆ setType()

void CIMKeyBinding::setType ( Type  type)

Sets the key type for the key binding.

Parameters
typeA CIMKeyBinding::Type containing the key type.

◆ setValue()

void CIMKeyBinding::setValue ( const String value)

Sets the key value for the key binding.

Parameters
valueA String containing the key value.

The documentation for this class was generated from the following file: