// This file is generated by omniidl2- omniORB_2_8. Do not edit.
#ifndef __Naming_hh__
#define __Naming_hh__

#ifndef USE_omniORB_logStream
#define USE_omniORB_logStream
#endif

#ifndef __CORBA_H_EXTERNAL_GUARD__
#define __CORBA_H_EXTERNAL_GUARD__
#include <omniORB2/CORBA.h>
#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 CosNaming

_CORBA_MODULE_BEG

  _CORBA_MODULE_VAR _dyn_attr const CORBA::TypeCode_ptr _tc_Istring;
  typedef char* Istring;
  typedef CORBA::String_var Istring_var;
  struct NameComponent {
    typedef _CORBA_ConstrType_Variable_Var<NameComponent> _var_type;
    CORBA::String_member id;
    CORBA::String_member kind;
    
    size_t NP_alignedSize(size_t initialoffset) const;
    void operator>>= (NetBufferedStream &) const;
    void operator<<= (NetBufferedStream &);
    void operator>>= (MemBufferedStream &) const;
    void operator<<= (MemBufferedStream &);
  };

  typedef NameComponent::_var_type NameComponent_var;

  typedef _CORBA_ConstrType_Variable_OUT_arg< NameComponent,NameComponent_var > NameComponent_out;

  _CORBA_MODULE_VAR _dyn_attr const CORBA::TypeCode_ptr _tc_NameComponent;

  _CORBA_MODULE_VAR _dyn_attr const CORBA::TypeCode_ptr _tc_Name;
  class Name_var;

  class Name : public _CORBA_Unbounded_Sequence<NameComponent > {
  public:
    typedef Name_var _var_type;
    inline Name() {}
    inline Name(const Name& seq)
      : _CORBA_Unbounded_Sequence<NameComponent >(seq) {}
    inline Name(CORBA::ULong max)
      : _CORBA_Unbounded_Sequence<NameComponent >(max) {}
    inline Name(CORBA::ULong max, CORBA::ULong len, NameComponent* val, CORBA::Boolean rel=0)
      : _CORBA_Unbounded_Sequence<NameComponent >(max, len, val, rel) {}
    inline Name& operator = (const Name& seq) {
      _CORBA_Unbounded_Sequence<NameComponent >::operator=(seq);
      return *this;
    };
  };

  class Name_out;

  class Name_var {
  public:
    typedef Name _Tseq;
    typedef Name_var _T_var;

    inline Name_var() : pd_seq(0) {}
    inline Name_var(_Tseq* s) : pd_seq(s) {}
    inline Name_var(const _T_var& sv) {
      if( sv.pd_seq ) {
        pd_seq = new _Tseq;
        *pd_seq = *sv.pd_seq;
      } else
        pd_seq = 0;
    }
    inline ~Name_var() { if( pd_seq ) delete pd_seq; }

    inline _T_var& operator = (_Tseq* s) {
      if( pd_seq )  delete pd_seq;
      pd_seq = s;
      return *this;
    }
    inline _T_var& operator = (const _T_var& sv) {
      if( sv.pd_seq ) {
        if( !pd_seq )  pd_seq = new _Tseq;
        *pd_seq = *sv.pd_seq;
      } else if( pd_seq ) {
        delete pd_seq;
        pd_seq = 0;
      }
      return *this;
    }

    inline NameComponent& operator [] (_CORBA_ULong i) {   return (*pd_seq)[i]; }
    inline _Tseq* operator -> () { return pd_seq; }
#if defined(__GNUG__) && __GNUG__ == 2 && __GNUC_MINOR__ == 7
    inline operator _Tseq& () const { return *pd_seq; }
#else
    inline operator const _Tseq& () const { return *pd_seq; }
    inline operator _Tseq& () { return *pd_seq; }
#endif

    inline const _Tseq& in() const { return *pd_seq; }
    inline _Tseq& inout() { return *pd_seq; }
    inline _Tseq*& out() { if (pd_seq) { delete pd_seq; pd_seq = 0; } return pd_seq; }
    inline _Tseq* _retn() { _Tseq* tmp = pd_seq; pd_seq = 0; return tmp; }

    friend class Name_out;

  private:
    _Tseq* pd_seq;
  };

  class Name_out {
  public:
    typedef Name _Tseq;
    typedef Name_var _T_var;

    inline Name_out(_Tseq*& s) : _data(s) { _data = 0; }
    inline Name_out(_T_var& sv)
      : _data(sv.pd_seq) { sv = (_Tseq*) 0; }
    inline Name_out(const Name_out& s) : _data(s._data) { }
    inline Name_out& operator=(const Name_out& s) { _data = s._data; return *this; }
    inline Name_out& operator=(_Tseq* s) { _data = s; return *this; }
    inline operator _Tseq*&() { return _data; }
    inline _Tseq*& ptr() { return _data; }
    inline _Tseq* operator->() { return _data; }
    inline NameComponent& operator [] (_CORBA_ULong i) {   return (*_data)[i]; }
    _Tseq*& _data;

  private:
    Name_out();
    Name_out operator=( const _T_var&);
  };

  enum BindingType { nobject, ncontext };
