OWBI1::CIMProperty Class Reference

The CIMProperty class encapsulates all data and functionality petinent to a CIM property found in a CIM class or a CIM Instance. More...

#include <OWBI1_CIMProperty.hpp>

Inheritance diagram for OWBI1::CIMProperty:

Inheritance graph
[legend]
Collaboration diagram for OWBI1::CIMProperty:

Collaboration graph
[legend]
List of all members.

Public Types

typedef detail::CIMPropertyRepRef
CIMProperty::* 
safe_bool

Public Member Functions

 CIMProperty ()
 Create a new CIMProperty object.
 CIMProperty (CIMNULL_t)
 Create a NULL CIMProperty object.
 CIMProperty (const CIMName &name)
 Create an CIMProperty object with a given name.
 CIMProperty (const char *name)
 Create an CIMProperty object with a given name.
 CIMProperty (const CIMName &name, const CIMValue &value)
 Create an CIMProperty object with a name and a value.
 CIMProperty (const CIMName &name, const CIMDataType &dt)
 Create an CIMProperty object with a name and a type.
 CIMProperty (const CIMProperty &arg)
 Copy constructor.
 CIMProperty (const detail::CIMPropertyRepRef &rep)
 ~CIMProperty ()
 Destroy this CIMProperty object.
virtual void setNull ()
 Set this to a null object.
CIMPropertyoperator= (const CIMProperty &arg)
 Assignment operator.
 operator safe_bool () const
bool operator! () const
CIMQualifierArray getQualifiers () const
 Get the qualifiers for this property.
CIMPropertysetQualifiers (const CIMQualifierArray &quals)
 Set the qualifiers for this property object.
CIMName getOriginClass () const
 Get the origin class for this property.
CIMPropertysetOriginClass (const CIMName &originCls)
 Set the origin class for this property.
CIMPropertysetValue (const CIMValue &val)
 Set the value of this property.
CIMValue getValue () const
CIMValue getValueT () const
CIMPropertysetDataType (const CIMDataType &type)
 Set the data type for this property.
CIMPropertysetDataType (const CIMDataType::Type &type)
 Set the data type for this property.
CIMDataType getDataType () const
Int32 getSize () const
CIMPropertysetDataSize (Int32 size)
 Set the size of the data for this property.
CIMPropertysetOverridingProperty (const CIMName &opname)
 Set the overriding property name.
CIMName getOverridingProperty () const
bool isReference () const
CIMQualifier getQualifier (const CIMName &name) const
 Get the qualifier associated with the given name from this property.
CIMQualifier getQualifierT (const CIMName &name) const
 Get the qualifier associated with the given name from this property.
CIMPropertysetQualifier (const CIMQualifier &qual)
 Set the value of a qaulifier on this property.
bool addQualifier (const CIMQualifier &qual)
 Add a qualifier to this property.
bool removeQualifier (const CIMName &name)
 Remove a qualifier from this property.
bool isKey () const
CIMPropertysetPropagated (bool propagated=true)
 Set the propagated flag on this property.
bool getPropagated () const
 Get the propagated flag for this property.
virtual CIMName getName () const
virtual void setName (const CIMName &name)
 Set the name of this CIMProperty object.
virtual void writeObject (std::ostream &ostrm) const
 Write this CIMProperty to the given output stream.
virtual void writeObject (std::ostream &ostrm, WBEMFlags::EIncludeQualifiersFlag includeQualifiers) const
 Write this CIMProperty, optionally omitting all qualifiers except the key qualifier.
virtual void readObject (std::istream &istrm)
 Read this CIIMProperty object from the given input stream.
virtual String toString () const
virtual String toMOF () const
bool hasTrueQualifier (const CIMName &name) const
 Test if this property has a qualifier that is a boolean type with a value of true.
detail::CIMPropertyRepRef getRep () const

Static Public Attributes

static const char *const NAME_PROPERTY = "Name"

Private Attributes

detail::CIMPropertyRepRef m_rep

Detailed Description

The CIMProperty class encapsulates all data and functionality petinent to a CIM property found in a CIM class or a CIM Instance.

Definition at line 54 of file OWBI1_CIMProperty.hpp.


Member Typedef Documentation

typedef detail::CIMPropertyRepRef CIMProperty::* OWBI1::CIMProperty::safe_bool
 

Definition at line 111 of file OWBI1_CIMProperty.hpp.


Constructor & Destructor Documentation

OWBI1::CIMProperty::CIMProperty  ) 
 

Create a new CIMProperty object.

Definition at line 63 of file OWBI1_CIMProperty.cpp.

