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

#ifndef USE_omniORB_logStream
#define USE_omniORB_logStream
#endif

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

#ifndef  USE_core_stub_in_nt_dll
# define USE_core_stub_in_nt_dll_NOT_DEFINED_Data
#endif
#ifndef  USE_dyn_stub_in_nt_dll
# define USE_dyn_stub_in_nt_dll_NOT_DEFINED_Data
#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 Data

_CORBA_MODULE_BEG

  class NumberSeq_var;

  class NumberSeq : public _CORBA_Unbounded_Sequence_w_FixSizeElement< CORBA::Long, 4, 4 >  {
  public:
    typedef NumberSeq_var _var_type;
    inline NumberSeq() {}
    inline NumberSeq(const NumberSeq& _s)
      : _CORBA_Unbounded_Sequence_w_FixSizeElement< CORBA::Long, 4, 4 > (_s) {}

    inline NumberSeq(_CORBA_ULong _max)
      : _CORBA_Unbounded_Sequence_w_FixSizeElement< CORBA::Long, 4, 4 > (_max) {}
    inline NumberSeq(_CORBA_ULong _max, _CORBA_ULong _len, CORBA::Long* _val, _CORBA_Boolean _rel=0)
      : _CORBA_Unbounded_Sequence_w_FixSizeElement< CORBA::Long, 4, 4 > (_max, _len, _val, _rel) {}

  

    inline NumberSeq& operator = (const NumberSeq& _s) {
      _CORBA_Unbounded_Sequence_w_FixSizeElement< CORBA::Long, 4, 4 > ::operator=(_s);
      return *this;
    }
  };

  class NumberSeq_out;

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

  

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

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

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

  

    NumberSeq*& _data;

  private:
    NumberSeq_out();
    NumberSeq_out& operator=(const NumberSeq_var&);
  };

#ifndef __Data_mServiceA__
#define __Data_mServiceA__

  class ServiceA;
  class _objref_ServiceA;
  class _impl_ServiceA;
  
  typedef _objref_ServiceA* ServiceA_ptr;
  typedef ServiceA_ptr ServiceARef;

  class ServiceA_Helper {
  public:
    typedef ServiceA_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_ServiceA, ServiceA_Helper> ServiceA_var;
  typedef _CORBA_ObjRef_OUT_arg<_objref_ServiceA,ServiceA_Helper > ServiceA_out;

#endif

  class ServiceA {
  public:
    // Declarations for this interface type.
    typedef ServiceA_ptr _ptr_type;
    typedef ServiceA_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_ServiceA :
    public virtual CORBA::Object, public virtual omniObjRef
  {
  public:
    CORBA::Boolean CallServiceRoutineA(CORBA::Long num1, CORBA::Long& num2, CORBA::Long& retNum);
    CORBA::Boolean CallServiceRoutineB(CORBA::Long& num1, CORBA::Long& num2);
    CORBA::Boolean CallServiceRoutineC(CORBA::Long& sum, const NumberSeq& numberList);

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

  protected:
    virtual ~_objref_ServiceA();

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

    _objref_ServiceA(const _objref_ServiceA&);
    _objref_ServiceA& operator = (const _objref_ServiceA&);
    // not implemented
  };

  class _pof_ServiceA : public _OMNI_NS(proxyObjectFactory) {
  public:
    inline _pof_ServiceA() : _OMNI_NS(proxyObjectFactory)(ServiceA::_PD_repoId) {}
    virtual ~_pof_ServiceA();

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

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

    virtual CORBA::Boolean CallServiceRoutineA(CORBA::Long num1, CORBA::Long& num2, CORBA::Long& retNum) = 0;
    virtual CORBA::Boolean CallServiceRoutineB(CORBA::Long& num1, CORBA::Long& num2) = 0;
    virtual CORBA::Boolean CallServiceRoutineC(CORBA::Long& sum, const NumberSeq& numberList) = 0;
    
  public:  // Really protected, workaround for xlC
    virtual _CORBA_Boolean _dispatch(omniCallHandle&);

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


_CORBA_MODULE_END



_CORBA_MODULE POA_Data
_CORBA_MODULE_BEG

  class ServiceA :
    public virtual Data::_impl_ServiceA,
    public virtual PortableServer::ServantBase
  {
  public:
    virtual ~ServiceA();

    inline Data::ServiceA_ptr _this() {
      return (Data::ServiceA_ptr) _do_this(Data::ServiceA::_PD_repoId);
    }
  };

_CORBA_MODULE_END





#undef _core_attr
#undef _dyn_attr



inline void
Data::ServiceA::_marshalObjRef(::Data::ServiceA_ptr obj, cdrStream& s) {
  omniObjRef::_marshal(obj->_PR_getobj(),s);
}




#ifdef   USE_core_stub_in_nt_dll_NOT_DEFINED_Data
# undef  USE_core_stub_in_nt_dll
# undef  USE_core_stub_in_nt_dll_NOT_DEFINED_Data
#endif
#ifdef   USE_dyn_stub_in_nt_dll_NOT_DEFINED_Data
# undef  USE_dyn_stub_in_nt_dll
# undef  USE_dyn_stub_in_nt_dll_NOT_DEFINED_Data
#endif

#endif  // __Data_hh__