Contents
|
In file ../../src/Pegasus/Common/CIMName.h:
The CIMNamespaceName class represents the DMTF standard CIM namespace name definition.
Documentation
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.
Inheritance:
Public Methods
| CIMNamespaceName ()
Constructs a null CIMName
|
| CIMNamespaceName (const String& name)
Constructs a non-null CIMNamespaceName with the specified name.
|
| CIMNamespaceName (const char* name)
Constructs a non-null CIMNamespaceName with the specified name.
|
CIMNamespaceName& | operator= (const CIMNamespaceName& name)
Assigns the value of the specified CIMNamespaceName object to this object.
|
CIMNamespaceName& | operator= (const String& name)
Sets the CIMNamespaceName with a String name.
|
const String& | getString () const
Gets a String form of the CIM namespace name.
|
Boolean | isNull () const
Determines whether the CIM namespace name is null.
|
void | clear ()
Sets the CIM namespace name to a null value.
|
Boolean | equal (const CIMNamespaceName& name) const
Compares the CIMNamespaceName with a specified CIMNamespaceName.
|
static Boolean | legal (const String& name)
Determines whether a name is a valid CIM namespace name.
|
Boolean | equal (const char* name) const
Compares the CIMNamespaceName with a specified character string.
|
CIMNamespaceName& | operator= (const char* name)
Sets the CIMNamespaceName with a character string name.
|
- CIMNamespaceName()
-
Constructs a null CIMName
- CIMNamespaceName(const String& name)
-
Constructs a non-null CIMNamespaceName with the specified name.
- Throws:
- InvalidNameException If the String does not contain a
valid CIM namespace name.
- Parameters:
- name - A String containing the CIM namespace name.
- CIMNamespaceName(const char* name)
-
Constructs a non-null CIMNamespaceName with the specified name.
- Throws:
- 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
- Parameters:
- name - A character string containing the CIM namespace name.
- 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.
- 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;
- Throws:
- InvalidNameException If the String does not contain a
valid CIM namespace name.
- Parameters:
- name - A String containing the CIM namespace name to set.
- Returns:
- A reference to this CIMNamespaceName object.
- const String& 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 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.
- void clear()
-
Sets the CIM namespace name to a null value.
Example:
CIMNamespaceName n("root/test");
n.clear();
assert(n.isNull());
- Boolean 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.
- static Boolean legal(const String& name)
-
Determines whether a name is a valid CIM namespace name.
Example:
assert(CIMNamespaceName::legal("root/test"));
assert(!CIMNamespaceName::legal("Wrong!"));
- Parameters:
- name - A String containing the name to test.
- Returns:
- True if the specified name is a valid CIM namespace name,
false otherwise.
- Boolean equal(const char* name) const
-
Compares the CIMNamespaceName with a specified character string.
Comparisons of CIM namespace names are case-insensitive.
- Parameters:
- name - The name to be compared.
- Returns:
- True if this name is equivalent to the specified name,
false otherwise.
- CIMNamespaceName& operator=(const char* name)
-
Sets the CIMNamespaceName with a character string name. The
resulting CIMNamespaceName object is non-null.
- Throws:
- 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
- Parameters:
- name - A character string containing the CIM namespace name
to set.
- Returns:
- A reference to this CIMNamespaceName object.
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
|