OWBI1::CIMProperty::CIMProperty CIMNULL_t   )  [explicit]
 

Create a NULL CIMProperty object.

Definition at line 68 of file OWBI1_CIMProperty.cpp.

OWBI1::CIMProperty::CIMProperty const CIMName name  )  [explicit]
 

Create an CIMProperty object with a given name.

Parameters:
name The name for this CIMProperty object

Definition at line 73 of file OWBI1_CIMProperty.cpp.

OWBI1::CIMProperty::CIMProperty const char *  name  )  [explicit]
 

Create an CIMProperty object with a given name.

Parameters:
name The name for this CIMProperty object as a NULL terminated string.

Definition at line 78 of file OWBI1_CIMProperty.cpp.

OWBI1::CIMProperty::CIMProperty const CIMName name,
const CIMValue value
 

Create an CIMProperty object with a name and a value.

Parameters:
name The name for this CIMProperty object.
value The value of this CIMProperty

Definition at line 83 of file OWBI1_CIMProperty.cpp.

OWBI1::CIMProperty::CIMProperty const CIMName name,
const CIMDataType dt
 

Create an CIMProperty object with a name and a type.

Parameters:
name The name for this CIMProperty object.
dt The type of this CIMProperty

Definition at line 88 of file OWBI1_CIMProperty.cpp.

OWBI1::CIMProperty::CIMProperty const CIMProperty arg  ) 
 

Copy constructor.

Parameters:
arg The CIMProperty to make this object a copy of.

Definition at line 93 of file OWBI1_CIMProperty.cpp.

OWBI1::CIMProperty::CIMProperty const detail::CIMPropertyRepRef rep  )  [explicit]
 

Definition at line 99 of file OWBI1_CIMProperty.cpp.

OWBI1::CIMProperty::~CIMProperty  ) 
 

Destroy this CIMProperty object.

Definition at line 105 of file OWBI1_CIMProperty.cpp.


Member Function Documentation

bool OWBI1::CIMProperty::addQualifier const CIMQualifier qual  ) 
 

Add a qualifier to this property.

Parameters:
qual The CIMQualifier to add to this property.
Returns:
true if added, false if it already exists

Definition at line 248 of file OWBI1_CIMProperty.cpp.

References OWBI1::CIMQualifier::getRep(), and m_rep.

CIMDataType OWBI1::CIMProperty::getDataType  )  const
 

Returns:
The CIMDataType for this property.

Definition at line 186 of file OWBI1_CIMProperty.cpp.

References m_rep.

CIMName OWBI1::CIMProperty::getName  )  const [virtual]
 

Returns:
The name of this CIMProperty

Implements OWBI1::CIMElement.

Definition at line 287 of file OWBI1_CIMProperty.cpp.

References m_rep.

Referenced by getValueT(), OWBI1::CIMInstance::setProperty(), OWBI1::CIMClass::setProperty(), and OWBI1::CIMInstance::updatePropertyValue().

CIMName OWBI1::CIMProperty::getOriginClass  )  const
 

Get the origin class for this property.

Returns:
The name of the origin class of this property.

Definition at line 136 of file OWBI1_CIMProperty.cpp.

References m_rep.

CIMName OWBI1::CIMProperty::getOverridingProperty  )  const
 

Returns:
The name of the overriding property.

Definition at line 212 of file OWBI1_CIMProperty.cpp.

References m_rep.

bool OWBI1::CIMProperty::getPropagated  )  const
 

Get the propagated flag for this property.

Returns:
true if this property is propagated. Otherwise false.

Definition at line 281 of file OWBI1_CIMProperty.cpp.

References m_rep.

CIMQualifier OWBI1::CIMProperty::getQualifier const CIMName name  )  const
 

Get the qualifier associated with the given name from this property.

Parameters:
name The name of the qualifier to retrieve.
Returns:
The CIMQualifier associated with the given name if there is one. Otherwise return a NULL CIMQualifier.

Definition at line 224 of file OWBI1_CIMProperty.cpp.

References m_rep, and name.

Referenced by getQualifierT().

CIMQualifierArray OWBI1::CIMProperty::getQualifiers  )  const
 

Get the qualifiers for this property.

Returns:
An CIMQualifierArray with the qualifiers for this property

Definition at line 123 of file OWBI1_CIMProperty.cpp.

References m_rep.

Referenced by OWBI1::CIMInstance::createModifiedInstance().

CIMQualifier OWBI1::CIMProperty::getQualifierT const CIMName name  )  const
 

