In file ../../src/Pegasus/Common/CIMName.h:

class PEGASUS_COMMON_LINKAGE CIMNamespaceName

The CIMNamespaceName class defines methods for handling CIM namespace names.

Documentation

The CIMNamespaceName class defines methods for handling CIM namespace names.

A CIM namespace name must match the following expression:

        <CIMName>[ / <CIMName> ]*
    

Examples
  • root
  • root/test
NOTE: Pegasus uses namespaces starting with the top level name (ex. root). It does not use the form /root/test with a leading slash. The legal() test method in this class allows that form as a legal entity however.

Inheritance:


Public Methods

[more] CIMNamespaceName ()
Default constructor sets object Null.
[more] CIMNamespaceName (const String& name)
Constructor builds namespace from input String.
[more] CIMNamespaceName (const char* name)
Constructor builds namespace from input char*.
[more]CIMNamespaceName& operator= (const CIMNamespaceName& name)
Assign one namespace object to another.
[more]CIMNamespaceName& operator= (const String& name)
Assign a String object to a CIMNamespaceName object.
[more]const String& getString () const
Extracts the String value of the CIMNamespaceName from the object.
[more]Boolean isNull () const
Tests the CIMNamespaceName for NULL attribute.
[more]void clear ()
Clears the CIMNamespaceName and sets it to Null.
[more]Boolean equal (const CIMNamespaceName& name) const
Compares two CIMNamespace objects for equality.
[more]static Boolean legal (const String& name)
Determines if the name string input is legal as defined in the CIMNamespaceName class definition.

o CIMNamespaceName()
Default constructor sets object Null. The Null state indicates that there is no name assigned to this object. The Null state can be tested with the isNull() method and set with the clear() method.

o CIMNamespaceName(const String& name)
Constructor builds namespace from input String. The String input must be a legal namespace name.
Parameters:
- String from which the namespace object is built. This must be a legal namespace name. @exeception InvalidNamespaceName exception thrown if the namespace name input is illegal.

o CIMNamespaceName(const char* name)
Constructor builds namespace from input char*. The String input must be a legal namespace name.
Parameters:
char - * from which the namespace object is built. This must be a legal namespace name. @exeception InvalidNamespaceName exception thrown if the namespace name input parameter is illegal.

oCIMNamespaceName& operator=(const CIMNamespaceName& name)
Assign one namespace object to another.
Parameters:
- CIMNamespaceName to assign to the object.

oCIMNamespaceName& operator=(const String& name)
Assign a String object to a CIMNamespaceName object.
Parameters:
- CIMNamespaceName to assign @exeception InvalidNamespaceName exception thrown if the namespace name input parameter is illegal.
String s = "root/test";
CIMNamespacename ns;
ns = s;

oconst String& getString() const
Extracts the String value of the CIMNamespaceName from the object.
Returns:
String containing the name.
CIMNamespaceName ns("root/test");
String s = ns.getString();

oBoolean isNull() const
Tests the CIMNamespaceName for NULL attribute. Returns true if Null. New objects without parameter and objects set with clear() are Null. When a name is set into the object is is set to nonnull. When the object is Null, it returns empty string.
Returns:
true if Null or false if not Null.
CIMName n;
assert(n.isNull());
n = "name";
assert(!n.isNull());

ovoid clear()
Clears the CIMNamespaceName and sets it to Null. A Null object contains no name so that accessing it with getString should return an empty String
                        CIMMamespaceName ns("root/test");
                        ns.clear();
                        assert(ns.isNull());
            

oBoolean equal(const CIMNamespaceName& name) const
Compares two CIMNamespace objects for equality.
Returns:
true if the name passed is equal to the name in this class. CIM names are case insensitive and so is this method.
CIMMamespaceName ns("root/test");
CIMMamespaceName ns1("root/test");
assert( ns.equal(ns1);

ostatic Boolean legal(const String& name)
Determines if the name string input is legal as defined in the CIMNamespaceName class definition.
Parameters:
name - String to test for legality.
Returns:
true if the given name is legal, false otherwise.
assert(CIMNamespaceName::legal("root/test"));


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java