(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 kumpf 1.23 #include <Pegasus/Common/CIMName.h>
 38 mike  1.14 #include <Pegasus/Common/CIMValue.h>
 39            #include <Pegasus/Common/CIMQualifier.h>
 40            #include <Pegasus/Common/CIMQualifierList.h>
 41            #include <Pegasus/Common/Sharable.h>
 42 kumpf 1.22 #include <Pegasus/Common/Linkage.h>
 43 mike  1.14 
 44            PEGASUS_NAMESPACE_BEGIN
 45            
 46            class CIMClassRep;
 47            class CIMProperty;
 48            class CIMConstProperty;
 49            class DeclContext;
 50            
 51            class PEGASUS_COMMON_LINKAGE CIMPropertyRep : public Sharable
 52            {
 53            public:
 54            
 55                CIMPropertyRep(
 56 kumpf 1.23 	const CIMName& name,
 57 mike  1.14 	const CIMValue& value,
 58            	Uint32 arraySize,
 59 kumpf 1.23 	const CIMName& referenceClassName,
 60            	const CIMName& classOrigin,
 61 mike  1.14 	Boolean propagated);
 62            
 63                ~CIMPropertyRep();
 64            
 65 kumpf 1.23     const CIMName& getName() const
 66 mike  1.14     {
 67            	return _name;
 68                }
 69            
 70 kumpf 1.23     void setName(const CIMName& name);
 71 mike  1.14 
 72                const CIMValue& getValue() const
 73                {
 74            	return _value;
 75                }
 76            
 77                void setValue(const CIMValue& value);
 78            
 79                Uint32 getArraySize() const
 80                {
 81            	return _arraySize;
 82                }
 83            
 84 kumpf 1.23     const CIMName& getReferenceClassName() const
 85 mike  1.14     {
 86            	return _referenceClassName;
 87                }
 88            
 89 kumpf 1.23     const CIMName& getClassOrigin() const
 90 mike  1.14     {
 91            	return _classOrigin;
 92                }
 93            
 94 kumpf 1.23     void setClassOrigin(const CIMName& classOrigin);
 95 mike  1.14 
 96                Boolean getPropagated() const
 97                {
 98            	return _propagated;
 99                }
100            
101                void setPropagated(Boolean propagated)
102                {
103            	_propagated = propagated;
104                }
105            
106                void addQualifier(const CIMQualifier& qualifier)
107                {
108            	_qualifiers.add(qualifier);
109                }
110            
111 kumpf 1.23     Uint32 findQualifier(const CIMName& name) const
112 mike  1.14     {
113            	return _qualifiers.find(name);
114                }
115            
116                CIMQualifier getQualifier(Uint32 pos)
117                {
118            	return _qualifiers.getQualifier(pos);
119                }
120            
121                CIMConstQualifier getQualifier(Uint32 pos) const
122                {
123            	return _qualifiers.getQualifier(pos);
124                }
125            
126                void removeQualifier(Uint32 pos)
127                {
128            	_qualifiers.removeQualifier(pos);
129                }
130            
131                Uint32 getQualifierCount() const
132                {
133 mike  1.14 	return _qualifiers.getCount();
134                }
135            
136                void resolve(
137            	DeclContext* declContext,
138 kumpf 1.23 	const CIMNamespaceName& nameSpace,
139 mike  1.14 	Boolean isInstancePart,
140 mike  1.16 	const CIMConstProperty& property,
141            	Boolean propagateQualifiers);
142 mike  1.14 
143                void resolve(
144            	DeclContext* declContext,
145 kumpf 1.23 	const CIMNamespaceName& nameSpace,
146 mike  1.16 	Boolean isInstancePart,
147            	Boolean propagateQualifiers);
148 mike  1.14 
149                void toXml(Array<Sint8>& out) const;
150            
151 mike  1.15     void toMof(Array<Sint8>& out) const;
152            
153 mike  1.14     Boolean identical(const CIMPropertyRep* x) const;
154            
155 kumpf 1.24     CIMPropertyRep* clone() const
156 mike  1.14     {
157 kumpf 1.24 	return new CIMPropertyRep(*this, true);
158 mike  1.14     }
159            
160            private:
161            
162                CIMPropertyRep();
163            
164                // Cloning constructor:
165            
166 mike  1.16     CIMPropertyRep(const CIMPropertyRep& x, Boolean propagateQualifiers);
167 mike  1.14 
168 kumpf 1.17     // This method is declared and made private so that the compiler does
169                // not implicitly define a default copy constructor.
170                CIMPropertyRep& operator=(const CIMPropertyRep& x)
171                {
172 kumpf 1.19         //PEGASUS_ASSERT(0);
173 kumpf 1.17         return *this;
174                }
175 mike  1.14 
176 kumpf 1.23     CIMName _name;
177 mike  1.14     CIMValue _value;
178                Uint32 _arraySize;
179 kumpf 1.23     CIMName _referenceClassName;
180                CIMName _classOrigin;
181 mike  1.14     Boolean _propagated;
182                CIMQualifierList _qualifiers;
183            
184                friend class CIMClassRep;
185            };
186            
187            PEGASUS_NAMESPACE_END
188            
189            #endif /* Pegasus_PropertyRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2