1 martin 1.25 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.26 //
|
3 martin 1.25 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.26 //
|
10 martin 1.25 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.26 //
|
17 martin 1.25 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.26 //
|
20 martin 1.25 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.26 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.26 //
|
28 martin 1.25 //////////////////////////////////////////////////////////////////////////
|
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.24 The CIMScope class represents the DMTF standard CIM qualifier scope
43 definition. The scope of a qualifier defines the types of CIM objects
44 with which the qualifier may be used. A CIMScope contains zero or more
45 of these values: CLASS, ASSOCIATION, INDICATION, PROPERTY, REFERENCE,
46 METHOD, PARAMETER.
|
47 mike 1.8 */
|
48 kumpf 1.13 class PEGASUS_COMMON_LINKAGE CIMScope
|
49 mike 1.8 {
|
50 kumpf 1.13 public:
51
|
52 kumpf 1.24 /**
53 Constructs a CIMScope object with the value NONE.
|
54 kumpf 1.15 */
|
55 kumpf 1.24 CIMScope();
|
56 kumpf 1.13
|
57 kumpf 1.24 /**
58 Constructs a CIMScope object from the value of a specified
59 CIMScope object.
60 @param scope The CIMScope object from which to construct a new
61 CIMScope object.
62 */
63 CIMScope(const CIMScope& scope);
64
65 /**
66 Assigns the value of the specified CIMScope object to this object.
67 @param scope The CIMScope object from which to assign this
68 CIMScope object.
69 @return A reference to this CIMScope object.
70 */
71 CIMScope& operator=(const CIMScope& scope);
72
73 /**
74 Checks whether the scope contains specified scope values.
75 @param scope A CIMScope specifying the scope values to check.
76 @return True if the scope contains all the values in the specified
77 CIMScope object, false otherwise.
78 kumpf 1.24 */
79 Boolean hasScope(const CIMScope& scope) const;
80
81 /**
82 Adds scopes value to the CIMScope object.
83 <p><b>Example:</b>
|
84 karl 1.18 <pre>
|
85 kumpf 1.24 CIMScope s;
86 s.addScope(CIMScope::INDICATION);
87 assert(s.hasScope(CIMScope::INDICATION));
|
88 karl 1.18 </pre>
|
89 kumpf 1.24 @param scope A CIMScope containing the scope values to add.
|
90 kumpf 1.15 */
|
91 kumpf 1.24 void addScope(const CIMScope & scope);
|
92 kumpf 1.13
|
93 kumpf 1.24 /**
94 Compares the CIMScope with a specified CIMScope.
95 @param scope The CIMScope to be compared.
96 @return True if this scope has the same set of values as the
97 specified scope, false otherwise.
|
98 kumpf 1.15 */
|
99 kumpf 1.13 Boolean equal (const CIMScope & scope) const;
100
|
101 kumpf 1.24 /**
102 Adds two scope values.
103 <p><b>Example:</b>
|
104 karl 1.18 <pre>
105 CIMScope s0(CIMScope::CLASS);
106 CIMScope s1(CIMScope::PARAMETER);
107 CIMScope s3 = s0 + S1;
108 </pre>
|
109 kumpf 1.24 @param scope A CIMScope containing the scope value to add to this
110 scope.
111 @return A new CIMScope object containing a union of the values in the
112 two scope objects.
|
113 kumpf 1.15 */
|
114 kumpf 1.24 CIMScope operator+(const CIMScope & scope) const;
|
115 kumpf 1.14
|
116 kumpf 1.24 /**
117 Returns a String representation of the CIMScope object.
|
118 kumpf 1.15 This method is for diagnostic purposes. The format of the output
|
119 kumpf 1.13 is subject to change.
|
120 kumpf 1.24 @return A String containing a human-readable representation of the
121 scope value.
|
122 kumpf 1.15 */
|
123 kumpf 1.24 String toString() const;
|
124 kumpf 1.13
|
125 kumpf 1.24 /**
126 Indicates that the CIMScope object has no value (is uninitialized).
127 This is not a valid qualifier scope.
|
128 kumpf 1.15 */
|
129 kumpf 1.14 static const CIMScope NONE;
|
130 kumpf 1.13
|
131 kumpf 1.24 /**
132 Indicates that the qualifier may be used with classes.
|
133 kumpf 1.15 */
|
134 kumpf 1.14 static const CIMScope CLASS;
|
135 kumpf 1.13
|
136 kumpf 1.24 /**
137 Indicates that the qualifier may be used with associations.
|
138 kumpf 1.15 */
|
139 kumpf 1.14 static const CIMScope ASSOCIATION;
|
140 kumpf 1.13
|
141 kumpf 1.24 /**
142 Indicates that the qualifier may be used with indications.
|
143 kumpf 1.15 */
|
144 kumpf 1.14 static const CIMScope INDICATION;
|
145 kumpf 1.13
|
146 kumpf 1.24 /**
147 Indicates that the qualifier may be used with properties.
|
148 kumpf 1.15 */
|
149 kumpf 1.14 static const CIMScope PROPERTY;
|
150 kumpf 1.13
|
151 kumpf 1.24 /**
152 Indicates that the qualifier may be used with references.
|
153 kumpf 1.15 */
|
154 kumpf 1.14 static const CIMScope REFERENCE;
|
155 kumpf 1.13
|
156 kumpf 1.24 /**
157 Indicates that the qualifier may be used with methods.
|
158 kumpf 1.15 */
|
159 kumpf 1.14 static const CIMScope METHOD;
|
160 kumpf 1.13
|
161 kumpf 1.24 /**
162 Indicates that the qualifier may be used with parameters.
|
163 kumpf 1.15 */
|
164 kumpf 1.14 static const CIMScope PARAMETER;
|
165 kumpf 1.13
|
166 kumpf 1.24 /**
167 Indicates that the qualifier may be used with any of the types
|
168 kumpf 1.13 of objects (classes, associations, indications, properties, references,
|
169 kumpf 1.15 methods, parameters).
170 */
|
171 kumpf 1.14 static const CIMScope ANY;
|
172 kumpf 1.13
173 private:
|
174 kumpf 1.14
175 CIMScope (const Uint32 scope);
|
176 kumpf 1.13 Uint32 cimScope;
|
177 kumpf 1.24
|
178 schuur 1.19 friend class BinaryStreamer;
|
179 mike 1.8 };
180
181 PEGASUS_NAMESPACE_END
182
183 #endif /* Pegasus_Scope_h */
|