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

 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           // Modified By:
26           //
27           //%/////////////////////////////////////////////////////////////////////////////
28           
29           /*
30           
31            CIMFlavor.h -- This file declares qualifier flavor constants.
32           
33           */
34           
35           #ifndef Pegasus_Flavor_h
36           #define Pegasus_Flavor_h
37           
38           #include <Pegasus/Common/Config.h>
39           #include <Pegasus/Common/Array.h>
40           #include <Pegasus/Common/String.h>
41           
42           PEGASUS_NAMESPACE_BEGIN
43 mike  1.7 /**
44           CIMQualifier flavor constants
45           */
46           struct PEGASUS_COMMON_LINKAGE CIMFlavor
47           {
48               static const Uint32 NONE;
49               static const Uint32 OVERRIDABLE;
50               static const Uint32 TOSUBCLASS;
51               static const Uint32 TOINSTANCE;
52               static const Uint32 TRANSLATABLE;
53           
54               // These are the defaults according to the CIM DTD:
55               // OVERRIDABLE, TOSUBCLASS
56           
57               static const Uint32 DEFAULTS;
58           };
59           
60 mike  1.8 /** FlavorToMof - Converts the flavor attributes of a qualifier to CIM MOF
61               keywords separated by spaces and returns them as a String.
62               @param flavor Variable contianing the flavor mask
63               @return Strin containing the flavor attribute keywords.
64           */
65           PEGASUS_COMMON_LINKAGE String FlavorToMof(Uint32 flavor);
66 mike  1.7 
67 mike  1.8 /** FlavorToXML - converts the flavor attributes of a qualifier to cimxml
68               format and puts them into the variable out.
69               @param out XML output stream into which the xml is places.
70               @param flavor variable containing the flavor definition
71               <pre>
72               // Get flavorkeywords and test for any returned keywords
73               Uint32 flavor = CIMFlavor::DEFAULTS,
74               String flavorString;
75               flavorString = FlavorToMof(_flavor);
76               if (flavorString.size())
77           	...           // code to execute if keywords exist
78               
79               </pre>
80           */
81 mike  1.7 PEGASUS_COMMON_LINKAGE void FlavorToXml(
82               Array<Sint8>& out, 
83               Uint32 flavor);
84           
85           PEGASUS_NAMESPACE_END
86           
87           #endif /* Pegasus_Flavor_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2