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

  1 karl  1.19 //%2003////////////////////////////////////////////////////////////////////////
  2 mike  1.7  //
  3 karl  1.19 // 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.7  //
  8            // Permission is hereby granted, free of charge, to any person obtaining a copy
  9 kumpf 1.13 // 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.7  // 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 karl  1.20 //
 15 kumpf 1.13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16 mike  1.7  // 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.13 // 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.7  // 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 karl  1.20 // Modified By:  Karl Schopmeyer(k.schopmeyer@opengroup.org)
 29 kumpf 1.12 //               Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 30 kumpf 1.15 //              Carol Ann Krug Graves, Hewlett-Packard Company
 31            //                (carolann_graves@hp.com)
 32 mike  1.7  //
 33            //%/////////////////////////////////////////////////////////////////////////////
 34            
 35            #ifndef Pegasus_Flavor_h
 36            #define Pegasus_Flavor_h
 37            
 38            #include <Pegasus/Common/Config.h>
 39            #include <Pegasus/Common/String.h>
 40 kumpf 1.14 #include <Pegasus/Common/Linkage.h>
 41 mike  1.7  
 42            PEGASUS_NAMESPACE_BEGIN
 43 mike  1.9  
 44 kumpf 1.15 /**
 45 karl  1.20     The CIMFlavor class implements the concept of the CIM qualifier flavor that
 46                encapsulates the propagation and override rules for qualifiers.
 47                The propagation rules define whether a qualifier
 48                may be propagated from classes to derived classes, or from classes to
 49 kumpf 1.15     instances.  The override rules define whether or not derived classes may
 50 karl  1.20     override a qualifier value or whether it must be fixed for an entire
 51 kumpf 1.15     class hierarchy.
 52            
 53 karl  1.20     The possible values are: OVERRIDABLE, TOSUBCLASS, TOINSTANCE,
 54                TRANSLATABLE, DISABLEOVERRIDE, ENABLEOVERRID, RESTRICTED and DEFAULTS.
 55 kumpf 1.15     The flavor is a set of zero or more of these possible values.
 56             */
 57            class PEGASUS_COMMON_LINKAGE CIMFlavor
 58 mike  1.7  {
 59 kumpf 1.15 public:
 60            
 61                /**
 62 karl  1.20         Constructs a CIMFlavor object with no flavor values set (default
 63                    constructor). The parameters and values are null.
 64 kumpf 1.15      */
 65                CIMFlavor ();
 66            
 67                /**
 68 karl  1.20         Constructs a CIMFlavor object from an existing CIMFlavor object (copy
 69 kumpf 1.15         constructor).
 70            
 71 karl  1.20         @param   flavor  Specifies the name of the CIMFlavor instance of
 72                    the CIMFlavor object.
 73 kumpf 1.15      */
 74                CIMFlavor (const CIMFlavor & flavor);
 75            
 76                /**
 77 karl  1.20         Assigns the value of one CIMFlavor object to another (assignment
 78 kumpf 1.15         operator).
 79            
 80 karl  1.20         @param   flavor   Specifies the name of the CIMFlavor instance of
 81                    the CIMFlavor object.
 82 kumpf 1.15 
 83 karl  1.20         @return  The new instance of the CIMFlavor object.
 84 kumpf 1.15      */
 85                CIMFlavor & operator= (const CIMFlavor & flavor);
 86            
 87                /**
 88                    Adds the set of flavor values of the specified CIMFlavor object to this
 89                    CIMFlavor object.
 90            
 91 karl  1.20         @param   flavor  Specifies the name of the CIMFlavor object that
 92                    contains the flavor values to add to the CIMFlavor object.
 93 kumpf 1.15      */
 94                void addFlavor (const CIMFlavor & flavor);
 95            
 96                /**
 97                    Removes the specified set of flavor values from the CIMFlavor object.
 98            
 99 karl  1.20         @param   flavor   Specifies the name of the CIMFlavor object that
100                    contains the flavor values to remove from the CIMFlavor object.
101 kumpf 1.15      */
102 kumpf 1.16     void removeFlavor (const CIMFlavor & flavor);
103 kumpf 1.15 
104                /**
105 karl  1.20         Determines if every value in the specified CIMFlavor object is included
106 kumpf 1.15         in this CIMFlavor object.
107            
108 karl  1.20         @param   flavor  Specifies the name of the CIMFlavor instance whose
109                    values you want to compare to the CIMFlavor object.
110 kumpf 1.15 
111 karl  1.20         @return  True if every value in the specified instance of the CIMFlavor
112                    object is included in the CIMFlavor object.  Otherwise, a value of
113                    false is returned.
114 kumpf 1.15      */
115                Boolean hasFlavor (const CIMFlavor & flavor) const;
116            
117 karl  1.20     /**
118                    Compares two CIMFlavor objects and determines whether or not they are equal.
119 kumpf 1.15 
120 karl  1.20         @param   flavor  Specifies the name of the CIMFlavor instance that you want
121                    to compare to the CIMFlavor object.
122 kumpf 1.15 
123 karl  1.20         @return True if the two CIMFlavor objects are equal.  Otherwise, a value
124                    of false is returned.
125 kumpf 1.15      */
126                Boolean equal (const CIMFlavor & flavor) const;
127            
128 karl  1.20     /**
129                    Combines two CIMFlavor objects. The parameters and values of the specified
130                    CIMFlavor instance are included (added) to the CIMFlavor object.
131 kumpf 1.16 
132 karl  1.20         @param   flavor   Specifies the name of the CIMFlavor instance to add to the
133                    CIMFlavor object.
134 kumpf 1.16 
135                    @return A new CIMFlavor object that represents the combination of this
136                            flavor with the specified flavor.
137                 */
138                CIMFlavor operator+ (const CIMFlavor & flavor) const;
139            
140 karl  1.20     /**
141 kumpf 1.15         Returns a String representation of the CIMFlavor object.
142 karl  1.20         Use this method to aide in debugging problems.  Depending on the implementation,
143                    the string format may vary.  The returned value cannot be null but may be empty.
144 kumpf 1.15      */
145                String toString () const;
146            
147 karl  1.20     /**
148                    Indicates that the qualifier has no flavors. Thus, the qualifier does not have
149                     any parameters nor values.
150 kumpf 1.15      */
151 kumpf 1.16     static const CIMFlavor NONE;
152 mike  1.9  
153 karl  1.20     /**
154 kumpf 1.18         Indicates that the qualifier may be overridden.
155 kumpf 1.15      */
156 kumpf 1.16     static const CIMFlavor OVERRIDABLE;
157 karl  1.20     /**
158                    Indicates that the override feature is enable for the qualifier. Thus, the
159                    qualifier can be overridden.
160                 */
161 kumpf 1.16     static const CIMFlavor ENABLEOVERRIDE;
162 karl  1.11 
163 karl  1.20     /**
164 kumpf 1.18         Indicates that the qualifier may not be overridden.
165 kumpf 1.15      */
166 kumpf 1.16     static const CIMFlavor DISABLEOVERRIDE;
167 mike  1.9  
168 karl  1.20     /**
169 kumpf 1.15         Indicates that the qualifier is propagated to the qualifier in the
170 karl  1.20     subclass with the same name.
171 kumpf 1.15      */
172 kumpf 1.16     static const CIMFlavor TOSUBCLASS;
173 mike  1.9  
174 karl  1.20     /**
175 kumpf 1.15         Indicates that the qualifier is not propagated to the qualifier in the
176 karl  1.20     subclass with the same name; it applies only to the class in which it
177 kumpf 1.18         is declared.
178 kumpf 1.15      */
179 kumpf 1.16     static const CIMFlavor RESTRICTED;
180 kumpf 1.15 
181 karl  1.20     /**
182 kumpf 1.15         Indicates that the qualifier is propagated to the qualifier in the
183 karl  1.20     instance with the same name.
184 kumpf 1.15      */
185 kumpf 1.16     static const CIMFlavor TOINSTANCE;
186 mike  1.9  
187 karl  1.20     /**
188 kumpf 1.18         Indicates that the qualifier is translatable (for internationalization).
189 kumpf 1.15      */
190 kumpf 1.16     static const CIMFlavor TRANSLATABLE;
191 mike  1.7  
192 karl  1.20     /**
193                    Indicates the default flavor settings. (OVERRIDABLE | TOSUBCLASS).
194 kumpf 1.15      */
195 kumpf 1.16     static const CIMFlavor DEFAULTS;
196 karl  1.10 
197 karl  1.20     /**
198 kumpf 1.18         Indicates both toSubclass and toInstance (TOSUBCLASS | TOINSTANCE).
199 kumpf 1.15      */
200 kumpf 1.16     static const CIMFlavor TOSUBELEMENTS;
201 karl  1.11 
202 kumpf 1.15 private:
203            
204 karl  1.20     /*
205                    Constructs an instance of the CIMFlavor object with the specified set of values.
206 kumpf 1.16 
207 karl  1.20         @param   flavor    A Uint32 representing the set of flavor
208 kumpf 1.18                            values to initialize with.
209 kumpf 1.16      */
210                CIMFlavor (const Uint32 flavor);
211 kumpf 1.15 
212                Uint32 cimFlavor;
213 mike  1.7  };
214            
215            PEGASUS_NAMESPACE_END
216            
217            #endif /* Pegasus_Flavor_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2