1 mike 1.7 //%/////////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to
7 // deal in the Software without restriction, including without limitation the
8 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 // sell copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
13 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
14 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
17 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
18 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
19 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 //
21 //==============================================================================
22 mike 1.7 //
23 // Author: Mike Brasher (mbrasher@bmc.com)
24 //
|
25 karl 1.11 // Modified By: Karl Schopmeyer(k.schopmeyer@opengroup.org)
|
26 mike 1.7 //
27 //%/////////////////////////////////////////////////////////////////////////////
28
29 #ifndef Pegasus_Flavor_h
30 #define Pegasus_Flavor_h
31
32 #include <Pegasus/Common/Config.h>
33 #include <Pegasus/Common/Array.h>
34 #include <Pegasus/Common/String.h>
35
36 PEGASUS_NAMESPACE_BEGIN
|
37 mike 1.9
38 /** This structure defines flavor constants borne by CIMQualifier objects.
|
39 mike 1.7 */
40 struct PEGASUS_COMMON_LINKAGE CIMFlavor
41 {
|
42 mike 1.9 /** Indicates that the qualifier has no flavors.
43 */
|
44 mike 1.7 static const Uint32 NONE;
|
45 mike 1.9
46 /** Indicates that the qualifier may be overriden.
47 */
|
48 mike 1.7 static const Uint32 OVERRIDABLE;
|
49 karl 1.11 static const Uint32 ENABLEOVERRIDE;
50
51 static const Uint32 DISABLEOVERRIDE;
|
52 mike 1.9
53 /** Indicates that the qualifier is propagated to the qualifier in the
54 subclass with the same name.
55 */
|
56 mike 1.7 static const Uint32 TOSUBCLASS;
|
57 mike 1.9
|
58 karl 1.11 /* Indicates that the qualifier may not be propagated to the qualifier in
59 a subclass
60 */
61 static const Uint32 RESTRICTED;
62
|
63 mike 1.9 /** Indicates that the qualifier is propagated to the qualifier in the
64 instance with the same name.
65 */
|
66 karl 1.11
|
67 mike 1.7 static const Uint32 TOINSTANCE;
|
68 mike 1.9
69 /** Indicates whether qualifier is translatable (for internationalization).
70 */
|
71 mike 1.7 static const Uint32 TRANSLATABLE;
72
|
73 mike 1.9 /** Defaults according to the CIM DTD (OVERRIDABLE | TOSUBCLASS).
74 */
|
75 mike 1.7 static const Uint32 DEFAULTS;
|
76 karl 1.10
77 /** Set both toInstance and toinstance according to the CIM DTD (OVERRIDABLE | TOSUBCLASS).
78 */
79 static const Uint32 TOSUBELEMENTS;
|
80 karl 1.11
81 /** Includes all elements of Flavor..
82 */
83 static const Uint32 ALL;
84
|
85 mike 1.7 };
86
|
87 mike 1.8 /** FlavorToMof - Converts the flavor attributes of a qualifier to CIM MOF
88 keywords separated by spaces and returns them as a String.
89 @param flavor Variable contianing the flavor mask
90 @return Strin containing the flavor attribute keywords.
91 */
92 PEGASUS_COMMON_LINKAGE String FlavorToMof(Uint32 flavor);
|
93 mike 1.7
|
94 mike 1.8 /** FlavorToXML - converts the flavor attributes of a qualifier to cimxml
95 format and puts them into the variable out.
96 @param out XML output stream into which the xml is places.
97 @param flavor variable containing the flavor definition
|
98 mike 1.9
99 <pre>
100 // Get flavorkeywords and test for any returned keywords
101 Uint32 flavor = CIMFlavor::DEFAULTS,
102 String flavorString;
103 flavorString = FlavorToMof(_flavor);
104 if (flavorString.size())
105 ... // code to execute if keywords exist
106
107 </pre>
|
108 mike 1.8 */
|
109 mike 1.7 PEGASUS_COMMON_LINKAGE void FlavorToXml(
110 Array<Sint8>& out,
111 Uint32 flavor);
112
113 PEGASUS_NAMESPACE_END
114
115 #endif /* Pegasus_Flavor_h */
|