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 */
|
63 kumpf 1.13 CIMScope ();
64
|
65 kumpf 1.15 /** Constructs a CIMScope object from an existing CIMScope object (copy
|
66 kumpf 1.13 constructor).
67 @param scope another CIMScope object
|
68 kumpf 1.15 */
|
69 kumpf 1.13 CIMScope (const CIMScope & scope);
70
|
71 kumpf 1.15 /** Assigns the value of one CIMScope object to another (assignment
|
72 kumpf 1.13 operator).
|
73 kumpf 1.15 @param scope - a CIMScope object.
74 @return the CIMScope object.
|
75 karl 1.16 <pre>
76 CimScope s0;
77 CIMScope s1(s0);
78 </pre>
|
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 kumpf 1.15 @param scope - a CIMScope object.
85 @return true if every value in the specified CIMScope object is
86 included in the CIMScope object, false otherwise.
|
87 karl 1.16 <pre>
88 CIMScope s0;
89 CIMScope s2;
90 s0.addScope (CIMScope::INDICATION);
91 s3 = s0;
92 </pre>
|
93 kumpf 1.15 */
|
94 kumpf 1.13 Boolean hasScope (const CIMScope & scope) const;
95
|
96 kumpf 1.15 /** Adds the specified scope value to the CIMScope object.
97 @param scope - a scope value.
|
98 karl 1.16 <pre>
99 CIMScope s0;
100 s0.addScope (CIMScope::INDICATION);
101 if(s0.hasScope (CIMScope::INDICATION))
102 ... ..
103 </pre>
|
104 kumpf 1.15 */
|
105 kumpf 1.14 void addScope (const CIMScope & scope);
|
106 kumpf 1.13
|
107 kumpf 1.15 /** Compares two CIMScope objects.
108 @param scope - a CIMScope object.
109 @return true if the two CIMScope objects are equal,
110 false otherwise.
|
111 karl 1.16 <pre>
112 CIMScope s0;
113 s0.addScope (CIMScope::CLASS + CIMScope::PARAMETER);
114 if(s0.hasScope (CIMScope::CLASS))
115 ... ..
116 </pre>
|
117 kumpf 1.15 */
|
118 kumpf 1.13 Boolean equal (const CIMScope & scope) const;
119
|
120 kumpf 1.15 /** Combines two CIMScope objects.
121 @param scope - a CIMScope object to add.
|
122 kumpf 1.14 @return A new CIMScope object that represents the combination of this
|
123 kumpf 1.15 scope object with the specified scope object.
|
124 karl 1.16 <pre>
125 CIMScope s0(CIMScope::CLASS);
126 CIMScope s1(CIMScope::PARAMETER);
127 CIMScope s3 = s0 + S1;
128 </pre>
|
129 kumpf 1.15 */
|
130 kumpf 1.14 CIMScope operator+ (const CIMScope & scope) const;
131
|
132 kumpf 1.15 /** Returns a String representation of the CIMScope object.
133 This method is for diagnostic purposes. The format of the output
|
134 kumpf 1.13 is subject to change.
|
135 kumpf 1.15 */
|
136 kumpf 1.13 String toString () const;
137
|
138 kumpf 1.15 /** Indicates that the CIMScope object has no value (is uninitialized).
139 */
|
140 kumpf 1.14 static const CIMScope NONE;
|
141 kumpf 1.13
|
142 kumpf 1.15 /** Indicates that the qualifier may be used with classes.
143 */
|
144 kumpf 1.14 static const CIMScope CLASS;
|
145 kumpf 1.13
|
146 kumpf 1.15 /** Indicates that the qualifier may be used with associations.
147 */
|
148 kumpf 1.14 static const CIMScope ASSOCIATION;
|
149 kumpf 1.13
|
150 kumpf 1.15 /** Indicates that the qualifier may be used with indications.
151 */
|
152 kumpf 1.14 static const CIMScope INDICATION;
|
153 kumpf 1.13
|
154 kumpf 1.15 /** Indicates that the qualifier may be used with properties.
155 */
|
156 kumpf 1.14 static const CIMScope PROPERTY;
|
157 kumpf 1.13
|
158 kumpf 1.15 /** Indicates that the qualifier may be used with references.
159 */
|
160 kumpf 1.14 static const CIMScope REFERENCE;
|
161 kumpf 1.13
|
162 kumpf 1.15 /** Indicates that the qualifier may be used with methods.
163 */
|
164 kumpf 1.14 static const CIMScope METHOD;
|
165 kumpf 1.13
|
166 kumpf 1.15 /** Indicates that the qualifier may be used with parameters.
167 */
|
168 kumpf 1.14 static const CIMScope PARAMETER;
|
169 kumpf 1.13
|
170 kumpf 1.15 /** Indicates that the qualifier may be used with any of the types
|
171 kumpf 1.13 of objects (classes, associations, indications, properties, references,
|
172 kumpf 1.15 methods, parameters).
173 */
|
174 kumpf 1.14 static const CIMScope ANY;
|
175 kumpf 1.13
176 private:
|
177 kumpf 1.14
|
178 kumpf 1.15 ///
|
179 kumpf 1.14 CIMScope (const Uint32 scope);
|
180 kumpf 1.13
181 Uint32 cimScope;
|
182 mike 1.8 };
183
184 PEGASUS_NAMESPACE_END
185
186 #endif /* Pegasus_Scope_h */
|