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

  1 mike  1.7 //%/////////////////////////////////////////////////////////////////////////////
  2           //
  3 kumpf 1.13 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
  4            // The Open Group, Tivoli Systems
  5 mike  1.7  //
  6            // Permission is hereby granted, free of charge, to any person obtaining a copy
  7 kumpf 1.13 // of this software and associated documentation files (the "Software"), to
  8            // deal in the Software without restriction, including without limitation the
  9            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 10 mike  1.7  // sell copies of the Software, and to permit persons to whom the Software is
 11            // furnished to do so, subject to the following conditions:
 12            // 
 13 kumpf 1.13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 14 mike  1.7  // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 15            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 16 kumpf 1.13 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 17            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 18            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 19 mike  1.7  // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 20            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 21            //
 22            //==============================================================================
 23            //
 24            // Author: Mike Brasher (mbrasher@bmc.com)
 25            //
 26 karl  1.11 // Modified By:	 Karl Schopmeyer(k.schopmeyer@opengroup.org)
 27 kumpf 1.12 //               Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 28 kumpf 1.15 //              Carol Ann Krug Graves, Hewlett-Packard Company
 29            //                (carolann_graves@hp.com)
 30 mike  1.7  //
 31            //%/////////////////////////////////////////////////////////////////////////////
 32            
 33            #ifndef Pegasus_Flavor_h
 34            #define Pegasus_Flavor_h
 35            
 36            #include <Pegasus/Common/Config.h>
 37            #include <Pegasus/Common/String.h>
 38 kumpf 1.14 #include <Pegasus/Common/Linkage.h>
 39 mike  1.7  
 40            PEGASUS_NAMESPACE_BEGIN
 41 mike  1.9  
 42 kumpf 1.15 /**
 43                The CIMFlavor class implements the concept of the CIM qualifier flavor.
 44                The qualifier flavor concept encapsulates the propagation and override 
 45                rules for the qualifier.  The propagation rules define whether a qualifier
 46                may be propagated from classes to derived classes, or from classes to 
 47                instances.  The override rules define whether or not derived classes may
 48                override a qualifier value, or whether it must be fixed for an entire 
 49                class hierarchy.
 50            
 51                The possible values are: OVERRIDABLE, TOSUBCLASS, TOINSTANCE, 
 52                TRANSLATABLE, DISABLEOVERRIDE, RESTRICTED.
 53                The flavor is a set of zero or more of these possible values.
 54             */
 55            class PEGASUS_COMMON_LINKAGE CIMFlavor
 56 mike  1.7  {
 57 kumpf 1.15 public:
 58            
 59                /**
 60                    Constructs a CIMFlavor object with no flavor values set (default 
 61                    constructor).
 62                 */
 63                CIMFlavor ();
 64            
 65                /**
 66                    Constructs a CIMFlavor object from an existing CIMFlavor object (copy 
 67                    constructor).
 68            
 69                    @param   flavor                another CIMFlavor object
 70                 */
 71                CIMFlavor (const CIMFlavor & flavor);
 72            
 73                /**
 74                    Assigns the value of one CIMFlavor object to another (assignment 
 75                    operator).
 76            
 77                    @param   flavor                a CIMFlavor object
 78 kumpf 1.15 
 79                    @return  the CIMFlavor object
 80                 */
 81                CIMFlavor & operator= (const CIMFlavor & flavor);
 82            
 83                /**
 84                    Adds the set of flavor values of the specified CIMFlavor object to this
 85                    CIMFlavor object.
 86            
 87                    @param   flavor                a CIMFlavor object
 88                 */
 89                void addFlavor (const CIMFlavor & flavor);
 90            
 91                /**
 92                    Removes the specified set of flavor values from the CIMFlavor object.
 93            
 94 kumpf 1.16         @param   flavor                a CIMFlavor representing the set of
 95                                                   flavor values to remove
 96 kumpf 1.15      */
 97 kumpf 1.16     void removeFlavor (const CIMFlavor & flavor);
 98 kumpf 1.15 
 99                /**
100                    Determines if every value in the specified CIMFlavor object is included 
101                    in this CIMFlavor object.
102            
103                    @param   flavor                a CIMFlavor object
104            
105                    @return  True if every value in the specified CIMFlavor object is 
106                               included in the CIMFlavor object,
107                             False otherwise
108                 */
109                Boolean hasFlavor (const CIMFlavor & flavor) const;
110            
111                /** 
112                    Compares two CIMFlavor objects.
113            
114                    @param   flavor                a CIMFlavor object
115            
116                    @return True if the two CIMFlavor objects are equal, 
117                            False otherwise
118                 */
119 kumpf 1.15     Boolean equal (const CIMFlavor & flavor) const;
120            
121                /** 
122 kumpf 1.16         Combines two CIMFlavor objects.
123            
124                    @param   flavor                a CIMFlavor object to add
125            
126                    @return A new CIMFlavor object that represents the combination of this
127                            flavor with the specified flavor.
128                 */
129                CIMFlavor operator+ (const CIMFlavor & flavor) const;
130            
131                /** 
132 kumpf 1.15         Returns a String representation of the CIMFlavor object.
133                    This method is for diagnostic purposes.  The format of the output
134                    is subject to change.
135                 */
136                String toString () const;
137            
138                /** 
139                    Indicates that the qualifier has no flavors
140                 */
141 kumpf 1.16     static const CIMFlavor NONE;
142 mike  1.9  
143 kumpf 1.15     /** 
144                    Indicates that the qualifier may be overridden
145                 */
146 kumpf 1.16     static const CIMFlavor OVERRIDABLE;
147                static const CIMFlavor ENABLEOVERRIDE;
148 karl  1.11 
149 kumpf 1.15     /** 
150                    Indicates that the qualifier may not be overridden
151                 */
152 kumpf 1.16     static const CIMFlavor DISABLEOVERRIDE;
153 mike  1.9  
154 kumpf 1.15     /** 
155                    Indicates that the qualifier is propagated to the qualifier in the
156            	subclass with the same name
157                 */
158 kumpf 1.16     static const CIMFlavor TOSUBCLASS;
159 mike  1.9  
160 kumpf 1.15     /** 
161                    Indicates that the qualifier is not propagated to the qualifier in the
162            	subclass with the same name; it applies only to the class in which it 
163                    is declared
164                 */
165 kumpf 1.16     static const CIMFlavor RESTRICTED;
166 kumpf 1.15 
167                /** 
168                    Indicates that the qualifier is propagated to the qualifier in the
169            	instance with the same name
170                 */
171 kumpf 1.16     static const CIMFlavor TOINSTANCE;
172 mike  1.9  
173 kumpf 1.15     /** 
174                    Indicates that the qualifier is translatable (for internationalization)
175                 */
176 kumpf 1.16     static const CIMFlavor TRANSLATABLE;
177 mike  1.7  
178 kumpf 1.15     /** 
179                    Indicates default flavor setting (OVERRIDABLE | TOSUBCLASS)
180                 */
181 kumpf 1.16     static const CIMFlavor DEFAULTS;
182 karl  1.10 
183 kumpf 1.15     /** 
184                    Indicates both toSubclass and toInstance (TOSUBCLASS | TOINSTANCE)
185                 */
186 kumpf 1.16     static const CIMFlavor TOSUBELEMENTS;
187 karl  1.11 
188 kumpf 1.15 private:
189            
190 kumpf 1.16     /**
191                    Constructs a CIMFlavor object with the specified set of values.
192            
193                    @param   flavor                a Uint32 representing the set of flavor 
194                                                   values to initialize with
195                 */
196                CIMFlavor (const Uint32 flavor);
197 kumpf 1.15 
198                Uint32 cimFlavor;
199 mike  1.7  };
200            
201            PEGASUS_NAMESPACE_END
202            
203            #endif /* Pegasus_Flavor_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2