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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2