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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2