// This file is generated by omniidl (C++ backend)- omniORB_4_1. Do not edit.
#ifndef __SALOME__MPIObject_hh__
#define __SALOME__MPIObject_hh__

#ifndef __CORBA_H_EXTERNAL_GUARD__
#include <omniORB4/CORBA.h>
#endif

#ifndef  USE_stub_in_nt_dll
# define USE_stub_in_nt_dll_NOT_DEFINED_SALOME__MPIObject
#endif
#ifndef  USE_core_stub_in_nt_dll
# define USE_core_stub_in_nt_dll_NOT_DEFINED_SALOME__MPIObject
#endif
#ifndef  USE_dyn_stub_in_nt_dll
# define USE_dyn_stub_in_nt_dll_NOT_DEFINED_SALOME__MPIObject
#endif






#ifdef USE_stub_in_nt_dll
# ifndef USE_core_stub_in_nt_dll
#  define USE_core_stub_in_nt_dll
# endif
# ifndef USE_dyn_stub_in_nt_dll
#  define USE_dyn_stub_in_nt_dll
# endif
#endif

#ifdef _core_attr
# error "A local CPP macro _core_attr has already been defined."
#else
# ifdef  USE_core_stub_in_nt_dll
#  define _core_attr _OMNIORB_NTDLL_IMPORT
# else
#  define _core_attr
# endif
#endif

#ifdef _dyn_attr
# error "A local CPP macro _dyn_attr has already been defined."
#else
# ifdef  USE_dyn_stub_in_nt_dll
#  define _dyn_attr _OMNIORB_NTDLL_IMPORT
# else
#  define _dyn_attr
# endif
#endif





_CORBA_MODULE Engines

_CORBA_MODULE_BEG

  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_IORTab;

  class IORTab_var;

  class IORTab : public _CORBA_Unbounded_Sequence_ObjRef< ::CORBA::Object, ::CORBA::Object_Element, ::CORBA::Object_Helper >  {
  public:
    typedef IORTab_var _var_type;
    inline IORTab() {}
    inline IORTab(const IORTab& _s)
      : _CORBA_Unbounded_Sequence_ObjRef< ::CORBA::Object, ::CORBA::Object_Element, ::CORBA::Object_Helper > (_s) {}

    inline IORTab(_CORBA_ULong _max)
      : _CORBA_Unbounded_Sequence_ObjRef< ::CORBA::Object, ::CORBA::Object_Element, ::CORBA::Object_Helper > (_max) {}
    inline IORTab(_CORBA_ULong _max, _CORBA_ULong _len, ::CORBA::Object_ptr* _val, _CORBA_Boolean _rel=0)
      : _CORBA_Unbounded_Sequence_ObjRef< ::CORBA::Object, ::CORBA::Object_Element, ::CORBA::Object_Helper > (_max, _len, _val, _rel) {}

  

    inline IORTab& operator = (const IORTab& _s) {
      _CORBA_Unbounded_Sequence_ObjRef< ::CORBA::Object, ::CORBA::Object_Element, ::CORBA::Object_Helper > ::operator=(_s);
      return *this;
    }
  };

  class IORTab_out;

  class IORTab_var {
  public:
    inline IORTab_var() : _pd_seq(0) {}
    inline IORTab_var(IORTab* _s) : _pd_seq(_s) {}
    inline IORTab_var(const IORTab_var& _s) {
      if( _s._pd_seq )  _pd_seq = new IORTab(*_s._pd_seq);
      else              _pd_seq = 0;
    }
    inline ~IORTab_var() { if( _pd_seq )  delete _pd_seq; }
      
    inline IORTab_var& operator = (IORTab* _s) {
      if( _pd_seq )  delete _pd_seq;
      _pd_seq = _s;
      return *this;
    }
    inline IORTab_var& operator = (const IORTab_var& _s) {
      if( _s._pd_seq ) {
        if( !_pd_seq )  _pd_seq = new IORTab;
        *_pd_seq = *_s._pd_seq;
      } else if( _pd_seq ) {
        delete _pd_seq;
        _pd_seq = 0;
      }
      return *this;
    }
    inline ::CORBA::Object_Element operator [] (_CORBA_ULong _s) {
      return (*_pd_seq)[_s];
    }

  

    inline IORTab* operator -> () { return _pd_seq; }
    inline const IORTab* operator -> () const { return _pd_seq; }
#if defined(__GNUG__)
    inline operator IORTab& () const { return *_pd_seq; }
#else
    inline operator const IORTab& () const { return *_pd_seq; }
    inline operator IORTab& () { return *_pd_seq; }
#endif
      
    inline const IORTab& in() const { return *_pd_seq; }
    inline IORTab&       inout()    { return *_pd_seq; }
    inline IORTab*&      out() {
      if( _pd_seq ) { delete _pd_seq; _pd_seq = 0; }
      return _pd_seq;
    }
    inline IORTab* _retn() { IORTab* tmp = _pd_seq; _pd_seq = 0; return tmp; }
      
    friend class IORTab_out;
    
  private:
    IORTab* _pd_seq;
  };

  class IORTab_out {
  public:
    inline IORTab_out(IORTab*& _s) : _data(_s) { _data = 0; }
    inline IORTab_out(IORTab_var& _s)
      : _data(_s._pd_seq) { _s = (IORTab*) 0; }
    inline IORTab_out(const IORTab_out& _s) : _data(_s._data) {}
    inline IORTab_out& operator = (const IORTab_out& _s) {
      _data = _s._data;
      return *this;
    }
    inline IORTab_out& operator = (IORTab* _s) {
      _data = _s;
      return *this;
    }
    inline operator IORTab*&()  { return _data; }
    inline IORTab*& ptr()       { return _data; }
    inline IORTab* operator->() { return _data; }

    inline ::CORBA::Object_Element operator [] (_CORBA_ULong _i) {
      return (*_data)[_i];
    }

  

    IORTab*& _data;

  private:
    IORTab_out();
    IORTab_out& operator=(const IORTab_var&);
  };