typedef BindingType& BindingType_out;

  _CORBA_MODULE_VAR _dyn_attr const CORBA::TypeCode_ptr _tc_BindingType;

  struct Binding {
    typedef _CORBA_ConstrType_Variable_Var<Binding> _var_type;
    Name binding_name;
    BindingType binding_type;
    
    size_t NP_alignedSize(size_t initialoffset) const;
    void operator>>= (NetBufferedStream &) const;
    void operator<<= (NetBufferedStream &);
    void operator>>= (MemBufferedStream &) const;
    void operator<<= (MemBufferedStream &);
  };

  typedef Binding::_var_type Binding_var;

  typedef _CORBA_ConstrType_Variable_OUT_arg< Binding,Binding_var > Binding_out;

  _CORBA_MODULE_VAR _dyn_attr const CORBA::TypeCode_ptr _tc_Binding;

  _CORBA_MODULE_VAR _dyn_attr const CORBA::TypeCode_ptr _tc_BindingList;
  class BindingList_var;

  class BindingList : public _CORBA_Unbounded_Sequence<Binding > {
  public:
    typedef BindingList_var _var_type;
    inline BindingList() {}
    inline BindingList(const BindingList& seq)
      : _CORBA_Unbounded_Sequence<Binding >(seq) {}
    inline BindingList(CORBA::ULong max)
      : _CORBA_Unbounded_Sequence<Binding >(max) {}
    inline BindingList(CORBA::ULong max, CORBA::ULong len, Binding* val, CORBA::Boolean rel=0)
      : _CORBA_Unbounded_Sequence<Binding >(max, len, val, rel) {}
    inline BindingList& operator = (const BindingList& seq) {
      _CORBA_Unbounded_Sequence<Binding >::operator=(seq);
      return *this;
    };
  };

  class BindingList_out;

  class BindingList_var {
  public:
    typedef BindingList _Tseq;
    typedef BindingList_var _T_var;

    inline BindingList_var() : pd_seq(0) {}
    inline BindingList_var(_Tseq* s) : pd_seq(s) {}
    inline BindingList_var(const _T_var& sv) {
      if( sv.pd_seq ) {
        pd_seq = new _Tseq;
        *pd_seq = *sv.pd_seq;
      } else
        pd_seq = 0;
    }
    inline ~BindingList_var() { if( pd_seq ) delete pd_seq; }

    inline _T_var& operator = (_Tseq* s) {
      if( pd_seq )  delete pd_seq;
      pd_seq = s;
      return *this;
    }
    inline _T_var& operator = (const _T_var& sv) {
      if( sv.pd_seq ) {
        if( !pd_seq )  pd_seq = new _Tseq;
        *pd_seq = *sv.pd_seq;
      } else if( pd_seq ) {
        delete pd_seq;
        pd_seq = 0;
      }
      return *this;
    }

    inline Binding& operator [] (_CORBA_ULong i) {   return (*pd_seq)[i]; }
    inline _Tseq* operator -> () { return pd_seq; }
#if defined(__GNUG__) && __GNUG__ == 2 && __GNUC_MINOR__ == 7
    inline operator _Tseq& () const { return *pd_seq; }
#else
    inline operator const _Tseq& () const { return *pd_seq; }
    inline operator _Tseq& () { return *pd_seq; }
#endif

    inline const _Tseq& in() const { return *pd_seq; }
    inline _Tseq& inout() { return *pd_seq; }
    inline _Tseq*& out() { if (pd_seq) { delete pd_seq; pd_seq = 0; } return pd_seq; }
    inline _Tseq* _retn() { _Tseq* tmp = pd_seq; pd_seq = 0; return tmp; }

    friend class BindingList_out;

  private:
    _Tseq* pd_seq;
  };

  class BindingList_out {
  public:
    typedef BindingList _Tseq;
    typedef BindingList_var _T_var;

    inline BindingList_out(_Tseq*& s) : _data(s) { _data = 0; }
    inline BindingList_out(_T_var& sv)
      : _data(sv.pd_seq) { sv = (_Tseq*) 0; }
    inline BindingList_out(const BindingList_out& s) : _data(s._data) { }
    inline BindingList_out& operator=(const BindingList_out& s) { _data = s._data; return *this; }
    inline BindingList_out& operator=(_Tseq* s) { _data = s; return *this; }
    inline operator _Tseq*&() { return _data; }
    inline _Tseq*& ptr() { return _data; }
    inline _Tseq* operator->() { return _data; }
    inline Binding& operator [] (_CORBA_ULong i) {   return (*_data)[i]; }
    _Tseq*& _data;

  private:
    BindingList_out();
    BindingList_out operator=( const _T_var&);
  };

#ifndef __CosNaming_mBindingIterator__
#define __CosNaming_mBindingIterator__
  class   BindingIterator;
  typedef BindingIterator* BindingIterator_ptr;
  typedef BindingIterator_ptr BindingIteratorRef;
  class _proxy_BindingIterator;
  class _sk_BindingIterator;
  class _nil_BindingIterator;

  class BindingIterator_Helper {
    public:
    static BindingIterator_ptr _nil();
    static CORBA::Boolean is_nil(BindingIterator_ptr p);
    static void release(BindingIterator_ptr p);
    static void duplicate(BindingIterator_ptr p);
    static size_t NP_alignedSize(BindingIterator_ptr obj,size_t initialoffset);
    static void marshalObjRef(BindingIterator_ptr obj,NetBufferedStream &s);
    static BindingIterator_ptr unmarshalObjRef(NetBufferedStream &s);
    static void marshalObjRef(BindingIterator_ptr obj,MemBufferedStream &s);
    static BindingIterator_ptr unmarshalObjRef(MemBufferedStream &s);
  };
  typedef _CORBA_ObjRef_Var<BindingIterator,BindingIterator_Helper> BindingIterator_var;
  typedef _CORBA_ObjRef_OUT_arg<BindingIterator,BindingIterator_Helper > BindingIterator_out;

