// This file is generated by omniidl (C++ backend)- omniORB_4_2. Do not edit.
#ifndef __value_hh__
#define __value_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_value
#endif
#ifndef  USE_core_stub_in_nt_dll
# define USE_core_stub_in_nt_dll_NOT_DEFINED_value
#endif
#ifndef  USE_dyn_stub_in_nt_dll
# define USE_dyn_stub_in_nt_dll_NOT_DEFINED_value
#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 ValueTest

_CORBA_MODULE_BEG

#ifndef __ValueTest_mOne__
#define __ValueTest_mOne__

  class One;

  class One_Helper {
  public:
    static void add_ref(One*);
    static void remove_ref(One*);
    static void marshal(One*, cdrStream&);
    static One* unmarshal(cdrStream&);
  };

  typedef _CORBA_Value_Var    <One,One_Helper> One_var;
  typedef _CORBA_Value_Member <One,One_Helper> One_member;
  typedef _CORBA_Value_OUT_arg<One,One_Helper> One_out;

#endif // __ValueTest_mOne__

  class One : 
    public virtual ::CORBA::ValueBase
  {
  public:  
    // Standard mapping
    typedef One*    _ptr_type;
    typedef One_var _var_type;

    static _ptr_type _downcast(::CORBA::ValueBase*);
    

#ifdef OMNI_HAVE_COVARIANT_RETURNS
    virtual One* _copy_value();
#else
    virtual ::CORBA::ValueBase* _copy_value();
#endif

    // Definitions in this scope
    

    // Operations and attributes
    

    // Accessors for public members
    virtual const char* s() const = 0;
    virtual void s(char* _value) = 0;
    virtual void s(const char* _value) = 0;
    virtual void s(const ::CORBA::String_var& _value) = 0;

    void s(const ::CORBA::String_member& _value) {
      s((const char*)_value);
    }


    virtual ::CORBA::Long l() const = 0;
    virtual void l(::CORBA::Long _value) = 0;


  

  protected:
    // Accessors for private members
    

  public:
    // omniORB internal
    virtual const char* _NP_repositoryId() const;
    virtual const char* _NP_repositoryId(::CORBA::ULong& _hashval) const;

    virtual const _omni_ValueIds* _NP_truncatableIds() const;

    virtual ::CORBA::Boolean _NP_custom() const;

    virtual void* _ptrToValue(const char* id);

    static void _NP_marshal(One*, cdrStream&);
    static One* _NP_unmarshal(cdrStream&);
    

    virtual void _PR_marshal_state(cdrStream&) const;
    virtual void _PR_unmarshal_state(cdrStream&);
    virtual void _PR_copy_state(One*);

    static _core_attr const char* _PD_repoId;

  protected:
    One();
    virtual ~One();

  private:
    // Not implemented
    One(const One&);
    One& operator=(const One&);
  };

  class One_init : public ::CORBA::ValueFactoryBase
  {
  public:
    One_init();
    virtual ~One_init();

    virtual ::CORBA::ValueBase* create_for_unmarshal();

    static One_init* _downcast(::CORBA::ValueFactory _v);
    virtual void* _ptrToFactory(const char* _id);
  };

  _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_One;

#ifndef __ValueTest_mTest__
#define __ValueTest_mTest__
  class Test;
  class _objref_Test;
  class _impl_Test;
  
  typedef _objref_Test* Test_ptr;
  typedef Test_ptr TestRef;

  class Test_Helper {
  public:
    typedef Test_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_Test, Test_Helper> Test_var;
  typedef _CORBA_ObjRef_OUT_arg<_objref_Test,Test_Helper > Test_out;

#endif

  // interface Test
  class Test {
  public:
    // Declarations for this interface type.
    typedef Test_ptr _ptr_type;
    typedef Test_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 inline _ptr_type _fromObjRef(omniObjRef* o) {
      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_Test :
    public virtual ::CORBA::Object,
    public virtual omniObjRef
  {
  public:
    // IDL operations
    One* op1(::ValueTest::One* a, ::ValueTest::One* b);

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

  protected:
    virtual ~_objref_Test();

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

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

    friend class Test;
  };

  class _pof_Test : public _OMNI_NS(proxyObjectFactory) {
  public:
    inline _pof_Test() : _OMNI_NS(proxyObjectFactory)(Test::_PD_repoId) {}
    virtual ~_pof_Test();

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

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

    virtual One* op1(::ValueTest::One* a, ::ValueTest::One* b) = 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_Test;

_CORBA_MODULE_END



_CORBA_MODULE POA_ValueTest
_CORBA_MODULE_BEG

  class Test :
    public virtual ValueTest::_impl_Test,
    public virtual ::PortableServer::ServantBase
  {
  public:
    virtual ~Test();

    inline ::ValueTest::Test_ptr _this() {
      return (::ValueTest::Test_ptr) _do_this(::ValueTest::Test::_PD_repoId);
    }
  };

_CORBA_MODULE_END



_CORBA_MODULE OBV_ValueTest
_CORBA_MODULE_BEG

  class One :
    public virtual ValueTest::One,
    public virtual ::CORBA::DefaultValueRefCountBase
  {
  public:
    One();
    One(const char* _s, ::CORBA::Long _l);
    virtual ~One();

  public:
    virtual const char* s() const ;
    virtual void s(char* _value) ;
    virtual void s(const char* _value) ;
    virtual void s(const ::CORBA::String_var& _value) ;


    virtual ::CORBA::Long l() const ;
    virtual void l(::CORBA::Long _value) ;


  

  protected:
    

  private:
    ::CORBA::String_member _pd_s;
    ::CORBA::Long _pd_l;
  
  };

_CORBA_MODULE_END





#undef _core_attr
#undef _dyn_attr

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

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



inline void
ValueTest::Test::_marshalObjRef(::ValueTest::Test_ptr obj, cdrStream& s) {
  omniObjRef::_marshal(obj->_PR_getobj(),s);
}



#ifdef   USE_stub_in_nt_dll_NOT_DEFINED_value
# undef  USE_stub_in_nt_dll
# undef  USE_stub_in_nt_dll_NOT_DEFINED_value
#endif
#ifdef   USE_core_stub_in_nt_dll_NOT_DEFINED_value
# undef  USE_core_stub_in_nt_dll
# undef  USE_core_stub_in_nt_dll_NOT_DEFINED_value
#endif
#ifdef   USE_dyn_stub_in_nt_dll_NOT_DEFINED_value
# undef  USE_dyn_stub_in_nt_dll
# undef  USE_dyn_stub_in_nt_dll_NOT_DEFINED_value
#endif

#endif  // __value_hh__

