OWBI1::CIMClass Class Reference

The CIMClass encapsulates all information that pertains to a CIM class (i.e. More...

#include <OWBI1_CIMClass.hpp>

Inheritance diagram for OWBI1::CIMClass:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef detail::CIMClassRepRef
CIMClass::* 
safe_bool
enum  { SERIALIZATION_VERSION = 2 }
 Binary serialization version. More...

Public Member Functions

 CIMClass ()
 Create a new CIMClass object.
 CIMClass (CIMNULL_t)
 Create a new NULL CIMClass object.
 CIMClass (const CIMName &name)
 Create an CIMClass object with the given name.
 CIMClass (const char *name)
 Create an CIMClass object with the given name.
 CIMClass (const CIMClass &x)
 CIMClass (const detail::CIMClassRepRef &rep)
 ~CIMClass ()
 Destroy this CIMClass object and decrement the refcount on the underlying data.
CIMClassoperator= (const CIMClass &x)
virtual void setNull ()
 Set this to a null object.
CIMName getSuperClass () const
 In the future, this function will be changed to return a CIMName.
CIMName getKeyClass () const
 In the future, this function will be changed to return a CIMName.
CIMClasssetSuperClass (const CIMName &pname)
 Set the name of the parent CIM class for this CIMClass object.
bool isKeyed () const
CIMClasssetIsAssociation (bool isAssocFlag)
 Set the flag that indicates this CIMClass is an association.
CIMClasssetIsKeyed (bool isKeyedParm=true)
 Set the flag that indicates this CIMClass has keys.
CIMPropertyArray getKeys () const
CIMQualifier getQualifier (const CIMName &name) const
 Get a named qualifier from this class.
CIMProperty getProperty (const CIMName &name) const
 Get a named property from this class.
CIMProperty getProperty (const CIMName &name, const CIMName &originClass) const
 Get a named property from this CIMClass.
CIMMethod getMethod (const CIMName &name) const
 Get the method associated with the given name.
CIMMethod getMethod (const CIMName &name, const CIMName &originClass) const
 Get the method associated with the given name from this CIMClass considering the given origin class in the process.
bool isAssociation () const
CIMQualifierArray getQualifiers () const
CIMPropertyArray getAllProperties () const
CIMPropertyArray getProperties () const
CIMMethodArray getAllMethods () const
CIMMethodArray getMethods () const
CIMClassaddProperty (const CIMProperty &prop)
 Add a property to this class.
int numberOfProperties () const
CIMClasssetProperties (const CIMPropertyArray &props)
 Set the properties for this class.
CIMClasssetProperty (const CIMProperty &prop)
 Update a property on this CIMClass if it exists.
CIMClassaddQualifier (const CIMQualifier &qual)
 Add a qualifier to this class.
bool hasQualifier (const CIMQualifier &qual) const
 Check for the existence of a qualifier in this class.
int numberOfQualifiers () const
bool removeQualifier (const CIMQualifier &qual)
 Remove a qualifier from this class.
bool removeQualifier (const CIMName &name)
 Remove a qualifier from this class.
bool removeProperty (const CIMName &name)
 Remove a property from this class.
CIMClasssetQualifiers (const CIMQualifierArray &quals)
 Set the qualifiers for this class.
CIMClasssetQualifier (const CIMQualifier &qual)
 Set the given qualifier on this CIMClass if it is present.
CIMClassaddMethod (const CIMMethod &meth)
 Add a method to this class.
CIMClasssetMethods (const CIMMethodArray &meths)
 Set the methods for this class.
CIMClasssetMethod (const CIMMethod &meth)
 Update/add a method on this CIMClass object.
CIMInstance newInstance () const
 Create a new instance of this CIM Class.
virtual CIMName getName () const
 In the future, this function will be changed to return a CIMName.
virtual void setName (const CIMName &name)
 Set the name associated with this CIMClass object.
virtual void readObject (std::istream &istrm)
 Read this CIMClass object from an input stream.
virtual void writeObject (std::ostream &ostrm) const
 Write this CIMClass object to an output stream.
virtual String toMOF () const
virtual String toString () const
 operator safe_bool () const
bool operator! () const
detail::CIMClassRepRef getRep () const

Private Attributes

detail::CIMClassRepRef m_rep

Classes

struct  CLSData

Detailed Description

The CIMClass encapsulates all information that pertains to a CIM class (i.e.

properties, methods, qualifiers, etc...). CIMClass objects are ref counted/copy on write objects. It is not considered good practice to hold onto the pointer of an CIMClass object since the ref counting mechanism is driven by the construction and destruction process.

Definition at line 57 of file OWBI1_CIMClass.hpp.


Member Typedef Documentation

typedef detail::CIMClassRepRef CIMClass::* OWBI1::CIMClass::safe_bool
 

Definition at line 343 of file OWBI1_CIMClass.hpp.


Member Enumeration Documentation

anonymous enum
 

Binary serialization version.

Version 1 had a language. Since a class doesn't actually have a language it was removed for version 2

Enumerator:
SERIALIZATION_VERSION 

Definition at line 65 of file OWBI1_CIMClass.hpp.


Constructor & Destructor Documentation

CIMClass::CIMClass  ) 
 