#endif
#ifndef __CosNaming_mNamingContext__
#define __CosNaming_mNamingContext__
  class   NamingContext;
  typedef NamingContext* NamingContext_ptr;
  typedef NamingContext_ptr NamingContextRef;
  class _proxy_NamingContext;
  class _sk_NamingContext;
  class _nil_NamingContext;

  class NamingContext_Helper {
    public:
    static NamingContext_ptr _nil();
    static CORBA::Boolean is_nil(NamingContext_ptr p);
    static void release(NamingContext_ptr p);
    static void duplicate(NamingContext_ptr p);
    static size_t NP_alignedSize(NamingContext_ptr obj,size_t initialoffset);
    static void marshalObjRef(NamingContext_ptr obj,NetBufferedStream &s);
    static NamingContext_ptr unmarshalObjRef(NetBufferedStream &s);
    static void marshalObjRef(NamingContext_ptr obj,MemBufferedStream &s);
    static NamingContext_ptr unmarshalObjRef(MemBufferedStream &s);
  };
  typedef _CORBA_ObjRef_Var<NamingContext,NamingContext_Helper> NamingContext_var;
  typedef _CORBA_ObjRef_OUT_arg<NamingContext,NamingContext_Helper > NamingContext_out;

#endif
#ifndef __CosNaming_mNamingContext__
#define __CosNaming_mNamingContext__
  class   NamingContext;
  typedef NamingContext* NamingContext_ptr;
  typedef NamingContext_ptr NamingContextRef;

  class NamingContext_Helper {
    public:
    static NamingContext_ptr _nil();
    static CORBA::Boolean is_nil(NamingContext_ptr p);
    static void release(NamingContext_ptr p);
    static void duplicate(NamingContext_ptr p);
    static size_t NP_alignedSize(NamingContext_ptr obj,size_t initialoffset);
    static void marshalObjRef(NamingContext_ptr obj,NetBufferedStream &s);
    static NamingContext_ptr unmarshalObjRef(NetBufferedStream &s);
    static void marshalObjRef(NamingContext_ptr obj,MemBufferedStream &s);
    static NamingContext_ptr unmarshalObjRef(MemBufferedStream &s);
  };
  typedef _CORBA_ObjRef_Var<NamingContext,NamingContext_Helper> NamingContext_var;
  typedef _CORBA_ObjRef_OUT_arg<NamingContext,NamingContext_Helper > NamingContext_out;

