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

  1 karl  1.28 //%2004////////////////////////////////////////////////////////////////////////
  2 mike  1.14 //
  3 karl  1.28 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4            // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5            // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6 karl  1.27 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.28 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8            // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 mike  1.14 //
 10            // Permission is hereby granted, free of charge, to any person obtaining a copy
 11 kumpf 1.20 // of this software and associated documentation files (the "Software"), to
 12            // deal in the Software without restriction, including without limitation the
 13            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 14 mike  1.14 // sell copies of the Software, and to permit persons to whom the Software is
 15            // furnished to do so, subject to the following conditions:
 16            // 
 17 kumpf 1.20 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 18 mike  1.14 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 19            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 20 kumpf 1.20 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 21            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 22            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 23 mike  1.14 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 24            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 25            //
 26            //==============================================================================
 27            //
 28            // Author: Mike Brasher (mbrasher@bmc.com)
 29            //
 30 kumpf 1.21 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
 31            //                (carolann_graves@hp.com)
 32 mike  1.14 //
 33            //%/////////////////////////////////////////////////////////////////////////////
 34            
 35            #ifndef Pegasus_PropertyRep_h
 36            #define Pegasus_PropertyRep_h
 37            
 38            #include <Pegasus/Common/Config.h>
 39 kumpf 1.25 #include <Pegasus/Common/InternalException.h>
 40 mike  1.14 #include <Pegasus/Common/String.h>
 41 kumpf 1.23 #include <Pegasus/Common/CIMName.h>
 42 mike  1.14 #include <Pegasus/Common/CIMValue.h>
 43            #include <Pegasus/Common/CIMQualifier.h>
 44            #include <Pegasus/Common/CIMQualifierList.h>
 45            #include <Pegasus/Common/Sharable.h>
 46 kumpf 1.22 #include <Pegasus/Common/Linkage.h>
 47 mike  1.14 
 48            PEGASUS_NAMESPACE_BEGIN
 49            
 50            class CIMClassRep;
 51            class CIMProperty;
 52            class CIMConstProperty;
 53            class DeclContext;
 54            
 55            class PEGASUS_COMMON_LINKAGE CIMPropertyRep : public Sharable
 56            {
 57            public:
 58            
 59                CIMPropertyRep(
 60 kumpf 1.23 	const CIMName& name,
 61 mike  1.14 	const CIMValue& value,
 62            	Uint32 arraySize,
 63 kumpf 1.23 	const CIMName& referenceClassName,
 64            	const CIMName& classOrigin,
 65 mike  1.14 	Boolean propagated);
 66            
 67                ~CIMPropertyRep();
 68            
 69 kumpf 1.23     const CIMName& getName() const
 70 mike  1.14     {
 71            	return _name;
 72                }
 73            
 74 kumpf 1.23     void setName(const CIMName& name);
 75 mike  1.14 
 76                const CIMValue& getValue() const
 77                {
 78            	return _value;
 79                }
 80            
 81                void setValue(const CIMValue& value);
 82            
 83                Uint32 getArraySize() const
 84                {
 85            	return _arraySize;
 86                }
 87            
 88 kumpf 1.23     const CIMName& getReferenceClassName() const
 89 mike  1.14     {
 90            	return _referenceClassName;
 91                }
 92            
 93 kumpf 1.23     const CIMName& getClassOrigin() const
 94 mike  1.14     {
 95            	return _classOrigin;
 96                }
 97            
 98 kumpf 1.23     void setClassOrigin(const CIMName& classOrigin);
 99 mike  1.14 
100                Boolean getPropagated() const
101                {
102            	return _propagated;
103                }
104            
105                void setPropagated(Boolean propagated)
106                {
107            	_propagated = propagated;
108                }
109            
110                void addQualifier(const CIMQualifier& qualifier)
111                {
112            	_qualifiers.add(qualifier);
113                }
114            
115 kumpf 1.23     Uint32 findQualifier(const CIMName& name) const
116 mike  1.14     {
117            	return _qualifiers.find(name);
118                }
119            
120 kumpf 1.26     CIMQualifier getQualifier(Uint32 index)
121 mike  1.14     {
122 kumpf 1.26 	return _qualifiers.getQualifier(index);
123 mike  1.14     }
124            
125 kumpf 1.26     CIMConstQualifier getQualifier(Uint32 index) const
126 mike  1.14     {
127 kumpf 1.26 	return _qualifiers.getQualifier(index);
128 mike  1.14     }
129            
130 kumpf 1.26     void removeQualifier(Uint32 index)
131 mike  1.14     {
132 kumpf 1.26 	_qualifiers.removeQualifier(index);
133 mike  1.14     }
134            
135                Uint32 getQualifierCount() const
136                {
137            	return _qualifiers.getCount();
138                }
139            
140                void resolve(
141            	DeclContext* declContext,
142 kumpf 1.23 	const CIMNamespaceName& nameSpace,
143 mike  1.14 	Boolean isInstancePart,
144 mike  1.16 	const CIMConstProperty& property,
145            	Boolean propagateQualifiers);
146 mike  1.14 
147                void resolve(
148            	DeclContext* declContext,
149 kumpf 1.23 	const CIMNamespaceName& nameSpace,
150 mike  1.16 	Boolean isInstancePart,
151            	Boolean propagateQualifiers);
152 mike  1.14 
153                void toXml(Array<Sint8>& out) const;
154            
155 mike  1.15     void toMof(Array<Sint8>& out) const;
156            
157 mike  1.14     Boolean identical(const CIMPropertyRep* x) const;
158            
159 kumpf 1.24     CIMPropertyRep* clone() const
160 mike  1.14     {
161 kumpf 1.24 	return new CIMPropertyRep(*this, true);
162 mike  1.14     }
163            
164            private:
165            
166                CIMPropertyRep();
167            
168                // Cloning constructor:
169            
170 mike  1.16     CIMPropertyRep(const CIMPropertyRep& x, Boolean propagateQualifiers);
171 mike  1.14 
172 kumpf 1.17     // This method is declared and made private so that the compiler does
173                // not implicitly define a default copy constructor.
174                CIMPropertyRep& operator=(const CIMPropertyRep& x)
175                {
176 kumpf 1.19         //PEGASUS_ASSERT(0);
177 kumpf 1.17         return *this;
178                }
179 mike  1.14 
180 kumpf 1.23     CIMName _name;
181 mike  1.14     CIMValue _value;
182                Uint32 _arraySize;
183 kumpf 1.23     CIMName _referenceClassName;
184                CIMName _classOrigin;
185 mike  1.14     Boolean _propagated;
186                CIMQualifierList _qualifiers;
187            
188                friend class CIMClassRep;
189            };
190            
191            PEGASUS_NAMESPACE_END
192            
193            #endif /* Pegasus_PropertyRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2