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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2