#endif
#define CosNaming_NamingContext_IntfRepoID "IDL:omg.org/CosNaming/NamingContext:1.0"

  class NamingContext : public virtual omniObject, public virtual CORBA::Object {
  public:

    enum NotFoundReason { missing_node, not_context, not_object };
typedef NotFoundReason& NotFoundReason_out;

    static _dyn_attr const CORBA::TypeCode_ptr _tc_NotFoundReason;

#define CosNaming_NamingContext_NotFound_IntfRepoID "IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"

    class NotFound : public CORBA::UserException {
    public:

      NotFoundReason why;
      Name rest_of_name;
      
      NotFound() {
        pd_insertToAnyFn    = insertToAnyFn;
        pd_insertToAnyFnNCP = insertToAnyFnNCP;
      }
      NotFound(const NotFound &);
      NotFound(NotFoundReason  _why, const Name _rest_of_name);
      NotFound & operator=(const NotFound &);
      virtual ~NotFound();
      virtual void _raise();
      static NotFound* _downcast(CORBA::Exception* e);
      static const NotFound* _downcast(const CORBA::Exception* e);
      static NotFound* _narrow(CORBA::Exception* e);
      // NOTE: deprecated function from CORBA 2.2. Should use _downcast instead.
      size_t NP_alignedSize(size_t initialoffset) const;
      void operator>>= (NetBufferedStream &) const;
      void operator<<= (NetBufferedStream &);
      void operator>>= (MemBufferedStream &) const;
      void operator<<= (MemBufferedStream &);
      static _core_attr CORBA::Exception::insertExceptionToAny    insertToAnyFn;
      static _core_attr CORBA::Exception::insertExceptionToAnyNCP insertToAnyFnNCP;
    private:
      virtual CORBA::Exception* _NP_duplicate() const;
      virtual const char* _NP_mostDerivedTypeId() const;
    };

    static _dyn_attr const CORBA::TypeCode_ptr _tc_NotFound;

#define CosNaming_NamingContext_CannotProceed_IntfRepoID "IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"

    class CannotProceed : public CORBA::UserException {
    public:

      _CORBA_ObjRef_Member<NamingContext,NamingContext_Helper> cxt;
      Name rest_of_name;
      
      CannotProceed() {
        pd_insertToAnyFn    = insertToAnyFn;
        pd_insertToAnyFnNCP = insertToAnyFnNCP;
      }
      CannotProceed(const CannotProceed &);
      CannotProceed(NamingContext_ptr _cxt, const Name _rest_of_name);
      CannotProceed & operator=(const CannotProceed &);
      virtual ~CannotProceed();
      virtual void _raise();
      static CannotProceed* _downcast(CORBA::Exception* e);
      static const CannotProceed* _downcast(const CORBA::Exception* e);
      static CannotProceed* _narrow(CORBA::Exception* e);
      // NOTE: deprecated function from CORBA 2.2. Should use _downcast instead.
      size_t NP_alignedSize(size_t initialoffset) const;
      void operator>>= (NetBufferedStream &) const;
      void operator<<= (NetBufferedStream &);
      void operator>>= (MemBufferedStream &) const;
      void operator<<= (MemBufferedStream &);
      static _core_attr CORBA::Exception::insertExceptionToAny    insertToAnyFn;
      static _core_attr CORBA::Exception::insertExceptionToAnyNCP insertToAnyFnNCP;
    private:
      virtual CORBA::Exception* _NP_duplicate() const;
      virtual const char* _NP_mostDerivedTypeId() const;
    };

    static _dyn_attr const CORBA::TypeCode_ptr _tc_CannotProceed;

#define CosNaming_NamingContext_InvalidName_IntfRepoID "IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"

    class InvalidName : public CORBA::UserException {
    public:

      
      InvalidName() {
        pd_insertToAnyFn    = insertToAnyFn;
        pd_insertToAnyFnNCP = insertToAnyFnNCP;
      }
      InvalidName(const InvalidName &);
      InvalidName & operator=(const InvalidName &);
      virtual ~InvalidName();
      virtual void _raise();
      static InvalidName* _downcast(CORBA::Exception* e);
      static const InvalidName* _downcast(const CORBA::Exception* e);
      static InvalidName* _narrow(CORBA::Exception* e);
      // NOTE: deprecated function from CORBA 2.2. Should use _downcast instead.
      size_t NP_alignedSize(size_t initialoffset) const;
      void operator>>= (NetBufferedStream &) const;
      void operator<<= (NetBufferedStream &);
      void operator>>= (MemBufferedStream &) const;
      void operator<<= (MemBufferedStream &);
      static _core_attr CORBA::Exception::insertExceptionToAny    insertToAnyFn;
      static _core_attr CORBA::Exception::insertExceptionToAnyNCP insertToAnyFnNCP;
    private:
      virtual CORBA::Exception* _NP_duplicate() const;
      virtual const char* _NP_mostDerivedTypeId() const;
    };

    static _dyn_attr const CORBA::TypeCode_ptr _tc_InvalidName;

#define CosNaming_NamingContext_AlreadyBound_IntfRepoID "IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"

    class AlreadyBound : public CORBA::UserException {
    public:

      
      AlreadyBound() {
        pd_insertToAnyFn    = insertToAnyFn;
        pd_insertToAnyFnNCP = insertToAnyFnNCP;
      }
      AlreadyBound(const AlreadyBound &);
      AlreadyBound & operator=(const AlreadyBound &);
      virtual ~AlreadyBound();
      virtual void _raise();
      static AlreadyBound* _downcast(CORBA::Exception* e);
      static const AlreadyBound* _downcast(const CORBA::Exception* e);
      static AlreadyBound* _narrow(CORBA::Exception* e);
      // NOTE: deprecated function from CORBA 2.2. Should use _downcast instead.
      size_t NP_alignedSize(size_t initialoffset) const;
      void operator>>= (NetBufferedStream &) const;
      void operator<<= (NetBufferedStream &);
      void operator>>= (MemBufferedStream &) const;
      void operator<<= (MemBufferedStream &);
      static _core_attr CORBA::Exception::insertExceptionToAny    insertToAnyFn;
      static _core_attr CORBA::Exception::insertExceptionToAnyNCP insertToAnyFnNCP;
    private:
      virtual CORBA::Exception* _NP_duplicate() const;
      virtual const char* _NP_mostDerivedTypeId() const;
    };

    static _dyn_attr const CORBA::TypeCode_ptr _tc_AlreadyBound;

#define CosNaming_NamingContext_NotEmpty_IntfRepoID "IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0"

    class NotEmpty : public CORBA::UserException {
    public:

      
      NotEmpty() {
        pd_insertToAnyFn    = insertToAnyFn;
        pd_insertToAnyFnNCP = insertToAnyFnNCP;
      }
      NotEmpty(const NotEmpty &);
      NotEmpty & operator=(const NotEmpty &);
      virtual ~NotEmpty();
      virtual void _raise();
      static NotEmpty* _downcast(CORBA::Exception* e);
      static const NotEmpty* _downcast(const CORBA::Exception* e);
      static NotEmpty* _narrow(CORBA::Exception* e);
      // NOTE: deprecated function from CORBA 2.2. Should use _downcast instead.
      size_t NP_alignedSize(size_t initialoffset) const;
      void operator>>= (NetBufferedStream &) const;
      void operator<<= (NetBufferedStream &);
      void operator>>= (MemBufferedStream &) const;
      void operator<<= (MemBufferedStream &);
      static _core_attr CORBA::Exception::insertExceptionToAny    insertToAnyFn;
      static _core_attr CORBA::Exception::insertExceptionToAnyNCP insertToAnyFnNCP;
    private:
      virtual CORBA::Exception* _NP_duplicate() const;
      virtual const char* _NP_mostDerivedTypeId() const;
    };

    static _dyn_attr const CORBA::TypeCode_ptr _tc_NotEmpty;

    virtual void bind(const Name & n, CORBA::Object_ptr  obj) = 0;
    virtual void rebind(const Name & n, CORBA::Object_ptr  obj) = 0;
    virtual void bind_context(const Name & n, NamingContext_ptr  nc) = 0;
    virtual void rebind_context(const Name & n, NamingContext_ptr  nc) = 0;
    virtual CORBA::Object_ptr  resolve(const Name & n) = 0;
    virtual void unbind(const Name & n) = 0;
    virtual NamingContext_ptr  new_context() = 0;
    virtual NamingContext_ptr  bind_new_context(const Name & n) = 0;
    virtual void destroy() = 0;
    virtual void _0RL__list(CORBA::ULong  how_many, BindingList *& bl, BindingIterator_ptr & bi) = 0;
    void list ( CORBA::ULong  how_many,
                      BindingList_out  bl,
                      _CORBA_ObjRef_OUT_arg<BindingIterator,BindingIterator_Helper >  bi )
    {
      _0RL__list ( how_many, bl._data, bi._data );
    }
    typedef NamingContext_var _var_type;
    typedef NamingContext_ptr _ptr_type;
    static NamingContext_ptr _duplicate(NamingContext_ptr);
    static NamingContext_ptr _narrow(CORBA::Object_ptr);
    static NamingContext_ptr _nil();

    static inline size_t NP_alignedSize(NamingContext_ptr obj,size_t initialoffset) {
      return CORBA::AlignedObjRef(obj,CosNaming_NamingContext_IntfRepoID,40,initialoffset);
    }

    static inline void marshalObjRef(NamingContext_ptr obj,NetBufferedStream &s) {
      CORBA::MarshalObjRef(obj,CosNaming_NamingContext_IntfRepoID,40,s);
    }

    static inline NamingContext_ptr unmarshalObjRef(NetBufferedStream &s) {
      CORBA::Object_ptr _obj = CORBA::UnMarshalObjRef(CosNaming_NamingContext_IntfRepoID,s);
      NamingContext_ptr _result = CosNaming::NamingContext::_narrow(_obj);
      CORBA::release(_obj);
      return _result;
    }

    static inline void marshalObjRef(NamingContext_ptr obj,MemBufferedStream &s) {
      CORBA::MarshalObjRef(obj,CosNaming_NamingContext_IntfRepoID,40,s);
    }

    static inline NamingContext_ptr unmarshalObjRef(MemBufferedStream &s) {
      CORBA::Object_ptr _obj = CORBA::UnMarshalObjRef(CosNaming_NamingContext_IntfRepoID,s);
      NamingContext_ptr _result = CosNaming::NamingContext::_narrow(_obj);
      CORBA::release(_obj);
      return _result;
    }

    static CORBA::Boolean _0RL_is_a(const char *base_repoId);

  protected:

    NamingContext() {
      if (!is_proxy())
        omniObject::PR_IRRepositoryId(CosNaming_NamingContext_IntfRepoID);
      this->PR_setobj(this);
    }
    virtual ~NamingContext();
    virtual void *_widenFromTheMostDerivedIntf(const char *repoId,CORBA::Boolean is_cxx_type_id=0);

  private:

    NamingContext(const NamingContext&);
    NamingContext &operator=(const NamingContext&);
  };

  class _sk_NamingContext :  public virtual NamingContext {
  public:

    _sk_NamingContext() {}
    _sk_NamingContext(const omniORB::objectKey& k);
    virtual ~_sk_NamingContext();
    NamingContext_ptr _this() { return NamingContext::_duplicate(this); }
    void _obj_is_ready(CORBA::BOA_ptr boa) { boa->obj_is_ready(this); }
    CORBA::BOA_ptr _boa() { return CORBA::BOA::getBOA(); }
    void _dispose() { _boa()->dispose(this); }
    omniORB::objectKey _key();
    virtual void bind(const Name & n, CORBA::Object_ptr  obj) = 0;
    virtual void rebind(const Name & n, CORBA::Object_ptr  obj) = 0;
    virtual void bind_context(const Name & n, NamingContext_ptr  nc) = 0;
    virtual void rebind_context(const Name & n, NamingContext_ptr  nc) = 0;
    virtual CORBA::Object_ptr  resolve(const Name & n) = 0;
    virtual void unbind(const Name & n) = 0;
    virtual NamingContext_ptr  new_context() = 0;
    virtual NamingContext_ptr  bind_new_context(const Name & n) = 0;
    virtual void destroy() = 0;
    virtual void list(CORBA::ULong  how_many, BindingList *& bl, BindingIterator_ptr & bi) = 0;
    virtual void _0RL__list(CORBA::ULong  how_many, BindingList *& bl, BindingIterator_ptr & bi) {
      list(how_many, bl, bi);
    }
    virtual CORBA::Boolean dispatch(GIOP_S &s,const char *op,CORBA::Boolean response);

  protected:
    virtual void *_widenFromTheMostDerivedIntf(const char *repoId,CORBA::Boolean is_cxx_type_id) {
      return NamingContext::_widenFromTheMostDerivedIntf(repoId,is_cxx_type_id);
    }
  private:
    _sk_NamingContext (const _sk_NamingContext&);
    _sk_NamingContext &operator=(const _sk_NamingContext&);
  };

  class _proxy_NamingContext :  public virtual NamingContext {
  public:

    _proxy_NamingContext (Rope *r,CORBA::Octet *key,size_t keysize,IOP::TaggedProfileList *profiles,CORBA::Boolean release) :
      omniObject(CosNaming_NamingContext_IntfRepoID,r,key,keysize,profiles,release) {
        omni::objectIsReady(this);
    }
    virtual ~_proxy_NamingContext();
    virtual void bind(const Name & n, CORBA::Object_ptr  obj);
    virtual void rebind(const Name & n, CORBA::Object_ptr  obj);
    virtual void bind_context(const Name & n, NamingContext_ptr  nc);
    virtual void rebind_context(const Name & n, NamingContext_ptr  nc);
    virtual CORBA::Object_ptr  resolve(const Name & n);
    virtual void unbind(const Name & n);
    virtual NamingContext_ptr  new_context();
    virtual NamingContext_ptr  bind_new_context(const Name & n);
    virtual void destroy();
    virtual void _0RL__list(CORBA::ULong  how_many, BindingList *& bl, BindingIterator_ptr & bi);

  protected:

    _proxy_NamingContext () {}

    virtual void *_widenFromTheMostDerivedIntf(const char *repoId,CORBA::Boolean is_cxx_type) {
      return NamingContext::_widenFromTheMostDerivedIntf(repoId,is_cxx_type);
    }
  private:

    _proxy_NamingContext (const _proxy_NamingContext&);
    _proxy_NamingContext &operator=(const _proxy_NamingContext&);
  };

  class _nil_NamingContext :   public virtual NamingContext {
  public:
    _nil_NamingContext() : omniObject(omniObject::nilObjectManager()) { this->PR_setobj(0); }
    virtual ~_nil_NamingContext();
    void bind(const Name & n, CORBA::Object_ptr  obj){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      return;
#endif
    }

    void rebind(const Name & n, CORBA::Object_ptr  obj){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      return;
#endif
    }

    void bind_context(const Name & n, NamingContext_ptr  nc){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      return;
#endif
    }

    void rebind_context(const Name & n, NamingContext_ptr  nc){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      return;
#endif
    }

    CORBA::Object_ptr  resolve(const Name & n){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      CORBA::Object_ptr _0RL_result = 0;
      return _0RL_result;
#endif
    }

    void unbind(const Name & n){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      return;
#endif
    }

    NamingContext_ptr  new_context(){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      NamingContext_ptr _0RL_result = 0;
      return _0RL_result;
#endif
    }

    NamingContext_ptr  bind_new_context(const Name & n){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      NamingContext_ptr _0RL_result = 0;
      return _0RL_result;
#endif
    }

    void destroy(){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      return;
#endif
    }

    void _0RL__list(CORBA::ULong  how_many, BindingList *& bl, BindingIterator_ptr & bi){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      return;
#endif
    }

  protected:
    virtual void *_widenFromTheMostDerivedIntf(const char *repoId,CORBA::Boolean is_cxx_type_id) {
      return NamingContext::_widenFromTheMostDerivedIntf(repoId,is_cxx_type_id);
    }
  };

  class NamingContext_proxyObjectFactory : public CORBA::proxyObjectFactory {
  public:
    NamingContext_proxyObjectFactory () {}
    virtual ~NamingContext_proxyObjectFactory ();
    virtual const char *irRepoId() const;
    virtual CORBA::Object_ptr newProxyObject(Rope *r,CORBA::Octet *key,size_t keysize,IOP::TaggedProfileList *profiles,CORBA::Boolean release);
    virtual CORBA::Boolean is_a(const char *base_repoId) const;
    static NamingContext_ptr _nil() {
      if (!__nil_NamingContext) {
        __nil_NamingContext = new _nil_NamingContext;
      }
      return __nil_NamingContext;
    }
  private:
    static NamingContext_ptr __nil_NamingContext;
  };

  _CORBA_MODULE_VAR _dyn_attr const CORBA::TypeCode_ptr _tc_NamingContext;