Get the qualifier associated with the given name from this property.

Parameters:
name The name of the qualifier to retrieve.
Returns:
The CIMQualifier associated with the given name if there is one. Otherwise a NoSuchQualifierException is thrown.

Definition at line 230 of file OWBI1_CIMProperty.cpp.

References OWBI1::String::c_str(), getQualifier(), name, OWBI1_THROW, and OWBI1::String::toString().

detail::CIMPropertyRepRef OWBI1::CIMProperty::getRep  )  const
 

Referenced by OWBI1::operator<().

Int32 OWBI1::CIMProperty::getSize  )  const
 

Returns:
The size of the data associated with this property

Definition at line 192 of file OWBI1_CIMProperty.cpp.

References m_rep.

CIMValue OWBI1::CIMProperty::getValue  )  const
 

Returns:
The CIMValue object for this property. The value may be NULL.

Definition at line 156 of file OWBI1_CIMProperty.cpp.

References m_rep.

Referenced by OWBI1::CIMInstance::getPropertyValue(), OWBI1::CIMInstance::propertyHasValue(), and OWBI1::CIMInstance::updatePropertyValue().

CIMValue OWBI1::CIMProperty::getValueT  )  const
 

Returns:
The CIMValue object for this property.
Exceptions:
NULLValueException if the value is NULL.

Definition at line 162 of file OWBI1_CIMProperty.cpp.

References getName(), m_rep, and OWBI1_THROW.

bool OWBI1::CIMProperty::hasTrueQualifier const CIMName name  )  const
 

Test if this property has a qualifier that is a boolean type with a value of true.

Parameters:
name The name of the qualifier to test.
Returns:
true if the qualifier exists and has a value of true.

Definition at line 337 of file OWBI1_CIMProperty.cpp.

References m_rep, and name.

bool OWBI1::CIMProperty::isKey  )  const
 

Returns:
true if this property has the key qualifier on it.

Definition at line 268 of file OWBI1_CIMProperty.cpp.

References m_rep.

Referenced by OWBI1::CIMInstance::setProperty(), and OWBI1::CIMInstance::updatePropertyValue().

bool OWBI1::CIMProperty::isReference  )  const
 

Returns:
true if this property is a reference. Otherwise return false.

Definition at line 218 of file OWBI1_CIMProperty.cpp.

References m_rep.

OWBI1::CIMProperty::operator safe_bool  )  const
 

Returns:
true If this CIMProperty has an implementation.

Definition at line 343 of file OWBI1_CIMProperty.cpp.

References m_rep.

bool OWBI1::CIMProperty::operator!  )  const
 

Definition at line 350 of file OWBI1_CIMProperty.cpp.

References m_rep.

CIMProperty & OWBI1::CIMProperty::operator= const CIMProperty arg  ) 
 

Assignment operator.

Parameters:
arg The CIMProperty object to assign to this one.
Returns:
A reference to this object after the assignment is made.

Definition at line 116 of file OWBI1_CIMProperty.cpp.

References m_rep.

virtual void OWBI1::CIMProperty::readObject std::istream &  istrm  )  [virtual]
 

Read this CIIMProperty object from the given input stream.

Parameters:
istrm The input stream to read this CIMElement from.

Implements OWBI1::SerializableIFC.

bool OWBI1::CIMProperty::removeQualifier const CIMName name  ) 
 

Remove a qualifier from this property.

Parameters:
qname The name of the qualifier to remove.
Returns:
true if the qualifier was found and removed. Otherwise false.

Definition at line 262 of file OWBI1_CIMProperty.cpp.

References m_rep, and name.

CIMProperty & OWBI1::CIMProperty::setDataSize Int32  size  ) 
 

Set the size of the data for this property.

Parameters:
size The size of the data associated with property.
Returns:
a reference to *this

Definition at line 198 of file OWBI1_CIMProperty.cpp.

References m_rep.

CIMProperty & OWBI1::CIMProperty::setDataType const CIMDataType::Type type  ) 
 

Set the data type for this property.

Parameters:
type The CIMDataType::Type for this property
Returns:
a reference to *this

Definition at line 180 of file OWBI1_CIMProperty.cpp.

References setDataType().

CIMProperty & OWBI1::CIMProperty::setDataType const CIMDataType type  ) 
 

Set the data type for this property.

Parameters:
type The CIMDataType for this property
Returns:
a reference to *this

Definition at line 173 of file OWBI1_CIMProperty.cpp.

References m_rep, and type.

Referenced by setDataType().

void OWBI1::CIMProperty::setName const CIMName name  )  [virtual]
 

