version 1.21, 2004/06/03 08:45:20
|
version 1.24.18.2, 2006/03/07 18:45:45
|
|
|
//%2003//////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems. |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; | // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
// IBM Corp.; EMC Corporation, The Open Group. | // IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) |
|
// |
|
// Modified By: Karl Schopmeyer(k.schopmeyer@opengroup.org) |
|
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
|
// Carol Ann Krug Graves, Hewlett-Packard Company |
|
// (carolann_graves@hp.com) |
|
// Adriann Schuur (schuur@de.ibm.com) PEP 164 |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_Flavor_h | #ifndef Pegasus_Flavor_h |
|
|
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
/** | /** |
The CIMFlavor class implements the concept of the CIM qualifier flavor that |
The CIMFlavor class represents the DMTF standard CIM qualifier flavor |
encapsulates the propagation and override rules for qualifiers. |
definition, which encapsulates the propagation and override rules for |
The propagation rules define whether a qualifier |
qualifiers. The propagation rules define whether a qualifier may be |
may be propagated from classes to derived classes, or from classes to |
propagated from classes to derived classes or from classes to instances. |
instances. The override rules define whether or not derived classes may |
The override rules define whether a derived class may override a |
override a qualifier value or whether it must be fixed for an entire |
qualifier value. |
class hierarchy. |
|
|
A CIMFlavor contains one or more of these values: OVERRIDABLE, |
The possible values are: OVERRIDABLE, TOSUBCLASS, TOINSTANCE, |
TOSUBCLASS, TOINSTANCE, TRANSLATABLE, DISABLEOVERRIDE, ENABLEOVERRIDE, |
TRANSLATABLE, DISABLEOVERRIDE, ENABLEOVERRID, RESTRICTED and DEFAULTS. |
RESTRICTED and DEFAULTS. |
The flavor is a set of zero or more of these possible values. |
|
*/ | */ |
class PEGASUS_COMMON_LINKAGE CIMFlavor | class PEGASUS_COMMON_LINKAGE CIMFlavor |
{ | { |
public: | public: |
| |
/** | /** |
Constructs a CIMFlavor object with no flavor values set (default |
Constructs a CIMFlavor object with the value NONE. |
constructor). The parameters and values are null. |
|
*/ | */ |
CIMFlavor (); | CIMFlavor (); |
| |
/** | /** |
Constructs a CIMFlavor object from an existing CIMFlavor object (copy |
Constructs a CIMFlavor object from the value of a specified |
constructor). |
CIMFlavor object. |
|
@param flavor The CIMFlavor object from which to construct a new |
@param flavor Specifies the name of the CIMFlavor instance of |
CIMFlavor object. |
the CIMFlavor object. |
|
*/ | */ |
CIMFlavor (const CIMFlavor & flavor); | CIMFlavor (const CIMFlavor & flavor); |
| |
/** | /** |
Assigns the value of one CIMFlavor object to another (assignment |
Assigns the value of the specified CIMFlavor object to this object. |
operator). |
@param scope The CIMFlavor object from which to assign this |
|
CIMFlavor object. |
@param flavor Specifies the name of the CIMFlavor instance of |
@return A reference to this CIMFlavor object. |
the CIMFlavor object. |
|
|
|
@return The new instance of the CIMFlavor object. |
|
*/ | */ |
CIMFlavor & operator= (const CIMFlavor & flavor); | CIMFlavor & operator= (const CIMFlavor & flavor); |
| |
/** | /** |
Adds the set of flavor values of the specified CIMFlavor object to this |
Adds flavor values to the CIMFlavor object. |
CIMFlavor object. |
@param flavor A CIMFlavor containing the flavor values to add. |
|
|
@param flavor Specifies the name of the CIMFlavor object that |
|
contains the flavor values to add to the CIMFlavor object. |
|
*/ | */ |
void addFlavor (const CIMFlavor & flavor); | void addFlavor (const CIMFlavor & flavor); |
| |
/** | /** |
Removes the specified set of flavor values from the CIMFlavor object. |
Removes flavor values from the CIMFlavor object. |
|
@param flavor A CIMFlavor containing the flavor values to remove. |
@param flavor Specifies the name of the CIMFlavor object that |
|
contains the flavor values to remove from the CIMFlavor object. |
|
*/ | */ |
void removeFlavor (const CIMFlavor & flavor); | void removeFlavor (const CIMFlavor & flavor); |
| |
/** | /** |
Determines if every value in the specified CIMFlavor object is included |
Checks whether the flavor contains specified flavor values. |
in this CIMFlavor object. |
@param flavor A CIMFlavor specifying the flavor values to check. |
|
@return True if the flavor contains all the values in the specified |
@param flavor Specifies the name of the CIMFlavor instance whose |
CIMFlavor object, false otherwise. |
values you want to compare to the CIMFlavor object. |
|
|
|
@return True if every value in the specified instance of the CIMFlavor |
|
object is included in the CIMFlavor object. Otherwise, a value of |
|
false is returned. |
|
*/ | */ |
Boolean hasFlavor (const CIMFlavor & flavor) const; | Boolean hasFlavor (const CIMFlavor & flavor) const; |
| |
/** | /** |
Compares two CIMFlavor objects and determines whether or not they are equal. |
Compares the CIMFlavor with a specified CIMFlavor. |
|
@param flavor The CIMFlavor to be compared. |
@param flavor Specifies the name of the CIMFlavor instance that you want |
@return True if this flavor has the same set of values as the |
to compare to the CIMFlavor object. |
specified flavor, false otherwise. |
|
|
@return True if the two CIMFlavor objects are equal. Otherwise, a value |
|
of false is returned. |
|
*/ | */ |
Boolean equal (const CIMFlavor & flavor) const; | Boolean equal (const CIMFlavor & flavor) const; |
| |
/** | /** |
Combines two CIMFlavor objects. The parameters and values of the specified |
Adds two flavor values. |
CIMFlavor instance are included (added) to the CIMFlavor object. |
@param flavor A CIMFlavor containing the flavor value to add to this |
|
flavor. |
@param flavor Specifies the name of the CIMFlavor instance to add to the |
@return A new CIMFlavor object containing a union of the values in the |
CIMFlavor object. |
two flavor objects. |
|
|
@return A new CIMFlavor object that represents the combination of this |
|
flavor with the specified flavor. |
|
*/ | */ |
CIMFlavor operator+ (const CIMFlavor & flavor) const; | CIMFlavor operator+ (const CIMFlavor & flavor) const; |
| |
/** | /** |
Returns a String representation of the CIMFlavor object. | Returns a String representation of the CIMFlavor object. |
Use this method to aide in debugging problems. Depending on the implementation, |
This method is for diagnostic purposes. The format of the output |
the string format may vary. The returned value cannot be null but may be empty. |
is subject to change. |
|
@return A String containing a human-readable representation of the |
|
flavor value. |
*/ | */ |
String toString () const; | String toString () const; |
| |
/** | /** |
Indicates that the qualifier has no flavors. Thus, the qualifier does not have |
Indicates that the qualifier has no flavors. |
any parameters nor values. |
|
*/ | */ |
static const CIMFlavor NONE; | static const CIMFlavor NONE; |
| |
|
|
Indicates that the qualifier may be overridden. | Indicates that the qualifier may be overridden. |
*/ | */ |
static const CIMFlavor OVERRIDABLE; | static const CIMFlavor OVERRIDABLE; |
|
|
/** | /** |
Indicates that the override feature is enable for the qualifier. Thus, the |
Indicates that the override feature is enabled for the qualifier. |
qualifier can be overridden. |
Thus, the qualifier may be overridden. |
*/ | */ |
static const CIMFlavor ENABLEOVERRIDE; | static const CIMFlavor ENABLEOVERRIDE; |
| |
/** | /** |
Indicates that the qualifier may not be overridden. |
Indicates that the override feature is disabled for the qualifier. |
|
Thus, the qualifier may not be overridden. |
*/ | */ |
static const CIMFlavor DISABLEOVERRIDE; | static const CIMFlavor DISABLEOVERRIDE; |
| |
/** | /** |
Indicates that the qualifier is propagated to the qualifier in the |
Indicates that the qualifier is propagated to subclasses. |
subclass with the same name. |
|
*/ | */ |
static const CIMFlavor TOSUBCLASS; | static const CIMFlavor TOSUBCLASS; |
| |
/** | /** |
Indicates that the qualifier is not propagated to the qualifier in the |
Indicates that the qualifier is not propagated to subclasses. |
subclass with the same name; it applies only to the class in which it |
|
is declared. |
|
*/ | */ |
static const CIMFlavor RESTRICTED; | static const CIMFlavor RESTRICTED; |
| |
/** | /** |
Indicates that the qualifier is propagated to the qualifier in the |
Indicates that the qualifier is propagated to instances. |
instance with the same name. |
|
*/ | */ |
static const CIMFlavor TOINSTANCE; | static const CIMFlavor TOINSTANCE; |
| |
/** | /** |
Indicates that the qualifier is translatable (for internationalization). |
Indicates that the qualifier is translatable (for |
|
internationalization). |
*/ | */ |
static const CIMFlavor TRANSLATABLE; | static const CIMFlavor TRANSLATABLE; |
| |
/** | /** |
Indicates the default flavor settings. (OVERRIDABLE | TOSUBCLASS). |
Indicates the default flavor settings (OVERRIDABLE | TOSUBCLASS). |
*/ | */ |
static const CIMFlavor DEFAULTS; | static const CIMFlavor DEFAULTS; |
| |
/** | /** |
Indicates both toSubclass and toInstance (TOSUBCLASS | TOINSTANCE). |
Indicates that the qualifier is propagated to subclasses and to |
|
instances (TOSUBCLASS | TOINSTANCE). |
*/ | */ |
static const CIMFlavor TOSUBELEMENTS; | static const CIMFlavor TOSUBELEMENTS; |
| |
private: | private: |
| |
/* | /* |
Constructs an instance of the CIMFlavor object with the specified set of values. |
Constructs a CIMFlavor object with the specified values. |
|
@param flavor A Uint32 representing the set of flavor values. |
@param flavor A Uint32 representing the set of flavor |
|
values to initialize with. |
|
*/ | */ |
CIMFlavor (const Uint32 flavor); | CIMFlavor (const Uint32 flavor); |
| |