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

  1 mike  1.11 //%/////////////////////////////////////////////////////////////////////////////
  2            //
  3 kumpf 1.21 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
  4            // The Open Group, Tivoli Systems
  5 mike  1.11 //
  6            // Permission is hereby granted, free of charge, to any person obtaining a copy
  7 kumpf 1.21 // 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.11 // 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.21 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 14 mike  1.11 // 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.21 // 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.11 // 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 kumpf 1.24 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
 27            //                (carolann_graves@hp.com)
 28 mike  1.11 //
 29            //%/////////////////////////////////////////////////////////////////////////////
 30            
 31            #ifndef Pegasus_QualifierRep_h
 32            #define Pegasus_QualifierRep_h
 33            
 34            #include <Pegasus/Common/Config.h>
 35 kumpf 1.23 #include <Pegasus/Common/Linkage.h>
 36            #include <Pegasus/Common/CIMName.h>
 37 mike  1.11 #include <Pegasus/Common/CIMValue.h>
 38            #include <Pegasus/Common/Sharable.h>
 39            #include <Pegasus/Common/Array.h>
 40            #include <Pegasus/Common/Pair.h>
 41 kumpf 1.26 #include <Pegasus/Common/InternalException.h>
 42 mike  1.11 #include <Pegasus/Common/CIMFlavor.h>
 43            
 44            PEGASUS_NAMESPACE_BEGIN
 45            
 46            class CIMConstQualifier;
 47            class CIMQualifier;
 48            
 49            class PEGASUS_COMMON_LINKAGE CIMQualifierRep : public Sharable
 50            {
 51            public:
 52            
 53                CIMQualifierRep(
 54 kumpf 1.23 	const CIMName& name, 
 55 mike  1.11 	const CIMValue& value, 
 56 kumpf 1.24 	const CIMFlavor & flavor,
 57 mike  1.11 	Boolean propagated);
 58            
 59                virtual ~CIMQualifierRep();
 60            
 61 kumpf 1.23     const CIMName& getName() const 
 62 mike  1.11     { 
 63            	return _name; 
 64                }
 65            
 66 kumpf 1.23     void setName(const CIMName& name);
 67 mike  1.11 
 68                CIMType getType() const 
 69                { 
 70            	return _value.getType(); 
 71                }
 72            
 73                Boolean isArray() const 
 74                {
 75            	return _value.isArray();
 76                }
 77            
 78                const CIMValue& getValue() const 
 79                { 
 80            	return _value; 
 81                }
 82            
 83                void setValue(const CIMValue& value);
 84            
 85 kumpf 1.24     const CIMFlavor & getFlavor() const 
 86 mike  1.11     {
 87            	return _flavor; 
 88                }
 89            
 90 kumpf 1.24     void setFlavor(const CIMFlavor & flavor) 
 91 karl  1.14     {
 92 kumpf 1.24 	_flavor = flavor; 
 93 karl  1.14     }
 94 karl  1.15 
 95 kumpf 1.25     void unsetFlavor(const CIMFlavor & flavor) 
 96 karl  1.15     {
 97 kumpf 1.24         _flavor.removeFlavor (flavor);
 98 karl  1.15     }
 99            
100 kumpf 1.24     void resolveFlavor (const CIMFlavor & inheritedFlavor, Boolean inherited);
101 karl  1.14 
102 mike  1.11     Boolean getPropagated() const 
103                { 
104            	return _propagated; 
105                }
106            
107                void setPropagated(Boolean propagated) 
108                {
109            	_propagated = propagated; 
110                }
111            
112                void toXml(Array<Sint8>& out) const;
113            
114 mike  1.12     void toMof(Array<Sint8>& out) const;
115            
116 mike  1.11     Boolean identical(const CIMQualifierRep* x) const;
117            
118                CIMQualifierRep* clone() const
119                {
120            	return new CIMQualifierRep(*this);
121                }
122            
123            private:
124            
125                CIMQualifierRep();
126            
127                // Cloning constructor:
128            
129                CIMQualifierRep(const CIMQualifierRep& x);
130            
131 kumpf 1.16     // This method is declared and made private so that the compiler does
132                // not implicitly define a default copy constructor.
133                CIMQualifierRep& operator=(const CIMQualifierRep& x)
134                {
135 kumpf 1.20         //PEGASUS_ASSERT(0);
136 kumpf 1.16         return *this;
137                }
138 mike  1.11 
139 kumpf 1.23     CIMName _name;
140 mike  1.11     CIMValue _value;
141 kumpf 1.24     CIMFlavor _flavor;
142 mike  1.11     Boolean _propagated;
143            };
144            
145            PEGASUS_NAMESPACE_END
146            
147            #endif /* Pegasus_QualifierRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2