Create a new CIMClass object.

Definition at line 95 of file OWBI1_CIMClass.cpp.

CIMClass::CIMClass CIMNULL_t   )  [explicit]
 

Create a new NULL CIMClass object.

Do not call any methods on it or your app may crash.

Definition at line 100 of file OWBI1_CIMClass.cpp.

CIMClass::CIMClass const CIMName name  )  [explicit]
 

Create an CIMClass object with the given name.

Parameters:
name The name for this CIMClass specified as an String.

Definition at line 111 of file OWBI1_CIMClass.cpp.

References name.

CIMClass::CIMClass const char *  name  )  [explicit]
 

Create an CIMClass object with the given name.

Parameters:
name The name for this CIMClass specified as a NULL terminated string.

Definition at line 105 of file OWBI1_CIMClass.cpp.

CIMClass::CIMClass const CIMClass x  ) 
 

Definition at line 712 of file OWBI1_CIMClass.cpp.

CIMClass::CIMClass const detail::CIMClassRepRef rep  )  [explicit]
 

Definition at line 118 of file OWBI1_CIMClass.cpp.

CIMClass::~CIMClass  ) 
 

Destroy this CIMClass object and decrement the refcount on the underlying data.

Definition at line 708 of file OWBI1_CIMClass.cpp.


Member Function Documentation

CIMClass & CIMClass::addMethod const CIMMethod meth  ) 
 

Add a method to this class.

Parameters:
meth The CIMMethod to add to this class
Returns:
a reference to *this

Definition at line 544 of file OWBI1_CIMClass.cpp.

CIMClass & CIMClass::addProperty const CIMProperty prop  ) 
 

Add a property to this class.

Parameters:
prop The property to add to this class.
Returns:
a reference to *this

Definition at line 342 of file OWBI1_CIMClass.cpp.

CIMClass & CIMClass::addQualifier const CIMQualifier qual  ) 
 

Add a qualifier to this class.

Parameters:
qual The CIMQualifier to add to this class.
Returns:
a reference to *this

Definition at line 401 of file OWBI1_CIMClass.cpp.

References i.

CIMMethodArray CIMClass::getAllMethods  )  const
 

Returns:
All the methods for this class, including overides.

Definition at line 320 of file OWBI1_CIMClass.cpp.

CIMPropertyArray CIMClass::getAllProperties  )  const
 

Returns:
All properties for this CIMClass, including overides.

Definition at line 285 of file OWBI1_CIMClass.cpp.

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

CIMName CIMClass::getKeyClass  )  const
 

In the future, this function will be changed to return a CIMName.

Returns:
The name of the CIM class that declared the keys for this class.

Definition at line 291 of file OWBI1_CIMClass.cpp.

References i.

CIMPropertyArray CIMClass::getKeys  )  const
 

Returns:
The properties that are flagged as keys for this CIMClass as as array of CIMProperty objects.

Definition at line 157 of file OWBI1_CIMClass.cpp.

References OWBI1::Array< T >::append(), and i.

Referenced by OWBI1::CIMObjectPath::syncWithClass().

CIMMethod CIMClass::getMethod const CIMName name,
const CIMName originClass
const
 

Get the method associated with the given name from this CIMClass considering the given origin class in the process.

Parameters:
name The name of the method to retrieve
originClass The name of the CIM class where the method originated.
Returns:
The CIMMethod associated with the given name on success. Otherwise a NULL CIMMethod object.

Definition at line 231 of file OWBI1_CIMClass.cpp.

References i, and name.

CIMMethod CIMClass::getMethod const CIMName name  )  const
 

Get the method associated with the given name.

Parameters:
name The name of the method to retrieve. If the name is in the form "originclass.methodname" the origin class of the method will be considered during the search. Otherwise the first method with the given name will be returned.
Returns:
The CIMMethod associated with the name, if found. Otherwise a NULL CIMMethod object.

Definition at line 225 of file OWBI1_CIMClass.cpp.

References name.

CIMMethodArray CIMClass::getMethods  )  const
 

Returns:
The methods for this class, excluding the overides.

Definition at line 326 of file OWBI1_CIMClass.cpp.

References OWBI1::Array< T >::append(), and i.

