// This file is generated by omniidl (C++ backend)- omniORB_4_1. Do not edit.
#ifndef __nstest_hh__
#define __nstest_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_nstest
#endif
#ifndef  USE_core_stub_in_nt_dll
# define USE_core_stub_in_nt_dll_NOT_DEFINED_nstest
#endif
#ifndef  USE_dyn_stub_in_nt_dll
# define USE_dyn_stub_in_nt_dll_NOT_DEFINED_nstest
#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 NSTEST

_CORBA_MODULE_BEG

#ifndef __NSTEST_mecho__
#define __NSTEST_mecho__

  class echo;
  class _objref_echo;
  class _impl_echo;
  
  typedef _objref_echo* echo_ptr;
  typedef echo_ptr echoRef;

  class echo_Helper {
  public:
    typedef echo_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_echo, echo_Helper> echo_var;
  typedef _CORBA_ObjRef_OUT_arg<_objref_echo,echo_Helper > echo_out;

#endif

  // interface echo
  class echo {
  public:
    // Declarations for this interface type.
    typedef echo_ptr _ptr_type;
    typedef echo_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_echo :
    public virtual ::CORBA::Object,
    public virtual omniObjRef
  {
  public:
    ::CORBA::Long getId();

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

  protected:
    virtual ~_objref_echo();

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

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

    friend class echo;
  };

  class _pof_echo : public _OMNI_NS(proxyObjectFactory) {
  public:
    inline _pof_echo() : _OMNI_NS(proxyObjectFactory)(echo::_PD_repoId) {}
    virtual ~_pof_echo();

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

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

    virtual ::CORBA::Long getId() = 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_echo;

#ifndef __NSTEST_maFactory__
#define __NSTEST_maFactory__

  class aFactory;
  class _objref_aFactory;
  class _impl_aFactory;
  
  typedef _objref_aFactory* aFactory_ptr;
  typedef aFactory_ptr aFactoryRef;

  class aFactory_Helper {
  public:
    typedef aFactory_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_aFactory, aFactory_Helper> aFactory_var;
  typedef _CORBA_ObjRef_OUT_arg<_objref_aFactory,aFactory_Helper > aFactory_out;

#endif

  // interface aFactory
  class aFactory {
  public:
    // Declarations for this interface type.
    typedef aFactory_ptr _ptr_type;
    typedef aFactory_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_aFactory :
    public virtual ::CORBA::Object,
    public virtual omniObjRef
  {
  public:
    echo_ptr createInstance();

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

  protected:
    virtual ~_objref_aFactory();

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

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

    friend class aFactory;
  };

  class _pof_aFactory : public _OMNI_NS(proxyObjectFactory) {
  public:
    inline _pof_aFactory() : _OMNI_NS(proxyObjectFactory)(aFactory::_PD_repoId) {}
    virtual ~_pof_aFactory();

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

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

    virtual echo_ptr createInstance() = 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_aFactory;

_CORBA_MODULE_END



_CORBA_MODULE POA_NSTEST
_CORBA_MODULE_BEG

  class echo :
    public virtual NSTEST::_impl_echo,
    public virtual ::PortableServer::ServantBase
  {
  public:
    virtual ~echo();

    inline ::NSTEST::echo_ptr _this() {
      return (::NSTEST::echo_ptr) _do_this(::NSTEST::echo::_PD_repoId);
    }
  };

  class aFactory :
    public virtual NSTEST::_impl_aFactory,
    public virtual ::PortableServer::ServantBase
  {
  public:
    virtual ~aFactory();

    inline ::NSTEST::aFactory_ptr _this() {
      return (::NSTEST::aFactory_ptr) _do_this(::NSTEST::aFactory::_PD_repoId);
    }
  };

_CORBA_MODULE_END



_CORBA_MODULE OBV_NSTEST
_CORBA_MODULE_BEG

_CORBA_MODULE_END





#undef _core_attr
#undef _dyn_attr

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

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



inline void
NSTEST::echo::_marshalObjRef(::NSTEST::echo_ptr obj, cdrStream& s) {
  omniObjRef::_marshal(obj->_PR_getobj(),s);
}


inline void
NSTEST::aFactory::_marshalObjRef(::NSTEST::aFactory_ptr obj, cdrStream& s) {
  omniObjRef::_marshal(obj->_PR_getobj(),s);
}




#ifdef   USE_stub_in_nt_dll_NOT_DEFINED_nstest
# undef  USE_stub_in_nt_dll
# undef  USE_stub_in_nt_dll_NOT_DEFINED_nstest
#endif
#ifdef   USE_core_stub_in_nt_dll_NOT_DEFINED_nstest
# undef  USE_core_stub_in_nt_dll
# undef  USE_core_stub_in_nt_dll_NOT_DEFINED_nstest
#endif
#ifdef   USE_dyn_stub_in_nt_dll_NOT_DEFINED_nstest
# undef  USE_dyn_stub_in_nt_dll
# undef  USE_dyn_stub_in_nt_dll_NOT_DEFINED_nstest
#endif

#endif  // __nstest_hh__

