#include <CIMName.h>

Public Member Functions

 CIMName ()
 
 CIMName (const String &name)
 
 CIMName (const char *name)
 
CIMNameoperator= (const CIMName &name)
 
CIMNameoperator= (const String &name)
 
const StringgetString () const
 
Boolean isNull () const
 
void clear ()
 
Boolean equal (const CIMName &name) const
 

Static Public Member Functions

static Boolean legal (const String &name)
 

Detailed Description

The CIMName class represents the DMTF standard CIM name definition. The names of CIM classes, properties, qualifiers, and methods are all CIM names.

A CIM name must contain characters only from this set:

  • alphabetic (a-z and A-Z)
  • numeric (0-9)
  • underscore (_)
  • UCS-2 characters in the range 0x0080 to 0xFFEF

The first character of a CIM name may not be numeric. A CIMName may be null, meaning that it has no value.

Constructor & Destructor Documentation

◆ CIMName() [1/3]

CIMName::CIMName ( )

Constructs a null CIMName.

◆ CIMName() [2/3]

CIMName::CIMName ( const String name)

Constructs a non-null CIMName with the specified name.

Parameters
nameA String containing the CIM name.
Exceptions
InvalidNameExceptionIf the String does not contain a valid CIM name.

◆ CIMName() [3/3]

CIMName::CIMName ( const char *  name)

Constructs a non-null CIMName with the specified name.

Parameters
nameA character string containing the CIM name.
Exceptions
InvalidNameExceptionIf the character string does not contain a valid CIM name.
Allexceptions thrown by String(const char* str) can be thrown here

Member Function Documentation

◆ clear()

void CIMName::clear ( )

Sets the CIM name to a null value.

Example:

CIMName n("name");
n.clear();
assert(n.isNull());

◆ equal()

Boolean CIMName::equal ( const CIMName name) const

Compares the CIMName with a specified CIMName. Comparisons of CIM names are case-insensitive.

Example:

CIMName n1("name");
CIMName n2("Name");
assert(n1.equal(n2));
Parameters
nameThe CIMName to be compared.
Returns
True if this name is equivalent to the specified name, false otherwise.

◆ getString()

const String& CIMName::getString ( ) const

Gets a String form of the CIM name.

Example:

CIMName n("name");
String s = n.getString();
Returns
A reference to a String containing the CIM name.

◆ isNull()

Boolean CIMName::isNull ( ) const

Determines whether the CIM name is null.

Example:

CIMName n;
assert(n.isNull());
n = "name";
assert(!n.isNull());
Returns
True if the CIM name is null, false otherwise.

◆ legal()

static Boolean CIMName::legal ( const String name)
static

Determines whether a name is a valid CIM name.

Example:

assert(CIMName::legal("name"));
assert(!CIMName::legal("3types"));
Parameters
nameA String containing the name to test.
Returns
True if the specified name is a valid CIM name, false otherwise.

◆ operator=() [1/2]

CIMName& CIMName::operator= ( const CIMName name)

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

Parameters
nameThe CIMName object from which to assign this CIMName object.

◆ operator=() [2/2]

CIMName& CIMName::operator= ( const String name)

Sets the CIMName with a String name. The resulting CIMName object is non-null.

Example:

CIMName n;
String type = "type";
n = type;
Parameters
nameA String containing the CIM name to set.
Returns
A reference to this CIMName object.
Exceptions
InvalidNameExceptionIf the String does not contain a valid CIM name.

The documentation for this class was generated from the following file:
  • /root/rpmbuild/BUILD/pegasus/src/Pegasus/Common/CIMName.h