(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 mike  1.8  //
 32            //%/////////////////////////////////////////////////////////////////////////////
 33            
 34            #ifndef Pegasus_Scope_h
 35            #define Pegasus_Scope_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38            #include <Pegasus/Common/String.h>
 39 kumpf 1.12 #include <Pegasus/Common/Linkage.h>
 40 mike  1.8  
 41            PEGASUS_NAMESPACE_BEGIN
 42            
 43            /**
 44 kumpf 1.13     The CIMScope class implements the concept of the scope of a CIM qualifier 
 45                object.  The scope of a qualifier defines the set of types of CIM objects 
 46                with which the qualifier may be used.  The possible values are:
 47                NONE, CLASS, ASSOCIATION, INDICATION, PROPERTY, REFERENCE, METHOD, 
 48                PARAMETER, ANY.
 49                The scope is a set of one or more of these possible values.
 50                The value "NONE" implies a CIMScope object that has not yet been assigned a
 51                value (uninitialized).  It is not a valid value for the scope of a 
 52                qualifier object.
 53                The value "ANY" means that the qualifier may be used with any of the CIM 
 54                object types, and is equivalent to listing each of the object types in the 
 55                scope.
 56 mike  1.8  */
 57 kumpf 1.13 class PEGASUS_COMMON_LINKAGE CIMScope
 58 mike  1.8  {
 59 kumpf 1.13 public:
 60            
 61 kumpf 1.15     /** Constructs a CIMScope object with no value set (default constructor).
 62 karl  1.18         The values are null.
 63 kumpf 1.15     */
 64 kumpf 1.13     CIMScope ();
 65            
 66 kumpf 1.15     /** Constructs a CIMScope object from an existing CIMScope object (copy 
 67 kumpf 1.13         constructor).
 68 karl  1.18         @param   scope   Specifies an instance of CIMScope object.
 69 kumpf 1.15     */
 70 kumpf 1.13     CIMScope (const CIMScope & scope);
 71            
 72 kumpf 1.15     /** Assigns the value of one CIMScope object to another (assignment 
 73 kumpf 1.13         operator).
 74 karl  1.18         @param   scope Specifies the name of a CIMScope object that contains
 75                    the values that you want to assign to another CIMScope object.
 76                    @return  The CIMScope object with the values of the specified CIMScope
 77                    object. For example:
 78                    <pre>
 79                        CIMScope s0;
 80                        CIMScope s1(s0);
 81                    </pre>
 82                    The values in CIMScope s0 are assigned to the CIMScope s1 instance.
 83 kumpf 1.15     */
 84 kumpf 1.13     CIMScope & operator= (const CIMScope & scope);
 85            
 86 kumpf 1.15     /** Determines if every value in the specified CIMScope object is included 
 87 kumpf 1.13         in this CIMScope object.
 88 karl  1.18         @param   scope - Specifies a name of a CIMScope object.
 89                    @return  True if every value in the specified CIMScope object is 
 90                             included in the CIMScope object; otherwise, false. 
 91 kumpf 1.15     */
 92 kumpf 1.13     Boolean hasScope (const CIMScope & scope) const;
 93            
 94 kumpf 1.15     /** Adds the specified scope value to the CIMScope object.
 95 karl  1.18         @param   scope - Specifies a scope value. For example:
 96                    <pre>
 97                        CIMScope s0;
 98                        s0.addScope (CIMScope::INDICATION);
 99                        if(s0.hasScope (CIMScope::INDICATION))
100                            ...				..
101                    </pre>
102 kumpf 1.15     */
103 kumpf 1.14     void addScope (const CIMScope & scope);
104 kumpf 1.13 
105 kumpf 1.15     /** Compares two CIMScope objects.
106 karl  1.18         @param  scope - Specifies a CIMScope object.
107                    @return True if the two CIMScope objects are equal; otherwise, false.
108                    For example,
109                    <pre>
110                        CIMScope s0;
111                        s0.addScope (CIMScope::CLASS + CIMScope::PARAMETER);
112                        if(s0.hasScope (CIMScope::CLASS))
113                            ...	..
114                </pre>
115 kumpf 1.15     */
116 kumpf 1.13     Boolean equal (const CIMScope & scope) const;
117            
118 kumpf 1.15     /** Combines two CIMScope objects.
119 karl  1.18         @param  scope - Specifies a CIMScope object to add.
120 kumpf 1.14         @return A new CIMScope object that represents the combination of this
121 kumpf 1.15                 scope object with the specified scope object.
122 karl  1.18         <pre>
123                        CIMScope s0(CIMScope::CLASS);
124                        CIMScope s1(CIMScope::PARAMETER);
125                        CIMScope s3 = s0 + S1;
126                    </pre>
127 kumpf 1.15     */
128 kumpf 1.14     CIMScope operator+ (const CIMScope & scope) const;
129            
130 kumpf 1.15     /** Returns a String representation of the CIMScope object.
131                    This method is for diagnostic purposes. The format of the output
132 kumpf 1.13         is subject to change.
133 kumpf 1.15     */
134 kumpf 1.13     String toString () const;
135            
136 kumpf 1.15     /** Indicates that the CIMScope object has no value (is uninitialized).
137                */
138 kumpf 1.14     static const CIMScope NONE;
139 kumpf 1.13 
140 kumpf 1.15     /** Indicates that the qualifier may be used with classes.
141                */
142 kumpf 1.14     static const CIMScope CLASS;
143 kumpf 1.13 
144 kumpf 1.15     /** Indicates that the qualifier may be used with associations.
145                */
146 kumpf 1.14     static const CIMScope ASSOCIATION;
147 kumpf 1.13 
148 kumpf 1.15     /** Indicates that the qualifier may be used with indications.
149                */
150 kumpf 1.14     static const CIMScope INDICATION;
151 kumpf 1.13 
152 kumpf 1.15     /** Indicates that the qualifier may be used with properties.
153                */
154 kumpf 1.14     static const CIMScope PROPERTY;
155 kumpf 1.13 
156 kumpf 1.15     /** Indicates that the qualifier may be used with references.
157                */
158 kumpf 1.14     static const CIMScope REFERENCE;
159 kumpf 1.13 
160 kumpf 1.15     /** Indicates that the qualifier may be used with methods.
161                */
162 kumpf 1.14     static const CIMScope METHOD;
163 kumpf 1.13 
164 kumpf 1.15     /** Indicates that the qualifier may be used with parameters.
165                */
166 kumpf 1.14     static const CIMScope PARAMETER;
167 kumpf 1.13 
168 kumpf 1.15     /** Indicates that the qualifier may be used with any of the types
169 kumpf 1.13         of objects (classes, associations, indications, properties, references,
170 kumpf 1.15         methods, parameters).
171                */
172 kumpf 1.14     static const CIMScope ANY;
173 kumpf 1.13 
174            private:
175 kumpf 1.14 
176 karl  1.18     // 
177 kumpf 1.14     CIMScope (const Uint32 scope);
178 karl  1.18     // Private member for storing he CIMScope
179 kumpf 1.13     Uint32 cimScope;
180 mike  1.8  };
181            
182            PEGASUS_NAMESPACE_END
183            
184            #endif /* Pegasus_Scope_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2