#ifndef __CosNaming_mBindingIterator__
#define __CosNaming_mBindingIterator__
  class   BindingIterator;
  typedef BindingIterator* BindingIterator_ptr;
  typedef BindingIterator_ptr BindingIteratorRef;

  class BindingIterator_Helper {
    public:
    static BindingIterator_ptr _nil();
    static CORBA::Boolean is_nil(BindingIterator_ptr p);
    static void release(BindingIterator_ptr p);
    static void duplicate(BindingIterator_ptr p);
    static size_t NP_alignedSize(BindingIterator_ptr obj,size_t initialoffset);
    static void marshalObjRef(BindingIterator_ptr obj,NetBufferedStream &s);
    static BindingIterator_ptr unmarshalObjRef(NetBufferedStream &s);
    static void marshalObjRef(BindingIterator_ptr obj,MemBufferedStream &s);
    static BindingIterator_ptr unmarshalObjRef(MemBufferedStream &s);
  };
  typedef _CORBA_ObjRef_Var<BindingIterator,BindingIterator_Helper> BindingIterator_var;
  typedef _CORBA_ObjRef_OUT_arg<BindingIterator,BindingIterator_Helper > BindingIterator_out;

#endif
#define CosNaming_BindingIterator_IntfRepoID "IDL:omg.org/CosNaming/BindingIterator:1.0"

  class BindingIterator : public virtual omniObject, public virtual CORBA::Object {
  public:

    virtual CORBA::Boolean  _0RL__next_one(Binding *& b) = 0;
    CORBA::Boolean  next_one ( Binding_out  b )
    {
      return _0RL__next_one ( b._data );
    }
    virtual CORBA::Boolean  _0RL__next_n(CORBA::ULong  how_many, BindingList *& bl) = 0;
    CORBA::Boolean  next_n ( CORBA::ULong  how_many,
                                   BindingList_out  bl )
    {
      return _0RL__next_n ( how_many, bl._data );
    }
    virtual void destroy() = 0;
    typedef BindingIterator_var _var_type;
    typedef BindingIterator_ptr _ptr_type;
    static BindingIterator_ptr _duplicate(BindingIterator_ptr);
    static BindingIterator_ptr _narrow(CORBA::Object_ptr);
    static BindingIterator_ptr _nil();

    static inline size_t NP_alignedSize(BindingIterator_ptr obj,size_t initialoffset) {
      return CORBA::AlignedObjRef(obj,CosNaming_BindingIterator_IntfRepoID,42,initialoffset);
    }

    static inline void marshalObjRef(BindingIterator_ptr obj,NetBufferedStream &s) {
      CORBA::MarshalObjRef(obj,CosNaming_BindingIterator_IntfRepoID,42,s);
    }

    static inline BindingIterator_ptr unmarshalObjRef(NetBufferedStream &s) {
      CORBA::Object_ptr _obj = CORBA::UnMarshalObjRef(CosNaming_BindingIterator_IntfRepoID,s);
      BindingIterator_ptr _result = CosNaming::BindingIterator::_narrow(_obj);
      CORBA::release(_obj);
      return _result;
    }

    static inline void marshalObjRef(BindingIterator_ptr obj,MemBufferedStream &s) {
      CORBA::MarshalObjRef(obj,CosNaming_BindingIterator_IntfRepoID,42,s);
    }

    static inline BindingIterator_ptr unmarshalObjRef(MemBufferedStream &s) {
      CORBA::Object_ptr _obj = CORBA::UnMarshalObjRef(CosNaming_BindingIterator_IntfRepoID,s);
      BindingIterator_ptr _result = CosNaming::BindingIterator::_narrow(_obj);
      CORBA::release(_obj);
      return _result;
    }

    static CORBA::Boolean _0RL_is_a(const char *base_repoId);

  protected:

    BindingIterator() {
      if (!is_proxy())
        omniObject::PR_IRRepositoryId(CosNaming_BindingIterator_IntfRepoID);
      this->PR_setobj(this);
    }
    virtual ~BindingIterator();
    virtual void *_widenFromTheMostDerivedIntf(const char *repoId,CORBA::Boolean is_cxx_type_id=0);

  private:

    BindingIterator(const BindingIterator&);
    BindingIterator &operator=(const BindingIterator&);
  };

  class _sk_BindingIterator :  public virtual BindingIterator {
  public:

    _sk_BindingIterator() {}
    _sk_BindingIterator(const omniORB::objectKey& k);
    virtual ~_sk_BindingIterator();
    BindingIterator_ptr _this() { return BindingIterator::_duplicate(this); }
    void _obj_is_ready(CORBA::BOA_ptr boa) { boa->obj_is_ready(this); }
    CORBA::BOA_ptr _boa() { return CORBA::BOA::getBOA(); }
    void _dispose() { _boa()->dispose(this); }
    omniORB::objectKey _key();
    virtual CORBA::Boolean  next_one(Binding *& b) = 0;
    virtual CORBA::Boolean  _0RL__next_one(Binding *& b) {
      return next_one(b);
    }
    virtual CORBA::Boolean  next_n(CORBA::ULong  how_many, BindingList *& bl) = 0;
    virtual CORBA::Boolean  _0RL__next_n(CORBA::ULong  how_many, BindingList *& bl) {
      return next_n(how_many, bl);
    }
    virtual void destroy() = 0;
    virtual CORBA::Boolean dispatch(GIOP_S &s,const char *op,CORBA::Boolean response);

  protected:
    virtual void *_widenFromTheMostDerivedIntf(const char *repoId,CORBA::Boolean is_cxx_type_id) {
      return BindingIterator::_widenFromTheMostDerivedIntf(repoId,is_cxx_type_id);
    }
  private:
    _sk_BindingIterator (const _sk_BindingIterator&);
    _sk_BindingIterator &operator=(const _sk_BindingIterator&);
  };

  class _proxy_BindingIterator :  public virtual BindingIterator {
  public:

    _proxy_BindingIterator (Rope *r,CORBA::Octet *key,size_t keysize,IOP::TaggedProfileList *profiles,CORBA::Boolean release) :
      omniObject(CosNaming_BindingIterator_IntfRepoID,r,key,keysize,profiles,release) {
        omni::objectIsReady(this);
    }
    virtual ~_proxy_BindingIterator();
    virtual CORBA::Boolean  _0RL__next_one(Binding *& b);
    virtual CORBA::Boolean  _0RL__next_n(CORBA::ULong  how_many, BindingList *& bl);
    virtual void destroy();

  protected:

    _proxy_BindingIterator () {}

    virtual void *_widenFromTheMostDerivedIntf(const char *repoId,CORBA::Boolean is_cxx_type) {
      return BindingIterator::_widenFromTheMostDerivedIntf(repoId,is_cxx_type);
    }
  private:

    _proxy_BindingIterator (const _proxy_BindingIterator&);
    _proxy_BindingIterator &operator=(const _proxy_BindingIterator&);
  };

  class _nil_BindingIterator :   public virtual BindingIterator {
  public:
    _nil_BindingIterator() : omniObject(omniObject::nilObjectManager()) { this->PR_setobj(0); }
    virtual ~_nil_BindingIterator();
    CORBA::Boolean  _0RL__next_one(Binding *& b){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      CORBA::Boolean _0RL_result = 0;
      return _0RL_result;
#endif
    }

    CORBA::Boolean  _0RL__next_n(CORBA::ULong  how_many, BindingList *& bl){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      CORBA::Boolean _0RL_result = 0;
      return _0RL_result;
#endif
    }

    void destroy(){
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
#ifdef NEED_DUMMY_RETURN
      // never reach here! Dummy return to keep some compilers happy.
      return;
#endif
    }

  protected:
    virtual void *_widenFromTheMostDerivedIntf(const char *repoId,CORBA::Boolean is_cxx_type_id) {
      return BindingIterator::_widenFromTheMostDerivedIntf(repoId,is_cxx_type_id);
    }
  };

  class BindingIterator_proxyObjectFactory : public CORBA::proxyObjectFactory {
  public:
    BindingIterator_proxyObjectFactory () {}
    virtual ~BindingIterator_proxyObjectFactory ();
    virtual const char *irRepoId() const;
    virtual CORBA::Object_ptr newProxyObject(Rope *r,CORBA::Octet *key,size_t keysize,IOP::TaggedProfileList *profiles,CORBA::Boolean release);
    virtual CORBA::Boolean is_a(const char *base_repoId) const;
    static BindingIterator_ptr _nil() {
      if (!__nil_BindingIterator) {
        __nil_BindingIterator = new _nil_BindingIterator;
      }
      return __nil_BindingIterator;
    }
  private:
    static BindingIterator_ptr __nil_BindingIterator;
  };

  _CORBA_MODULE_VAR _dyn_attr const CORBA::TypeCode_ptr _tc_BindingIterator;