#ifndef __Engines_mMPIObject__
#define __Engines_mMPIObject__

  class MPIObject;
  class _objref_MPIObject;
  class _impl_MPIObject;
  
  typedef _objref_MPIObject* MPIObject_ptr;
  typedef MPIObject_ptr MPIObjectRef;

  class MPIObject_Helper {
  public:
    typedef MPIObject_ptr _ptr_type;

    static _ptr_type _nil();
    static _CORBA_Boolean is_nil(_ptr_type);
    static void release(_ptr_type);
    static void duplicate(_ptr_type);
    static void marshalObjRef(_ptr_type, cdrStream&);
    static _ptr_type unmarshalObjRef(cdrStream&);
  };

  typedef _CORBA_ObjRef_Var<_objref_MPIObject, MPIObject_Helper> MPIObject_var;
  typedef _CORBA_ObjRef_OUT_arg<_objref_MPIObject,MPIObject_Helper > MPIObject_out;

#endif

  // interface MPIObject
  class MPIObject {
  public:
    // Declarations for this interface type.
    typedef MPIObject_ptr _ptr_type;
    typedef MPIObject_var _var_type;

    static _ptr_type _duplicate(_ptr_type);
    static _ptr_type _narrow(::CORBA::Object_ptr);
    static _ptr_type _unchecked_narrow(::CORBA::Object_ptr);
    
    static _ptr_type _nil();

    static inline void _marshalObjRef(_ptr_type, cdrStream&);

    static inline _ptr_type _unmarshalObjRef(cdrStream& s) {
      omniObjRef* o = omniObjRef::_unMarshal(_PD_repoId,s);
      if (o)
        return (_ptr_type) o->_ptrToObjRef(_PD_repoId);
      else
        return _nil();
    }

    static _core_attr const char* _PD_repoId;

    // Other IDL defined within this scope.
    
  };

  class _objref_MPIObject :
    public virtual ::CORBA::Object,
    public virtual omniObjRef
  {
  public:
    IORTab* tior();
    void tior(const ::Engines::IORTab& _v);

    inline _objref_MPIObject()  { _PR_setobj(0); }  // nil
    _objref_MPIObject(omniIOR*, omniIdentity*);

  protected:
    virtual ~_objref_MPIObject();

    
  private:
    virtual void* _ptrToObjRef(const char*);

    _objref_MPIObject(const _objref_MPIObject&);
    _objref_MPIObject& operator = (const _objref_MPIObject&);
    // not implemented

    friend class MPIObject;
  };

  class _pof_MPIObject : public _OMNI_NS(proxyObjectFactory) {
  public:
    inline _pof_MPIObject() : _OMNI_NS(proxyObjectFactory)(MPIObject::_PD_repoId) {}
    virtual ~_pof_MPIObject();

    virtual omniObjRef* newObjRef(omniIOR*,omniIdentity*);
    virtual _CORBA_Boolean is_a(const char*) const;
  };

  class _impl_MPIObject :
    public virtual omniServant
  {
  public:
    virtual ~_impl_MPIObject();

    virtual IORTab* tior() = 0;
    virtual void tior(const ::Engines::IORTab& _v) = 0;
    
  public:  // Really protected, workaround for xlC
    virtual _CORBA_Boolean _dispatch(omniCallHandle&);

  private:
    virtual void* _ptrToInterface(const char*);
    virtual const char* _mostDerivedRepoId();
    
  };


  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_MPIObject;

