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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2