_CORBA_MODULE_END


#undef _core_attr
#undef _dyn_attr

extern void operator<<=(CORBA::Any& _a, const CosNaming::NameComponent& _s);
extern void operator<<=(CORBA::Any& _a, CosNaming::NameComponent* _sp);
extern CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::NameComponent*& _sp);
extern CORBA::Boolean operator>>=(const CORBA::Any& _a, const CosNaming::NameComponent*& _sp);

extern void operator <<= (CORBA::Any& a, const CosNaming::Name& s);
inline void operator <<= (CORBA::Any& a, CosNaming::Name* sp) {
  a <<= *sp;
  delete sp;
}
extern CORBA::Boolean operator >>= (const CORBA::Any& a, CosNaming::Name*& sp);
extern CORBA::Boolean operator >>= (const CORBA::Any& a, const CosNaming::Name*& sp);

inline void operator >>=(CosNaming::BindingType _e, NetBufferedStream& s) {
  ::operator>>=((CORBA::ULong)_e, s);
}

inline void operator <<= (CosNaming::BindingType& _e, NetBufferedStream& s) {
  CORBA::ULong _0RL_e;
  ::operator<<=(_0RL_e,s);
  switch (_0RL_e) {
    case CosNaming::nobject:
    case CosNaming::ncontext:
      _e = (CosNaming::BindingType) _0RL_e;
      break;
    default:
      _CORBA_marshal_error();
  }
}

