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

  1 mike  1.14 //%/////////////////////////////////////////////////////////////////////////////
  2            //
  3 kumpf 1.20 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
  4            // The Open Group, Tivoli Systems
  5 mike  1.14 //
  6            // Permission is hereby granted, free of charge, to any person obtaining a copy
  7 kumpf 1.20 // 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.14 // 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.20 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 14 mike  1.14 // 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.20 // 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.14 // 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.21 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
 27            //                (carolann_graves@hp.com)
 28 mike  1.14 //
 29            //%/////////////////////////////////////////////////////////////////////////////
 30            
 31            #ifndef Pegasus_PropertyRep_h
 32            #define Pegasus_PropertyRep_h
 33            
 34            #include <Pegasus/Common/Config.h>
 35            #include <Pegasus/Common/Exception.h>
 36            #include <Pegasus/Common/String.h>
 37            #include <Pegasus/Common/CIMValue.h>
 38            #include <Pegasus/Common/CIMQualifier.h>
 39            #include <Pegasus/Common/CIMQualifierList.h>
 40            #include <Pegasus/Common/Sharable.h>
 41 kumpf 1.22 #include <Pegasus/Common/Linkage.h>
 42 mike  1.14 
 43            PEGASUS_NAMESPACE_BEGIN
 44            
 45            class CIMClassRep;
 46            class CIMProperty;
 47            class CIMConstProperty;
 48            class DeclContext;
 49            
 50            class PEGASUS_COMMON_LINKAGE CIMPropertyRep : public Sharable
 51            {
 52            public:
 53            
 54                CIMPropertyRep(
 55            	const String& name,
 56            	const CIMValue& value,
 57            	Uint32 arraySize,
 58            	const String& referenceClassName,
 59            	const String& classOrigin,
 60            	Boolean propagated);
 61            
 62                ~CIMPropertyRep();
 63 mike  1.14 
 64                const String& getName() const
 65                {
 66            	return _name;
 67                }
 68            
 69                void setName(const String& name);
 70            
 71                const CIMValue& getValue() const
 72                {
 73            	return _value;
 74                }
 75            
 76                void setValue(const CIMValue& value);
 77            
 78                Uint32 getArraySize() const
 79                {
 80            	return _arraySize;
 81                }
 82            
 83                const String& getReferenceClassName() const
 84 mike  1.14     {
 85            	return _referenceClassName;
 86                }
 87            
 88                const String& getClassOrigin() const
 89                {
 90            	return _classOrigin;
 91                }
 92            
 93                void setClassOrigin(const String& classOrigin);
 94            
 95                Boolean getPropagated() const
 96                {
 97            	return _propagated;
 98                }
 99            
100                void setPropagated(Boolean propagated)
101                {
102            	_propagated = propagated;
103                }
104            
105 mike  1.14     void addQualifier(const CIMQualifier& qualifier)
106                {
107            	_qualifiers.add(qualifier);
108                }
109            
110                Uint32 findQualifier(const String& name) const
111                {
112            	return _qualifiers.find(name);
113                }
114            
115                CIMQualifier getQualifier(Uint32 pos)
116                {
117            	return _qualifiers.getQualifier(pos);
118                }
119            
120                CIMConstQualifier getQualifier(Uint32 pos) const
121                {
122            	return _qualifiers.getQualifier(pos);
123                }
124            
125                void removeQualifier(Uint32 pos)
126 mike  1.14     {
127            	_qualifiers.removeQualifier(pos);
128                }
129            
130                Uint32 getQualifierCount() const
131                {
132            	return _qualifiers.getCount();
133                }
134            
135                void resolve(
136            	DeclContext* declContext,
137            	const String& nameSpace,
138            	Boolean isInstancePart,
139 mike  1.16 	const CIMConstProperty& property,
140            	Boolean propagateQualifiers);
141 mike  1.14 
142                void resolve(
143            	DeclContext* declContext,
144            	const String& nameSpace,
145 mike  1.16 	Boolean isInstancePart,
146            	Boolean propagateQualifiers);
147 mike  1.14 
148                void toXml(Array<Sint8>& out) const;
149            
150 mike  1.15     void toMof(Array<Sint8>& out) const;
151            
152 mike  1.14     Boolean identical(const CIMPropertyRep* x) const;
153            
154                Boolean isKey() const;
155            
156 mike  1.16     CIMPropertyRep* clone(Boolean propagateQualifiers) const
157 mike  1.14     {
158 mike  1.16 	return new CIMPropertyRep(*this, propagateQualifiers);
159 mike  1.14     }
160            
161            private:
162            
163                CIMPropertyRep();
164            
165                // Cloning constructor:
166            
167 mike  1.16     CIMPropertyRep(const CIMPropertyRep& x, Boolean propagateQualifiers);
168 mike  1.14 
169 kumpf 1.17     // This method is declared and made private so that the compiler does
170                // not implicitly define a default copy constructor.
171                CIMPropertyRep& operator=(const CIMPropertyRep& x)
172                {
173 kumpf 1.19         //PEGASUS_ASSERT(0);
174 kumpf 1.17         return *this;
175                }
176 mike  1.14 
177                String _name;
178                CIMValue _value;
179                Uint32 _arraySize;
180                String _referenceClassName;
181                String _classOrigin;
182                Boolean _propagated;
183                CIMQualifierList _qualifiers;
184            
185                friend class CIMClassRep;
186            };
187            
188            PEGASUS_NAMESPACE_END
189            
190            #endif /* Pegasus_PropertyRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2