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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2