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

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