Set the name of this CIMProperty object.

Parameters:
name The new name for this CIMProperty object.

Implements OWBI1::CIMElement.

Definition at line 293 of file OWBI1_CIMProperty.cpp.

References m_rep, and name.

void OWBI1::CIMProperty::setNull  )  [virtual]
 

Set this to a null object.

Implements OWBI1::CIMBase.

Definition at line 110 of file OWBI1_CIMProperty.cpp.

References m_rep.

CIMProperty & OWBI1::CIMProperty::setOriginClass const CIMName originCls  ) 
 

Set the origin class for this property.

Parameters:
originCls The name of the origin class of this property.
Returns:
a reference to *this

Definition at line 142 of file OWBI1_CIMProperty.cpp.

References OWBI1::CIMName::getRep(), and m_rep.

CIMProperty & OWBI1::CIMProperty::setOverridingProperty const CIMName opname  ) 
 

Set the overriding property name.

Parameters:
opname The name of the overriding property.
Returns:
a reference to *this

Definition at line 205 of file OWBI1_CIMProperty.cpp.

References OWBI1::CIMName::getRep(), and m_rep.

CIMProperty & OWBI1::CIMProperty::setPropagated bool  propagated = true  ) 
 

Set the propagated flag on this property.

Parameters:
propagated If true this property is propagated. Otherwise false.
Returns:
a reference to *this

Definition at line 274 of file OWBI1_CIMProperty.cpp.

References m_rep.

CIMProperty & OWBI1::CIMProperty::setQualifier const CIMQualifier qual  ) 
 

Set the value of a qaulifier on this property.

Parameters:
qual An CIMQualifier to use to update the property qualifier.
Returns:
a reference to *this

Definition at line 241 of file OWBI1_CIMProperty.cpp.

References OWBI1::CIMQualifier::getRep(), and m_rep.

CIMProperty & OWBI1::CIMProperty::setQualifiers const CIMQualifierArray quals  ) 
 

Set the qualifiers for this property object.

Parameters:
quals An CIMQualifierArray with the new qualifiers for this property object.
Returns:
a reference to *this

Definition at line 129 of file OWBI1_CIMProperty.cpp.

References m_rep.

Referenced by OWBI1::CIMInstance::createModifiedInstance().

CIMProperty & OWBI1::CIMProperty::setValue const CIMValue val  ) 
 

Set the value of this property.

Parameters:
val The CIMValue for this property.
Returns:
a reference to *this

Definition at line 149 of file OWBI1_CIMProperty.cpp.

References m_rep, and val.

String OWBI1::CIMProperty::toMOF  )  const [virtual]
 

Returns:
An String that contains the MOF representation of this CIMProperty object.

Implements OWBI1::CIMBase.

Definition at line 323 of file OWBI1_CIMProperty.cpp.

References m_rep.

String OWBI1::CIMProperty::toString  )  const [virtual]
 

Returns:
The string representation of this CIMProperty.

Implements OWBI1::CIMElement.

Definition at line 317 of file OWBI1_CIMProperty.cpp.

References m_rep.

virtual void OWBI1::CIMProperty::writeObject std::ostream &  ostrm,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers
const [virtual]
 

Write this CIMProperty, optionally omitting all qualifiers except the key qualifier.

Parameters:
ostrm The output stream to write this object to.
includeQulifiers If true write all qualifiers for property

virtual void OWBI1::CIMProperty::writeObject std::ostream &  ostrm  )  const [virtual]
 

Write this CIMProperty to the given output stream.

Parameters:
ostrm The output stream to write this object to.

Implements OWBI1::SerializableIFC.


Member Data Documentation

detail::CIMPropertyRepRef OWBI1::CIMProperty::m_rep [private]
 

Definition at line 297 of file OWBI1_CIMProperty.hpp.

Referenced by addQualifier(), getDataType(), getName(), getOriginClass(), getOverridingProperty(), getPropagated(), getQualifier(), getQualifiers(), getSize(), getValue(), getValueT(), hasTrueQualifier(), isKey(), isReference(), operator safe_bool(), operator!(), operator=(), removeQualifier(), setDataSize(), setDataType(), setName(), setNull(), setOriginClass(), setOverridingProperty(), setPropagated(), setQualifier(), setQualifiers(), setValue(), toMOF(), and toString().

const char *const OWBI1::CIMProperty::NAME_PROPERTY = "Name" [static]
 

Definition at line 57 of file OWBI1_CIMProperty.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:18:14 2006 for openwbem by  doxygen 1.4.6