_CORBA_MODULE_END



_CORBA_MODULE POA_Engines
_CORBA_MODULE_BEG

  class MPIObject :
    public virtual Engines::_impl_MPIObject,
    public virtual ::PortableServer::ServantBase
  {
  public:
    virtual ~MPIObject();

    inline ::Engines::MPIObject_ptr _this() {
      return (::Engines::MPIObject_ptr) _do_this(::Engines::MPIObject::_PD_repoId);
    }
  };

_CORBA_MODULE_END



_CORBA_MODULE OBV_Engines
_CORBA_MODULE_BEG

_CORBA_MODULE_END





#undef _core_attr
#undef _dyn_attr

void operator<<=(::CORBA::Any& _a, const Engines::IORTab& _s);
void operator<<=(::CORBA::Any& _a, Engines::IORTab* _sp);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, Engines::IORTab*& _sp);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, const Engines::IORTab*& _sp);

void operator<<=(::CORBA::Any& _a, Engines::MPIObject_ptr _s);
void operator<<=(::CORBA::Any& _a, Engines::MPIObject_ptr* _s);
_CORBA_Boolean operator>>=(const ::CORBA::Any& _a, Engines::MPIObject_ptr& _s);



inline void
Engines::MPIObject::_marshalObjRef(::Engines::MPIObject_ptr obj, cdrStream& s) {
  omniObjRef::_marshal(obj->_PR_getobj(),s);
}




#ifdef   USE_stub_in_nt_dll_NOT_DEFINED_SALOME__MPIObject
# undef  USE_stub_in_nt_dll
# undef  USE_stub_in_nt_dll_NOT_DEFINED_SALOME__MPIObject
#endif
#ifdef   USE_core_stub_in_nt_dll_NOT_DEFINED_SALOME__MPIObject
# undef  USE_core_stub_in_nt_dll
# undef  USE_core_stub_in_nt_dll_NOT_DEFINED_SALOME__MPIObject
#endif
#ifdef   USE_dyn_stub_in_nt_dll_NOT_DEFINED_SALOME__MPIObject
# undef  USE_dyn_stub_in_nt_dll
# undef  USE_dyn_stub_in_nt_dll_NOT_DEFINED_SALOME__MPIObject
#endif

#endif  // __SALOME__MPIObject_hh__