inline void operator>>= (CosNaming::BindingType _e, MemBufferedStream& s) {
  ::operator>>=((CORBA::ULong)_e,s);
}

inline void operator<<= (CosNaming::BindingType& _e,MemBufferedStream& s) {
  CORBA::ULong _0RL_e;
  ::operator<<=(_0RL_e,s);
  switch (_0RL_e) {
    case CosNaming::nobject:
    case CosNaming::ncontext:
      _e = (CosNaming::BindingType) _0RL_e;
      break;
    default:
      _CORBA_marshal_error();
  }
}

void operator<<=(CORBA::Any& _a, CosNaming::BindingType _s);
CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::BindingType& _s);

extern void operator<<=(CORBA::Any& _a, const CosNaming::Binding& _s);
extern void operator<<=(CORBA::Any& _a, CosNaming::Binding* _sp);
extern CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::Binding*& _sp);
extern CORBA::Boolean operator>>=(const CORBA::Any& _a, const CosNaming::Binding*& _sp);

extern void operator <<= (CORBA::Any& a, const CosNaming::BindingList& s);
inline void operator <<= (CORBA::Any& a, CosNaming::BindingList* sp) {
  a <<= *sp;
  delete sp;
}
extern CORBA::Boolean operator >>= (const CORBA::Any& a, CosNaming::BindingList*& sp);
extern CORBA::Boolean operator >>= (const CORBA::Any& a, const CosNaming::BindingList*& sp);

