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

  1 a.dunfey 1.24.18.1 //%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 a.dunfey 1.24.18.1 // 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 a.dunfey 1.24.18.2     The CIMFlavor class represents the DMTF standard CIM qualifier flavor
 45                        definition, which encapsulates the propagation and override rules for
 46                        qualifiers.  The propagation rules define whether a qualifier may be
 47                        propagated from classes to derived classes or from classes to instances.
 48                        The override rules define whether a derived class may override a
 49                        qualifier value.
 50                    
 51                        A CIMFlavor contains one or more of these values: OVERRIDABLE,
 52                        TOSUBCLASS, TOINSTANCE, TRANSLATABLE, DISABLEOVERRIDE, ENABLEOVERRIDE,
 53                        RESTRICTED and DEFAULTS.
 54                    */
 55 kumpf    1.15      class PEGASUS_COMMON_LINKAGE CIMFlavor
 56 mike     1.7       {
 57 kumpf    1.15      public:
 58                    
 59                        /**
 60 a.dunfey 1.24.18.2         Constructs a CIMFlavor object with the value NONE.
 61                        */
 62                        CIMFlavor();
 63 kumpf    1.15      
 64                        /**
 65 a.dunfey 1.24.18.2         Constructs a CIMFlavor object from the value of a specified
 66 karl     1.20              CIMFlavor object.
 67 a.dunfey 1.24.18.2         @param flavor The CIMFlavor object from which to construct a new
 68                                CIMFlavor object.
 69                        */
 70                        CIMFlavor(const CIMFlavor & flavor);
 71                    
 72                        /**
 73                            Assigns the value of the specified CIMFlavor object to this object.
 74                            @param scope The CIMFlavor object from which to assign this
 75                                CIMFlavor object.
 76                            @return A reference to this CIMFlavor object.
 77                        */
 78                        CIMFlavor& operator=(const CIMFlavor& flavor);
 79                    
 80                        /**
 81                            Adds flavor values to the CIMFlavor object.
 82                            @param flavor A CIMFlavor containing the flavor values to add.
 83                        */
 84                        void addFlavor(const CIMFlavor& flavor);
 85                    
 86                        /**
 87                            Removes flavor values from the CIMFlavor object.
 88 a.dunfey 1.24.18.2         @param flavor A CIMFlavor containing the flavor values to remove.
 89                        */
 90                        void removeFlavor(const CIMFlavor& flavor);
 91                    
 92                        /**
 93                            Checks whether the flavor contains specified flavor values.
 94                            @param flavor A CIMFlavor specifying the flavor values to check.
 95                            @return True if the flavor contains all the values in the specified
 96                                CIMFlavor object, false otherwise.
 97                        */
 98                        Boolean hasFlavor(const CIMFlavor& flavor) const;
 99                    
100                        /**
101                            Compares the CIMFlavor with a specified CIMFlavor.
102                            @param flavor The CIMFlavor to be compared.
103                            @return True if this flavor has the same set of values as the
104                                specified flavor, false otherwise.
105                        */
106                        Boolean equal(const CIMFlavor& flavor) const;
107                    
108                        /**
109 a.dunfey 1.24.18.2         Adds two flavor values.
110                            @param flavor A CIMFlavor containing the flavor value to add to this
111                                flavor.
112                            @return A new CIMFlavor object containing a union of the values in the
113                                two flavor objects.
114                        */
115                        CIMFlavor operator+(const CIMFlavor& flavor) const;
116 kumpf    1.16      
117 karl     1.20          /**
118 kumpf    1.15              Returns a String representation of the CIMFlavor object.
119 a.dunfey 1.24.18.2         This method is for diagnostic purposes. The format of the output
120                            is subject to change.
121                            @return A String containing a human-readable representation of the
122                                flavor value.
123                        */
124                        String toString() const;
125 kumpf    1.15      
126 karl     1.20          /**
127 a.dunfey 1.24.18.2         Indicates that the qualifier has no flavors.
128                        */
129 kumpf    1.16          static const CIMFlavor NONE;
130 mike     1.9       
131 karl     1.20          /**
132 kumpf    1.18              Indicates that the qualifier may be overridden.
133 a.dunfey 1.24.18.2     */
134 kumpf    1.16          static const CIMFlavor OVERRIDABLE;
135 a.dunfey 1.24.18.2 
136 karl     1.20          /**
137 a.dunfey 1.24.18.2         Indicates that the override feature is enabled for the qualifier.
138                            Thus, the qualifier may be overridden.
139                        */
140 kumpf    1.16          static const CIMFlavor ENABLEOVERRIDE;
141 karl     1.11      
142 karl     1.20          /**
143 a.dunfey 1.24.18.2         Indicates that the override feature is disabled for the qualifier.
144                            Thus, the qualifier may not be overridden.
145                        */
146 kumpf    1.16          static const CIMFlavor DISABLEOVERRIDE;
147 mike     1.9       
148 karl     1.20          /**
149 a.dunfey 1.24.18.2         Indicates that the qualifier is propagated to subclasses.
150                        */
151 kumpf    1.16          static const CIMFlavor TOSUBCLASS;
152 mike     1.9       
153 karl     1.20          /**
154 a.dunfey 1.24.18.2         Indicates that the qualifier is not propagated to subclasses.
155                        */
156 kumpf    1.16          static const CIMFlavor RESTRICTED;
157 kumpf    1.15      
158 karl     1.20          /**
159 a.dunfey 1.24.18.2         Indicates that the qualifier is propagated to instances.
160                        */
161 kumpf    1.16          static const CIMFlavor TOINSTANCE;
162 mike     1.9       
163 karl     1.20          /**
164 a.dunfey 1.24.18.2         Indicates that the qualifier is translatable (for
165                            internationalization).
166                        */
167 kumpf    1.16          static const CIMFlavor TRANSLATABLE;
168 mike     1.7       
169 karl     1.20          /**
170 a.dunfey 1.24.18.2         Indicates the default flavor settings (OVERRIDABLE | TOSUBCLASS).
171                        */
172 kumpf    1.16          static const CIMFlavor DEFAULTS;
173 karl     1.10      
174 karl     1.20          /**
175 a.dunfey 1.24.18.2         Indicates that the qualifier is propagated to subclasses and to
176                            instances (TOSUBCLASS | TOINSTANCE).
177                        */
178 kumpf    1.16          static const CIMFlavor TOSUBELEMENTS;
179 karl     1.11      
180 kumpf    1.15      private:
181                    
182 karl     1.20          /*
183 a.dunfey 1.24.18.2         Constructs a CIMFlavor object with the specified values.
184                            @param flavor A Uint32 representing the set of flavor values.
185                        */
186                        CIMFlavor(const Uint32 flavor);
187 kumpf    1.15      
188                        Uint32 cimFlavor;
189 schuur   1.21      
190                        friend class BinaryStreamer;
191 mike     1.7       };
192                    
193                    PEGASUS_NAMESPACE_END
194                    
195                    #endif /* Pegasus_Flavor_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2