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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2