CIMNamespaceName Class Reference

#include <CIMName.h>

List of all members.

Public Member Functions

 CIMNamespaceName ()
 CIMNamespaceName (const String &name)
 CIMNamespaceName (const char *name)
CIMNamespaceNameoperator= (const CIMNamespaceName &name)
CIMNamespaceNameoperator= (const String &name)
const StringgetString () const
Boolean isNull () const
void clear ()
Boolean equal (const CIMNamespaceName &name) const

Static Public Member Functions

static Boolean legal (const String &name)

Detailed Description

The CIMNamespaceName class represents the DMTF standard CIM namespace name definition.

A CIM namespace name must match the following expression:

        <CIMName>[ / <CIMName> ]*
    

A namespace name with a leading '/' character is accepted, but the leading character is removed. A CIMNamespaceName may be null, meaning that it has no value.


Constructor & Destructor Documentation

CIMNamespaceName::CIMNamespaceName (  ) 

Constructs a null CIMName.

CIMNamespaceName::CIMNamespaceName ( const String name  ) 

Constructs a non-null CIMNamespaceName with the specified name.

Parameters:
name A String containing the CIM namespace name.
Exceptions:
InvalidNameException If the String does not contain a valid CIM namespace name.
CIMNamespaceName::CIMNamespaceName ( const char *  name  ) 

Constructs a non-null CIMNamespaceName with the specified name.

Parameters:
name A character string containing the CIM namespace name.
Exceptions:
InvalidNameException If the character string does not contain a valid CIM namespace name.
All exceptions thrown by String(const char* str) can be thrown here

Member Function Documentation

void CIMNamespaceName::clear (  ) 

Sets the CIM namespace name to a null value.

Example:

        CIMNamespaceName n("root/test");
        n.clear();
        assert(n.isNull());
        
Boolean CIMNamespaceName::equal ( const CIMNamespaceName name  )  const

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

Example:

        CIMNamespaceName n1("root/cimv2");
        CIMNamespaceName n2("Root/CimV2");
        assert(n1.equal(n2));
        
Parameters:
name The CIMNamespaceName to be compared.
Returns:
True if this name is equivalent to the specified name, false otherwise.
const String& CIMNamespaceName::getString (  )  const

Gets a String form of the CIM namespace name.

Example:

        CIMNamespaceName n("test/ns1");
        String s = n.getString();
        
Returns:
A reference to a String containing the CIM namespace name.
Boolean CIMNamespaceName::isNull (  )  const

Determines whether the CIM namespace name is null.

Example:

        CIMNamespaceName n;
        assert(n.isNull());
        n = "root/test";
        assert(!n.isNull());
        
Returns:
True if the CIM namespace name is null, false otherwise.
static Boolean CIMNamespaceName::legal ( const String name  )  [static]

Determines whether a name is a valid CIM namespace name.

Example:

        assert(CIMNamespaceName::legal("root/test"));
        assert(!CIMNamespaceNamelegal("Wrong!"));
        
Parameters:
name A String containing the name to test.
Returns:
True if the specified name is a valid CIM namespace name, false otherwise.
CIMNamespaceName& CIMNamespaceName::operator= ( const String name  ) 

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

Example:

        CIMNamespaceName n;
        String name = "root/cimv2";
        n = name;
        
Parameters:
name A String containing the CIM namespace name to set.
Returns:
A reference to this CIMNamespaceName object.
Exceptions:
InvalidNameException If the String does not contain a valid CIM namespace name.
CIMNamespaceName& CIMNamespaceName::operator= ( const CIMNamespaceName name  ) 

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

Parameters:
name The CIMNamespaceName object from which to assign this CIMNamespaceName object.

The documentation for this class was generated from the following file:
  • /var/tmp/axbld-11697/rpm/BUILD/pegasus/src/Pegasus/Common/CIMName.h