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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2