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

  1 mike  1.11 //%/////////////////////////////////////////////////////////////////////////////
  2            //
  3            // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM
  4            //
  5            // Permission is hereby granted, free of charge, to any person obtaining a copy
  6            // of this software and associated documentation files (the "Software"), to 
  7            // deal in the Software without restriction, including without limitation the 
  8            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 
  9            // sell copies of the Software, and to permit persons to whom the Software is
 10            // furnished to do so, subject to the following conditions:
 11            // 
 12            // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN 
 13            // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 14            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 15            // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
 16            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 17            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
 18            // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 19            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 20            //
 21            //==============================================================================
 22 mike  1.11 //
 23            // Author: Mike Brasher (mbrasher@bmc.com)
 24            //
 25            // Modified By:
 26            //
 27            //%/////////////////////////////////////////////////////////////////////////////
 28            
 29            #ifndef Pegasus_QualifierRep_h
 30            #define Pegasus_QualifierRep_h
 31            
 32            #include <Pegasus/Common/Config.h>
 33            #include <Pegasus/Common/String.h>
 34            #include <Pegasus/Common/CIMValue.h>
 35            #include <Pegasus/Common/Sharable.h>
 36            #include <Pegasus/Common/Array.h>
 37            #include <Pegasus/Common/Pair.h>
 38            #include <Pegasus/Common/Sharable.h>
 39            #include <Pegasus/Common/Exception.h>
 40            #include <Pegasus/Common/CIMFlavor.h>
 41            
 42            PEGASUS_NAMESPACE_BEGIN
 43 mike  1.11 
 44            class CIMConstQualifier;
 45            class CIMQualifier;
 46            
 47            class PEGASUS_COMMON_LINKAGE CIMQualifierRep : public Sharable
 48            {
 49            public:
 50            
 51                CIMQualifierRep(
 52            	const String& name, 
 53            	const CIMValue& value, 
 54            	Uint32 flavor,
 55            	Boolean propagated);
 56            
 57                virtual ~CIMQualifierRep();
 58            
 59                const String& getName() const 
 60                { 
 61            	return _name; 
 62                }
 63            
 64 mike  1.11     void setName(const String& name);
 65            
 66                CIMType getType() const 
 67                { 
 68            	return _value.getType(); 
 69                }
 70            
 71                Boolean isArray() const 
 72                {
 73            	return _value.isArray();
 74                }
 75            
 76                const CIMValue& getValue() const 
 77                { 
 78            	return _value; 
 79                }
 80            
 81                void setValue(const CIMValue& value);
 82            
 83                Uint32 getFlavor() const 
 84                {
 85 mike  1.11 	return _flavor; 
 86                }
 87            
 88 karl  1.15 	Boolean isFlavor(Uint32 flavor) const
 89            	{
 90            		return ((getFlavor() & flavor) !=0);
 91            	}
 92            
 93 karl  1.14     void setFlavor(Uint32 flavor) 
 94                {
 95 karl  1.15 	_flavor = _flavor | flavor; 
 96 karl  1.14     }
 97 karl  1.15 
 98                void unsetFlavor(Uint32 flavor) 
 99                {
100            	_flavor = _flavor & (~flavor); 
101                }
102            
103            	void resolveFlavor(Uint32 inheritedFlavor, Boolean inherited);
104 karl  1.14 
105 mike  1.11     Boolean getPropagated() const 
106                { 
107            	return _propagated; 
108                }
109            
110                void setPropagated(Boolean propagated) 
111                {
112            	_propagated = propagated; 
113                }
114            
115                void toXml(Array<Sint8>& out) const;
116            
117                void print(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const;
118            
119 mike  1.12     void toMof(Array<Sint8>& out) const;
120            
121 karl  1.13     void printMof(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const;
122            
123 mike  1.11     Boolean identical(const CIMQualifierRep* x) const;
124            
125                CIMQualifierRep* clone() const
126                {
127            	return new CIMQualifierRep(*this);
128                }
129            
130            private:
131            
132                CIMQualifierRep();
133            
134                // Cloning constructor:
135            
136                CIMQualifierRep(const CIMQualifierRep& x);
137            
138 kumpf 1.16     // This method is declared and made private so that the compiler does
139                // not implicitly define a default copy constructor.
140                CIMQualifierRep& operator=(const CIMQualifierRep& x)
141                {
142                    PEGASUS_ASSERT(0);
143                    return *this;
144                }
145 mike  1.11 
146                String _name;
147                CIMValue _value;
148                Uint32 _flavor;
149                Boolean _propagated;
150            };
151            
152            PEGASUS_NAMESPACE_END
153            
154            #endif /* Pegasus_QualifierRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2