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

  1 karl  1.26 //%2005////////////////////////////////////////////////////////////////////////
  2 mike  1.1  //
  3 karl  1.23 // 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.21 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.23 // 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.26 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 mike  1.1  //
 12            // Permission is hereby granted, free of charge, to any person obtaining a copy
 13 chip  1.2  // 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.1  // 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 kumpf 1.16 // 
 19 chip  1.2  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 20 mike  1.1  // 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 chip  1.2  // 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.1  // 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.15 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
 33            //                  (carolann_graves@hp.com)
 34 schuur 1.22 //              Adriann Schuur (schuur@de.ibm.com) PEP 164
 35 dave.sudlik 1.24 //              Dave Sudlik, IBM (dsudlik@us.ibm.com)
 36 david.dillard 1.25 //              David Dillard, VERITAS Software Corp.
 37                    //                  (david.dillard@veritas.com)
 38 mike          1.1  //
 39                    //%/////////////////////////////////////////////////////////////////////////////
 40                    
 41                    #ifndef Pegasus_CIMObjectRep_h
 42                    #define Pegasus_CIMObjectRep_h
 43                    
 44                    #include <Pegasus/Common/Config.h>
 45 kumpf         1.19 #include <Pegasus/Common/Linkage.h>
 46 mike          1.1  #include <Pegasus/Common/String.h>
 47 kumpf         1.10 #include <Pegasus/Common/Sharable.h>
 48 kumpf         1.19 #include <Pegasus/Common/CIMName.h>
 49 mike          1.1  #include <Pegasus/Common/CIMProperty.h>
 50                    #include <Pegasus/Common/CIMQualifier.h>
 51 kumpf         1.8  #include <Pegasus/Common/CIMQualifierList.h>
 52 mike          1.1  #include <Pegasus/Common/Array.h>
 53                    
 54                    PEGASUS_NAMESPACE_BEGIN
 55                    
 56                    /** This class defines the internal representation of the CIMObject class.
 57                    
 58                        This base class has two implementations: CIMClassRep CIMInstanceRep. The
 59                        CIMObjectRep pointer member of CIMObject points to one of these.
 60                    
 61                        This class contains what is common to CIMClass and CIMInstance.
 62                    */
 63                    class PEGASUS_COMMON_LINKAGE CIMObjectRep : public Sharable
 64                    {
 65                    public:
 66                    
 67 kumpf         1.12     CIMObjectRep(const CIMObjectPath& className);
 68 mike          1.1  
 69                        virtual ~CIMObjectRep();
 70                    
 71 kumpf         1.19     const CIMName& getClassName() const
 72 chip          1.2      {
 73 chip          1.4  	return _reference.getClassName();
 74                        }
 75                    
 76 kumpf         1.12     const CIMObjectPath& getPath() const
 77 chip          1.4      {
 78                    	return _reference;
 79 mike          1.1      }
 80 kumpf         1.15 
 81                        /**
 82                          Sets the object path for the object
 83                          @param  path  CIMObjectPath containing the object path
 84                         */
 85                        void setPath (const CIMObjectPath & path);
 86 mike          1.1  
 87                        void addQualifier(const CIMQualifier& qualifier)
 88                        {
 89                    	_qualifiers.add(qualifier);
 90                        }
 91                    
 92 kumpf         1.19     Uint32 findQualifier(const CIMName& name) const
 93 mike          1.1      {
 94                    	return _qualifiers.find(name);
 95                        }
 96                    
 97 kumpf         1.20     CIMQualifier getQualifier(Uint32 index)
 98 mike          1.1      {
 99 kumpf         1.20 	return _qualifiers.getQualifier(index);
100 mike          1.1      }
101                    
102 kumpf         1.20     CIMConstQualifier getQualifier(Uint32 index) const
103 mike          1.1      {
104 kumpf         1.20 	return _qualifiers.getQualifier(index);
105 mike          1.1      }
106                    
107 kumpf         1.19     Boolean isTrueQualifer(CIMName& name) const
108 karl          1.5      {
109                    	return _qualifiers.isTrue(name);
110                        }
111                    
112 mike          1.1      Uint32 getQualifierCount() const
113                        {
114                    	return _qualifiers.getCount();
115                        }
116                    
117 kumpf         1.20     void removeQualifier(Uint32 index)
118 mike          1.1      {
119 kumpf         1.20 	_qualifiers.removeQualifier(index);
120 mike          1.1      }
121                    
122                        virtual void addProperty(const CIMProperty& x);
123                    
124 kumpf         1.19     Uint32 findProperty(const CIMName& name) const;
125 mike          1.1  
126 kumpf         1.20     CIMProperty getProperty(Uint32 index);
127 mike          1.1  
128 kumpf         1.20     CIMConstProperty getProperty(Uint32 index) const
129 mike          1.1      {
130 kumpf         1.20 	return ((CIMObjectRep*)this)->getProperty(index);
131 mike          1.1      }
132                    
133 kumpf         1.20     void removeProperty(Uint32 index);
134 mike          1.1  
135                        Uint32 getPropertyCount() const;
136                    
137                        virtual Boolean identical(const CIMObjectRep* x) const;
138                    
139 mike          1.26.10.1     virtual void toXml(Buffer& out) const = 0;
140 mike          1.1       
141 mike          1.26.10.1     virtual void toMof(Buffer& out) const = 0;
142 dave.sudlik   1.24      
143 mike          1.1           virtual CIMObjectRep* clone() const = 0;
144                         
145                         protected:
146                         
147                             CIMObjectRep();
148                         
149                             CIMObjectRep(const CIMObjectRep& x);
150                         
151 kumpf         1.12          CIMObjectPath _reference;
152 kumpf         1.9           CIMQualifierList _qualifiers;
153                             Array<CIMProperty> _properties;
154                             Boolean _resolved;
155                         
156                         private:
157                         
158                             // This method is declared and made private so that the compiler does
159                             // not implicitly define a default copy constructor.
160 mike          1.1           CIMObjectRep& operator=(const CIMObjectRep& x)
161                             {
162 kumpf         1.14      	//PEGASUS_ASSERT(0);
163 mike          1.1       	return *this;
164                             }
165                         
166                             friend class CIMObject;
167 schuur        1.22          friend class BinaryStreamer;
168 mike          1.1       };
169                         
170                         PEGASUS_NAMESPACE_END
171                         
172                         #endif /* Pegasus_CIMObjectRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2