Actual source code: object.h

  1: #ifndef __PETSc_Object_h__

 4:  #include petsc.h
  5: #if defined(PETSC_HAVE_STDLIB_H)
  6: #include <stdlib.h>
  7: #endif

  9: // #include "esi/ESI.h"
 10: #define ESI_NO_COMPLEX
 11: #include "esi/basicTypes.h"
 12: #include "esi/ordinalTraits.h"
 13: #include "esi/scalarTraits.h"
 14: #include "esi/Argv.h"
 15: #include "esi/Object.h"
 16: #include "esi/MPI_traits.h"

 18: namespace esi{namespace petsc{

 20: /**=========================================================================**/
 21: class Object : public virtual esi::Object
 22: {
 23:   public:

 25:     // Constructor.
 26:     Object()               {comm = 0; refcnt = 1;};

 28:     // Destructor.
 29:     virtual ~Object(void) {};


 32:     //  Interface for esi::Object  ---------------

 34:     virtual esi::ErrorCode setRunTimeModel(const char * name,void * comm);
 35:     virtual esi::ErrorCode getRunTimeModel(const char * name,void * & comm);
 36:     virtual esi::ErrorCode getRunTimeModelsSupported(esi::Argv * list);

 38:     virtual esi::ErrorCode getInterface(const char* name, void*& iface);
 39:     virtual esi::ErrorCode getInterfacesSupported(esi::Argv * list);

 41:     virtual esi::ErrorCode addReference() ;
 42:     virtual esi::ErrorCode deleteReference() ;


 45:   protected:
 46:     MPI_Comm    comm;
 47:     int         refcnt;
 48: };

 50: }}


 53: #endif