CIMName CIMClass::getName  )  const [virtual]
 

In the future, this function will be changed to return a CIMName.

Returns:
The name associated with this CIMClass object as an String object.

Implements OWBI1::CIMElement.

Definition at line 731 of file OWBI1_CIMClass.cpp.

CIMPropertyArray CIMClass::getProperties  )  const
 

Returns:
The properties for this CIMClass, excluding the overides.

Definition at line 305 of file OWBI1_CIMClass.cpp.

References OWBI1::Array< T >::append(), and i.

CIMProperty CIMClass::getProperty const CIMName name,
const CIMName originClass
const
 

Get a named property from this CIMClass.

Parameters:
name The name of the property to to retreive.
originClass The name of the origin class the property comes from.
Returns:
The CIMProperty associated with the given name and origin, if found. Otherwise a NULL CIMProperty object.

Definition at line 192 of file OWBI1_CIMClass.cpp.

References i, and name.

CIMProperty CIMClass::getProperty const CIMName name  )  const
 

Get a named property from this class.

Parameters:
name The name of the property to retrieve. If the name is in the form "originclass.propertyname" the origin class of the property will be considered during the search. Otherwise the first property found with the given name will be returned.
Returns:
CIMProperty associated with the name if found. Otherwise a NULL CIMProperty object.

Definition at line 186 of file OWBI1_CIMClass.cpp.

Referenced by OWBI1::CIMInstance::createModifiedInstance(), OWBI1::CIMObjectPath::syncWithClass(), and OWBI1::CIMInstance::syncWithClass().

CIMQualifier CIMClass::getQualifier const CIMName name  )  const
 

Get a named qualifier from this class.

Parameters:
name The name of the qualifer to retreive
Returns:
The CIMQualifier associated with the given name if found. Otherwise a NULL CIMQualifier.

Definition at line 172 of file OWBI1_CIMClass.cpp.

References i, and name.

CIMQualifierArray CIMClass::getQualifiers  )  const
 

Returns:
The qualifiers associated with the CIMClass object.

Definition at line 279 of file OWBI1_CIMClass.cpp.

CIMClassRepRef CIMClass::getRep  )  const
 

Definition at line 781 of file OWBI1_CIMClass.cpp.

CIMName CIMClass::getSuperClass  )  const
 

In the future, this function will be changed to return a CIMName.

Returns:
The name of the parent CIM class of this CIMClass object.

Definition at line 131 of file OWBI1_CIMClass.cpp.

bool CIMClass::hasQualifier const CIMQualifier qual  )  const
 

Check for the existence of a qualifier in this class.

Parameters:
qual The CIMQualifier to check the existence of.
Returns:
true if this class has the qualifer. Otherwise false.

Definition at line 437 of file OWBI1_CIMClass.cpp.

References i.

bool CIMClass::isAssociation  )  const
 

Returns:
true if this CIMClass is an association.

Definition at line 266 of file OWBI1_CIMClass.cpp.

bool CIMClass::isKeyed  )  const
 

Returns:
true if this CIMClass object has key properties.

Definition at line 144 of file OWBI1_CIMClass.cpp.

CIMInstance CIMClass::newInstance  )  const
 

Create a new instance of this CIM Class.

Properties on the instance will be set to the default values specified in this class.

Returns:
A new CIMInstance of this class appropriately initialized.

Definition at line 561 of file OWBI1_CIMClass.cpp.

References OWBI1::CIMInstance::setClassName(), and OWBI1::CIMInstance::syncWithClass().

int CIMClass::numberOfProperties  )  const
 

Returns:
The number of properties for this class.

Definition at line 356 of file OWBI1_CIMClass.cpp.

int CIMClass::numberOfQualifiers  )  const
 

Returns:
The number of the qualifiers for this class.

Definition at line 453 of file OWBI1_CIMClass.cpp.

OWBI1::CIMClass::operator safe_bool  )  const
 

Returns:
true if this CIMClass in not a NULL object.

bool OWBI1::CIMClass::operator!  )  const
 

CIMClass & CIMClass::operator= const CIMClass x  ) 
 

Definition at line 718 of file OWBI1_CIMClass.cpp.

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

Read this CIMClass object from an input stream.

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

Implements OWBI1::SerializableIFC.

bool CIMClass::removeProperty const CIMName name  ) 
 

Remove a property from this class.

Parameters:
name The name of the property to remove from this class.
Returns:
true if the property was removed. Otherwise false.

Definition at line 496 of file OWBI1_CIMClass.cpp.

References i, and name.

bool CIMClass::removeQualifier const CIMName name  ) 
 

Remove a qualifier from this class.

Parameters:
name The name of the qualifier to remove from this class.
Returns:
true if the qualifier was removed. Otherwise false.

