(file) Return to CIMScope.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 karl  1.17 //%2003////////////////////////////////////////////////////////////////////////
  2 mike  1.8  //
  3 karl  1.17 // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
  4            // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
  5            // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
  6            // IBM Corp.; EMC Corporation, The Open Group.
  7 mike  1.8  //
  8            // Permission is hereby granted, free of charge, to any person obtaining a copy
  9 kumpf 1.11 // of this software and associated documentation files (the "Software"), to
 10            // deal in the Software without restriction, including without limitation the
 11            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 12 mike  1.8  // sell copies of the Software, and to permit persons to whom the Software is
 13            // furnished to do so, subject to the following conditions:
 14            // 
 15 kumpf 1.11 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16 mike  1.8  // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 17            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 18 kumpf 1.11 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 19            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 20            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 21 mike  1.8  // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 22            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23            //
 24            //==============================================================================
 25            //
 26            // Author: Mike Brasher (mbrasher@bmc.com)
 27            //
 28 kumpf 1.13 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
 29            //                (carolann_graves@hp.com)
 30 kumpf 1.14 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 31 schuur 1.19 //              Adrian Schuur (schuur@de.ibm.com) PEP 164
 32 mike   1.8  //
 33             //%/////////////////////////////////////////////////////////////////////////////
 34             
 35             #ifndef Pegasus_Scope_h
 36             #define Pegasus_Scope_h
 37             
 38             #include <Pegasus/Common/Config.h>
 39             #include <Pegasus/Common/String.h>
 40 kumpf  1.12 #include <Pegasus/Common/Linkage.h>
 41 mike   1.8  
 42             PEGASUS_NAMESPACE_BEGIN
 43             
 44             /**
 45 kumpf  1.13     The CIMScope class implements the concept of the scope of a CIM qualifier 
 46                 object.  The scope of a qualifier defines the set of types of CIM objects 
 47                 with which the qualifier may be used.  The possible values are:
 48                 NONE, CLASS, ASSOCIATION, INDICATION, PROPERTY, REFERENCE, METHOD, 
 49                 PARAMETER, ANY.
 50                 The scope is a set of one or more of these possible values.
 51                 The value "NONE" implies a CIMScope object that has not yet been assigned a
 52                 value (uninitialized).  It is not a valid value for the scope of a 
 53                 qualifier object.
 54                 The value "ANY" means that the qualifier may be used with any of the CIM 
 55                 object types, and is equivalent to listing each of the object types in the 
 56                 scope.
 57 mike   1.8  */
 58 kumpf  1.13 class PEGASUS_COMMON_LINKAGE CIMScope
 59 mike   1.8  {
 60 kumpf  1.13 public:
 61             
 62 kumpf  1.15     /** Constructs a CIMScope object with no value set (default constructor).
 63 karl   1.18         The values are null.
 64 kumpf  1.15     */
 65 kumpf  1.13     CIMScope ();
 66             
 67 kumpf  1.15     /** Constructs a CIMScope object from an existing CIMScope object (copy 
 68 kumpf  1.13         constructor).
 69 karl   1.18         @param   scope   Specifies an instance of CIMScope object.
 70 kumpf  1.15     */
 71 kumpf  1.13     CIMScope (const CIMScope & scope);
 72             
 73 kumpf  1.15     /** Assigns the value of one CIMScope object to another (assignment 
 74 kumpf  1.13         operator).
 75 karl   1.18         @param   scope Specifies the name of a CIMScope object that contains
 76                     the values that you want to assign to another CIMScope object.
 77                     @return  The CIMScope object with the values of the specified CIMScope
 78                     object. For example:
 79                     <pre>
 80                         CIMScope s0;
 81                         CIMScope s1(s0);
 82                     </pre>
 83                     The values in CIMScope s0 are assigned to the CIMScope s1 instance.
 84 kumpf  1.15     */
 85 kumpf  1.13     CIMScope & operator= (const CIMScope & scope);
 86             
 87 kumpf  1.15     /** Determines if every value in the specified CIMScope object is included 
 88 kumpf  1.13         in this CIMScope object.
 89 karl   1.18         @param   scope - Specifies a name of a CIMScope object.
 90                     @return  True if every value in the specified CIMScope object is 
 91                              included in the CIMScope object; otherwise, false. 
 92 kumpf  1.15     */
 93 kumpf  1.13     Boolean hasScope (const CIMScope & scope) const;
 94             
 95 kumpf  1.15     /** Adds the specified scope value to the CIMScope object.
 96 karl   1.18         @param   scope - Specifies a scope value. For example:
 97                     <pre>
 98                         CIMScope s0;
 99                         s0.addScope (CIMScope::INDICATION);
100                         if(s0.hasScope (CIMScope::INDICATION))
101                             ...				..
102                     </pre>
103 kumpf  1.15     */
104 kumpf  1.14     void addScope (const CIMScope & scope);
105 kumpf  1.13 
106 kumpf  1.15     /** Compares two CIMScope objects.
107 karl   1.18         @param  scope - Specifies a CIMScope object.
108                     @return True if the two CIMScope objects are equal; otherwise, false.
109                     For example,
110                     <pre>
111                         CIMScope s0;
112                         s0.addScope (CIMScope::CLASS + CIMScope::PARAMETER);
113                         if(s0.hasScope (CIMScope::CLASS))
114                             ...	..
115                 </pre>
116 kumpf  1.15     */
117 kumpf  1.13     Boolean equal (const CIMScope & scope) const;
118             
119 kumpf  1.15     /** Combines two CIMScope objects.
120 karl   1.18         @param  scope - Specifies a CIMScope object to add.
121 kumpf  1.14         @return A new CIMScope object that represents the combination of this
122 kumpf  1.15                 scope object with the specified scope object.
123 karl   1.18         <pre>
124                         CIMScope s0(CIMScope::CLASS);
125                         CIMScope s1(CIMScope::PARAMETER);
126                         CIMScope s3 = s0 + S1;
127                     </pre>
128 kumpf  1.15     */
129 kumpf  1.14     CIMScope operator+ (const CIMScope & scope) const;
130             
131 kumpf  1.15     /** Returns a String representation of the CIMScope object.
132                     This method is for diagnostic purposes. The format of the output
133 kumpf  1.13         is subject to change.
134 kumpf  1.15     */
135 kumpf  1.13     String toString () const;
136             
137 kumpf  1.15     /** Indicates that the CIMScope object has no value (is uninitialized).
138                 */
139 kumpf  1.14     static const CIMScope NONE;
140 kumpf  1.13 
141 kumpf  1.15     /** Indicates that the qualifier may be used with classes.
142                 */
143 kumpf  1.14     static const CIMScope CLASS;
144 kumpf  1.13 
145 kumpf  1.15     /** Indicates that the qualifier may be used with associations.
146                 */
147 kumpf  1.14     static const CIMScope ASSOCIATION;
148 kumpf  1.13 
149 kumpf  1.15     /** Indicates that the qualifier may be used with indications.
150                 */
151 kumpf  1.14     static const CIMScope INDICATION;
152 kumpf  1.13 
153 kumpf  1.15     /** Indicates that the qualifier may be used with properties.
154                 */
155 kumpf  1.14     static const CIMScope PROPERTY;
156 kumpf  1.13 
157 kumpf  1.15     /** Indicates that the qualifier may be used with references.
158                 */
159 kumpf  1.14     static const CIMScope REFERENCE;
160 kumpf  1.13 
161 kumpf  1.15     /** Indicates that the qualifier may be used with methods.
162                 */
163 kumpf  1.14     static const CIMScope METHOD;
164 kumpf  1.13 
165 kumpf  1.15     /** Indicates that the qualifier may be used with parameters.
166                 */
167 kumpf  1.14     static const CIMScope PARAMETER;
168 kumpf  1.13 
169 kumpf  1.15     /** Indicates that the qualifier may be used with any of the types
170 kumpf  1.13         of objects (classes, associations, indications, properties, references,
171 kumpf  1.15         methods, parameters).
172                 */
173 kumpf  1.14     static const CIMScope ANY;
174 kumpf  1.13 
175             private:
176 kumpf  1.14 
177 karl   1.18     // 
178 kumpf  1.14     CIMScope (const Uint32 scope);
179 karl   1.18     // Private member for storing he CIMScope
180 kumpf  1.13     Uint32 cimScope;
181 schuur 1.19     
182                 friend class BinaryStreamer;
183 mike   1.8  };
184             
185             PEGASUS_NAMESPACE_END
186             
187             #endif /* Pegasus_Scope_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2