inline void operator >>=(CosNaming::NamingContext::NotFoundReason _e, NetBufferedStream& s) {
  ::operator>>=((CORBA::ULong)_e, s);
}

inline void operator <<= (CosNaming::NamingContext::NotFoundReason& _e, NetBufferedStream& s) {
  CORBA::ULong _0RL_e;
  ::operator<<=(_0RL_e,s);
  switch (_0RL_e) {
    case CosNaming::NamingContext::missing_node:
    case CosNaming::NamingContext::not_context:
    case CosNaming::NamingContext::not_object:
      _e = (CosNaming::NamingContext::NotFoundReason) _0RL_e;
      break;
    default:
      _CORBA_marshal_error();
  }
}

inline void operator>>= (CosNaming::NamingContext::NotFoundReason _e, MemBufferedStream& s) {
  ::operator>>=((CORBA::ULong)_e,s);
}

inline void operator<<= (CosNaming::NamingContext::NotFoundReason& _e,MemBufferedStream& s) {
  CORBA::ULong _0RL_e;
  ::operator<<=(_0RL_e,s);
  switch (_0RL_e) {
    case CosNaming::NamingContext::missing_node:
    case CosNaming::NamingContext::not_context:
    case CosNaming::NamingContext::not_object:
      _e = (CosNaming::NamingContext::NotFoundReason) _0RL_e;
      break;
    default:
      _CORBA_marshal_error();
  }
}

void operator<<=(CORBA::Any& _a, CosNaming::NamingContext::NotFoundReason _s);
CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::NamingContext::NotFoundReason& _s);

void operator<<=(CORBA::Any& _a, const CosNaming::NamingContext::NotFound& _s);
void operator<<=(CORBA::Any& _a, const CosNaming::NamingContext::NotFound* _sp);
CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::NamingContext::NotFound*& _sp);

void operator<<=(CORBA::Any& _a, const CosNaming::NamingContext::CannotProceed& _s);
void operator<<=(CORBA::Any& _a, const CosNaming::NamingContext::CannotProceed* _sp);
CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::NamingContext::CannotProceed*& _sp);

void operator<<=(CORBA::Any& _a, const CosNaming::NamingContext::InvalidName& _s);
void operator<<=(CORBA::Any& _a, const CosNaming::NamingContext::InvalidName* _sp);
CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::NamingContext::InvalidName*& _sp);

void operator<<=(CORBA::Any& _a, const CosNaming::NamingContext::AlreadyBound& _s);
void operator<<=(CORBA::Any& _a, const CosNaming::NamingContext::AlreadyBound* _sp);
CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::NamingContext::AlreadyBound*& _sp);

void operator<<=(CORBA::Any& _a, const CosNaming::NamingContext::NotEmpty& _s);
void operator<<=(CORBA::Any& _a, const CosNaming::NamingContext::NotEmpty* _sp);
CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::NamingContext::NotEmpty*& _sp);


void operator<<=(CORBA::Any& _a, CosNaming::NamingContext_ptr _s);
void operator<<=(CORBA::Any& _a, CosNaming::NamingContext_ptr* _s);
CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::NamingContext_ptr& _s);


void operator<<=(CORBA::Any& _a, CosNaming::BindingIterator_ptr _s);
void operator<<=(CORBA::Any& _a, CosNaming::BindingIterator_ptr* _s);
CORBA::Boolean operator>>=(const CORBA::Any& _a, CosNaming::BindingIterator_ptr& _s);

#endif // __Naming_hh__