Definition at line 479 of file OWBI1_CIMClass.cpp.

References i, and name.

bool CIMClass::removeQualifier const CIMQualifier qual  ) 
 

Remove a qualifier from this class.

Parameters:
qual The qualifier to remove from this class.
Returns:
true if the qualifier was removed. Otherwise false.

Definition at line 459 of file OWBI1_CIMClass.cpp.

References i.

CIMClass & CIMClass::setIsAssociation bool  isAssocFlag  ) 
 

Set the flag that indicates this CIMClass is an association.

Parameters:
isKeyedParm If true this class will be flagged as an association.
Returns:
a reference to *this

Definition at line 272 of file OWBI1_CIMClass.cpp.

CIMClass & CIMClass::setIsKeyed bool  isKeyedParm = true  ) 
 

Set the flag that indicates this CIMClass has keys.

Parameters:
isKeyedParm If true this class is flagged as having keys.
Returns:
a reference to *this

Definition at line 150 of file OWBI1_CIMClass.cpp.

CIMClass & CIMClass::setMethod const CIMMethod meth  ) 
 

Update/add a method on this CIMClass object.

Parameters:
meth The method to add/update on this class.
Returns:
a reference to *this

Definition at line 385 of file OWBI1_CIMClass.cpp.

References OWBI1::CIMMethod::getName(), and i.

CIMClass & CIMClass::setMethods const CIMMethodArray meths  ) 
 

Set the methods for this class.

The old methods will be removed.

Parameters:
meths An CIMMethodArray containing the new methods for this class.
Returns:
a reference to *this

Definition at line 554 of file OWBI1_CIMClass.cpp.

void CIMClass::setName const CIMName name  )  [virtual]
 

Set the name associated with this CIMClass object.

Parameters:
name The new name for this CIMClass object.

Implements OWBI1::CIMElement.

Definition at line 125 of file OWBI1_CIMClass.cpp.

References name.

void CIMClass::setNull  )  [virtual]
 

Set this to a null object.

All subsequent oprations on this object will fail.

Implements OWBI1::CIMBase.

Definition at line 725 of file OWBI1_CIMClass.cpp.

CIMClass & CIMClass::setProperties const CIMPropertyArray props  ) 
 

Set the properties for this class.

All of the old properties are removed.

Parameters:
props An CIMPropertyArray containing the new properties for this CIMClass object.
Returns:
a reference to *this

Definition at line 362 of file OWBI1_CIMClass.cpp.

CIMClass & CIMClass::setProperty const CIMProperty prop  ) 
 

Update a property on this CIMClass if it exists.

If it doesn't exist, this add it.

Parameters:
prop The property to update/add on this class.
Returns:
a reference to *this

Definition at line 369 of file OWBI1_CIMClass.cpp.

References OWBI1::CIMProperty::getName(), and i.

CIMClass & CIMClass::setQualifier const CIMQualifier qual  ) 
 

Set the given qualifier on this CIMClass if it is present.

If it is not, then add it.

Parameters:
qual The qualifier to set or add to this CIMClass.
Returns:
a reference to *this

Definition at line 520 of file OWBI1_CIMClass.cpp.

References i.

CIMClass & CIMClass::setQualifiers const CIMQualifierArray quals  ) 
 

Set the qualifiers for this class.

The old qualifiers will be removed.

Parameters:
quals An CIMQualifierArray that contains the new qualifiers.
Returns:
a reference to *this

Definition at line 513 of file OWBI1_CIMClass.cpp.

CIMClass & CIMClass::setSuperClass const CIMName pname  ) 
 

Set the name of the parent CIM class for this CIMClass object.

Parameters:
pname The name of the parent CIM class for this object.
Returns:
a reference to *this

Definition at line 137 of file OWBI1_CIMClass.cpp.

String CIMClass::toMOF  )  const [virtual]
 

Returns:
The MOF representation of this CIMClass object as an String object.

Implements OWBI1::CIMBase.

Definition at line 628 of file OWBI1_CIMClass.cpp.

References OWBI1::Array< T >::begin(), OWBI1::Array< T >::end(), OWBI1::Array< T >::erase(), i, and OWBI1::Array< T >::insert().

String CIMClass::toString  )  const [virtual]
 

Returns:
The string representation of this CIMClass. This yields the same results as toMOF.

Implements OWBI1::CIMElement.

Definition at line 703 of file OWBI1_CIMClass.cpp.

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

Write this CIMClass object to an output stream.

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

Implements OWBI1::SerializableIFC.


Member Data Documentation

detail::CIMClassRepRef OWBI1::CIMClass::m_rep [private]
 

Definition at line 360 of file OWBI1_CIMClass.hpp.


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