|
In file ../../src/Pegasus/Common/CIMProperty.h:
The CIMProperty class is used to represent CIM properties in Pegasus.
Documentation
The CIMProperty class is used to represent CIM properties in Pegasus. A CIM Property
consists of the following entities;
- Name of the property, a CIMName. Functions are provided to manipulate the name.
The name must be a legal name for a CIMProperty CIMName.
- CIMType of the value of the property, a CIMType.
- CIMValue - The value of the property corresponding to the Type defined. Properties
can have either single values or arrays of values. Functions are provided to
allow definition and query of the characteristics of the value (isArray(),
getArraySize()).
- Optional CIMQualifiers for the property. A property can contain zero or
more CIMQualifiers and functions are provided to manipulate the
list of CIMQualifiers
In addition, internally, there are the following additional attributes
that are part of a CIMProperty.
- propagated - attributed defining whether this CIMMethod is
propagated from a superclass. Note that this is normally set as part of
completing the definition of objects (resolving) when they are placed in a
repository and is NOT automatically set when creating a local object. It
is part of the context of the object within the repository. It can only
logically be set in context of the superclass of which this CIMProperty is
defined.
- ClassOrigin - attribute defining the superclass in which this
CIMProperty was originally defined. This is normally set as part of
resolving Class and instances in the context of other objects (i.e. a
repository). This attribute is available from objects retrieved from the
repository, for example and indicates the Class/Instance in the hiearchy
(this object or a superclass or instance of a superclass)was originally
defined. Together the propagated and ClassOrigin attributes can be used
to determine if methods originated with the current object or were
inherited from higher levels in the hiearchy.
Normally CIMProperties are defined in the context of CIMClasses and CIMInstances.
A CIMClass or CIMInstance can include zero or more CIMProperties.
CIMProperty is a shared class so that assignment and copy operators do not
create new copies of the data representing a CIMMethod object but point
back to the original object and the lifecycle of the original object is
controlled by the accumulative lifecycle of any copies and assigned
objects.
Classes
Inheritance:
Public Methods
| CIMProperty ()
Creates a new Null CIMProperty object.
|
| CIMProperty (const CIMProperty& x)
Constructs a CIMPropery object from another CIMProperty object.
|
| CIMProperty ( const CIMName& name, const CIMValue& value, Uint32 arraySize = 0, const CIMName& referenceClassName = CIMName(), const CIMName& classOrigin = CIMName(), Boolean propagated = false)
Constructs a CIMProperty with the specified attributes.
|
| ~CIMProperty ()
Destructs the CIMProperty object
|
CIMProperty& | operator= (const CIMProperty& x)
REVIEWERS: Insert description here.
|
const CIMName& | getName () const
Gets the name of the property.
|
void | setName (const CIMName& name)
Set the property name.
|
const CIMValue& | getValue () const
Get the value of the property.
|
CIMType | getType () const
Get the type of the property.
|
Boolean | isArray () const
Check if the property is an array type.
|
void | setValue (const CIMValue& value)
Sets the Value in the Property object from the input parameter.
|
Uint32 | getArraySize () const
Gets the arraysize parameter from the property.
|
const CIMName& | getReferenceClassName () const
Gets the referenceClassName.
|
const CIMName& | getClassOrigin () const
Gets the classOrigin field from the property object.
|
void | setClassOrigin (const CIMName& classOrigin)
Sets the Class Origin attribute.
|
Boolean | getPropagated () const
Tests if this property is propagated.
|
void | setPropagated (Boolean propagated)
Sets the propagated attribute true or false.
|
CIMProperty& | addQualifier (const CIMQualifier& x)
Adds a qualifier object to the property and increases the qualifier count.
|
Uint32 | findQualifier (const CIMName& name) const
Finds the qualifier object defined by the name parameter if it is attached to this CIMProperty.
|
CIMQualifier | getQualifier (Uint32 index)
Gets the Qualifier object specified by the input parameter.
|
CIMConstQualifier | getQualifier (Uint32 index) const
Returns the qualifier at the specified index.
|
void | removeQualifier (Uint32 index)
Removes the CIMQualifier defined by the index input as a parameter.
|
Uint32 | getQualifierCount () const
Returns count of the number of qualifiers attached to the CIMProperty object.
|
Boolean | identical (const CIMConstProperty& x) const
Compares the CIMProperty object with another CIMProperty object defined by the input parameter.
|
CIMProperty | clone () const
Makes a deep copy (clone) of the given object.
|
Boolean | isUninitialized () const
Determines if the object has not been initialized.
|
- CIMProperty()
- Creates a new Null CIMProperty object. CIMProperites created with
this constructor are have no information the only operation that can
be performed on them is to copy another object into the new object.
- Throws:
- throws UninitializedObjectException() if any method except the copy
function is executed against.
- See Also:
- CIMConstProperty()
Unitialized()
- CIMProperty(const CIMProperty& x)
- Constructs a CIMPropery object from another
CIMProperty object. This method assigns the new object to the representation
in the parameter and increments the representation count. It does NOT
create a new independent object be creates a reference from the assigned object
to the representation of the object being assigned.
- Parameters:
- x - CIMProperty object from which to create newCIMProperty object.
CIMProperty p1(CIMName ("name"), CIMTYPE_STRING);
const CIMProperty cp1(p1);
- CIMProperty( const CIMName& name, const CIMValue& value, Uint32 arraySize = 0, const CIMName& referenceClassName = CIMName(), const CIMName& classOrigin = CIMName(), Boolean propagated = false)
- Constructs a CIMProperty with the specified attributes. Note that all attributes
are optional except for the name and value.
- Parameters:
- name - Specifies the name of the CIMproperty. This must be a legal CIMProperty
name.
value - Specifies the name of the CIMValue property.
arraySize - Specifies the size of array, if fixed array size (optional).
referenceClassName - CIMName parameter that defines the
reference class name for the property. This parameter is required if
the property is type CIMObjectPath. (optional)
classOrigin - CIMName parameter to define the class
origin of the property (optional).
propagated - If true, this parameter defines the property as
propagated (optional).
- Returns:
- The constructed CIM property object.
- ~CIMProperty()
- Destructs the CIMProperty object
- CIMProperty& operator=(const CIMProperty& x)
- REVIEWERS: Insert description here.
- Parameters:
- x - REVIEWERS: Insert description here.
- const CIMName& getName() const
- Gets the name of the property.
- Returns:
- CIMName containing the property name. For example,
CIMProperty p1("count", Uint32(231));
assert(p1.getName() == "count");
- void setName(const CIMName& name)
- Set the property name.
- Parameters:
- name - Specifies the CIMName that contains the name for
the parameter name.
- const CIMValue& getValue() const
- Get the value of the property.
- CIMType getType() const
- Get the type of the property.
- Boolean isArray() const
- Check if the property is an array type.
- void setValue(const CIMValue& value)
- Sets the Value in the Property object from the input
parameter.
- Parameters:
- value - Specifies the CIMValue that contains the value to be put into the
property.
- Uint32 getArraySize() const
- Gets the arraysize parameter from the property.
- Returns:
- Uint32 with the arraysize.
- const CIMName& getReferenceClassName() const
- Gets the referenceClassName.
- Returns:
- CIMName containing the referenceClassName if this
is a reference property or empty if another CIMType.
- const CIMName& getClassOrigin() const
- Gets the classOrigin field from the property
object.
- Returns:
- CIMName with classOrigin name. This will be a string
with the name of the originating class for the property or
empty if this is the originating class.
- void setClassOrigin(const CIMName& classOrigin)
- Sets the Class Origin attribute.
- Parameters:
- classOrigin - Specifies the CIMName that contains the classOrigin.
- Boolean getPropagated() const
- Tests if this property is propagated.
- Returns:
- True if the class is propagated; otherwise, false.
- void setPropagated(Boolean propagated)
- Sets the propagated attribute true or false.
- Parameters:
- x - Specifies a true or false value that represents
the propagated state to be set.
- CIMProperty& addQualifier(const CIMQualifier& x)
- Adds a qualifier object to the property and
increases the qualifier count.
- Throws:
- AlreadyExistsException True if the qualifier already
exists; otherwise, false..
- Parameters:
- x - CIMQualifier object to be added.
- Returns:
- The resulting CIMProperpty.
- Uint32 findQualifier(const CIMName& name) const
- Finds the qualifier object defined by the name parameter
if it is attached to this CIMProperty.
- Parameters:
- name - CIMName parameter that defines the name of Qualifier
object.
- Returns:
- Position of the qualifier object or PEG_NOT_FOUND (-1),
if not found.
- CIMQualifier getQualifier(Uint32 index)
- Gets the Qualifier object specified by the input parameter.
- Throws:
- IndexOutOfBoundsException If index is outside range
of Qualifiers in this property object; otherwise, false.
- Parameters:
- index - Index parameter for the Qualifier object to be
retrieved.
- Returns:
- CIMQualifier object at specified index.
- CIMConstQualifier getQualifier(Uint32 index) const
- Returns the qualifier at the specified index.
- Throws:
- IndexOutOfBoundsException If index is outside the range
of qualifiers that exist for the property; otherwise, false.
- Parameters:
- index - Specifies the index of the qualifier. The index is obtained from the
findQualifier method.
- Returns:
- The qualifier object.
- void removeQualifier(Uint32 index)
- Removes the CIMQualifier defined by the
index input as a parameter.
- Throws:
- IndexOutOfBoundsException If the index is outside the
range of qualifiers in this property object; otherwise, false.
- Parameters:
- index - Index of the qualifier requested.
- Uint32 getQualifierCount() const
- Returns count of the number of qualifiers attached to
the CIMProperty object.
- Returns:
- Count of the number of CIMQualifier objects attached
to the CIMProperty object.
- Boolean identical(const CIMConstProperty& x) const
- Compares the CIMProperty object with
another CIMProperty object defined by the input parameter.
- Parameters:
- x - CIMPropery object for comparison.
- Returns:
- True if the objects are identical; otherwise, false.
- CIMProperty clone() const
- Makes a deep copy (clone) of the given object.
- Returns:
- Copy of the CIMProperty object.
- Boolean isUninitialized() const
- Determines if the object has not been initialized.
- Returns:
- True if the object has not been initialized;
otherwise, false.
- This class has no child classes.
- Friends:
- class CIMConstProperty
class CIMClassRep class CIMInstanceRep class Resolver class XmlWriter class MofWriter class BinaryStreamer
- See Also:
- CIMConstProperty
CIMQualifiers
CIMType
Alphabetic index HTML hierarchy of classes or Java
|