CIMFlavor.h
1 //%LICENSE////////////////////////////////////////////////////////////////
2 //
3 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
16 //
17 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
29 //
30 //%/////////////////////////////////////////////////////////////////////////////
31 
32 #ifndef Pegasus_Flavor_h
33 #define Pegasus_Flavor_h
34 
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/String.h>
37 #include <Pegasus/Common/Linkage.h>
38 
39 PEGASUS_NAMESPACE_BEGIN
40 
53 class PEGASUS_COMMON_LINKAGE CIMFlavor
54 {
55 public:
56 
60  CIMFlavor();
61 
68  CIMFlavor(const CIMFlavor & flavor);
69 
76  CIMFlavor& operator=(const CIMFlavor& flavor);
77 
82  void addFlavor(const CIMFlavor& flavor);
83 
88  void removeFlavor(const CIMFlavor& flavor);
89 
96  Boolean hasFlavor(const CIMFlavor& flavor) const;
97 
104  Boolean equal(const CIMFlavor& flavor) const;
105 
113  CIMFlavor operator+(const CIMFlavor& flavor) const;
114 
122  String toString() const;
123 
127  static const CIMFlavor NONE;
128 
132  static const CIMFlavor OVERRIDABLE;
133 
138  static const CIMFlavor ENABLEOVERRIDE;
139 
145 
149  static const CIMFlavor TOSUBCLASS;
150 
154  static const CIMFlavor RESTRICTED;
155 
160  static const CIMFlavor TOINSTANCE;
161 
166  static const CIMFlavor TRANSLATABLE;
167 
171  static const CIMFlavor DEFAULTS;
172 
178  static const CIMFlavor TOSUBELEMENTS;
179 
180 private:
181 
182  /*
183  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 
188  Uint32 cimFlavor;
189 
190  friend class BinaryStreamer;
191  friend class SCMOClass;
192  friend class SCMOInstance;
193  friend class SCMODump;
194  friend class SCMOXmlWriter;
195 };
196 
197 PEGASUS_NAMESPACE_END
198 
199 #endif /* Pegasus_Flavor_h */
static const CIMFlavor NONE
Definition: CIMFlavor.h:127
static const CIMFlavor RESTRICTED
Definition: CIMFlavor.h:154
Definition: String.h:119
static const CIMFlavor TRANSLATABLE
Definition: CIMFlavor.h:166
static const CIMFlavor DISABLEOVERRIDE
Definition: CIMFlavor.h:144
static const CIMFlavor TOSUBELEMENTS
Definition: CIMFlavor.h:178
static const CIMFlavor TOSUBCLASS
Definition: CIMFlavor.h:149
Definition: CIMFlavor.h:53
static const CIMFlavor OVERRIDABLE
Definition: CIMFlavor.h:132
static const CIMFlavor DEFAULTS
Definition: CIMFlavor.h:171
static const CIMFlavor ENABLEOVERRIDE
Definition: CIMFlavor.h:138
static const CIMFlavor TOINSTANCE
Definition: CIMFlavor.h:160