#ifndef __bootstrap_hh__
#define __bootstrap_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 _LC_attr
# error "A local CPP macro _LC_attr has already been defined."
#else
# ifdef  USE_stub_in_nt_dll
#  define _LC_attr _OMNIORB_NTDLL_IMPORT
# else
#  define _LC_attr
# endif
#endif

#ifndef __CORBA__InitialReferences__
#define __CORBA__InitialReferences__
class   CORBA_InitialReferences;
typedef CORBA_InitialReferences* CORBA_InitialReferences_ptr;
typedef CORBA_InitialReferences_ptr CORBA_InitialReferencesRef;

class CORBA_InitialReferences_Helper {
  public:
  static CORBA_InitialReferences_ptr _nil();
  static CORBA::Boolean is_nil(CORBA_InitialReferences_ptr p);
  static void release(CORBA_InitialReferences_ptr p);
  static void duplicate(CORBA_InitialReferences_ptr p);
  static size_t NP_alignedSize(CORBA_InitialReferences_ptr obj,size_t initialoffset);
  static void marshalObjRef(CORBA_InitialReferences_ptr obj,NetBufferedStream &s);
  static CORBA_InitialReferences_ptr unmarshalObjRef(NetBufferedStream &s);
  static void marshalObjRef(CORBA_InitialReferences_ptr obj,MemBufferedStream &s);
  static CORBA_InitialReferences_ptr unmarshalObjRef(MemBufferedStream &s);
};
typedef _CORBA_ObjRef_Var<CORBA_InitialReferences,CORBA_InitialReferences_Helper> CORBA_InitialReferences_var;

#endif
#define CORBA_InitialReferences_IntfRepoID "omg.org/CORBA/InitialReferences:1.0"

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

  static _LC_attr const CORBA::TypeCode_ptr _tc_ObjId;
  typedef char* ObjId;
  typedef CORBA::String_var ObjId_var;
  static _LC_attr const CORBA::TypeCode_ptr _tc_ObjIdList;
  typedef _CORBA_Unbounded_Sequence<CORBA::String_member > ObjIdList;
  typedef _CORBA_Sequence_Var<ObjIdList, CORBA::String_member > ObjIdList_var;

  virtual CORBA::Object_ptr  get(const char*  id) = 0;
  virtual ObjIdList * list() = 0;
  static CORBA_InitialReferences_ptr _duplicate(CORBA_InitialReferences_ptr);
  static CORBA_InitialReferences_ptr _narrow(CORBA::Object_ptr);
  static CORBA_InitialReferences_ptr _nil();

  static inline size_t NP_alignedSize(CORBA_InitialReferences_ptr obj,size_t initialoffset) {
    return CORBA::AlignedObjRef(obj,CORBA_InitialReferences_IntfRepoID,36,initialoffset);
  }

  static inline void marshalObjRef(CORBA_InitialReferences_ptr obj,NetBufferedStream &s) {
    CORBA::MarshalObjRef(obj,CORBA_InitialReferences_IntfRepoID,36,s);
  }

  static inline CORBA_InitialReferences_ptr unmarshalObjRef(NetBufferedStream &s) {
    CORBA::Object_ptr _obj = CORBA::UnMarshalObjRef(CORBA_InitialReferences_IntfRepoID,s);
    CORBA_InitialReferences_ptr _result = CORBA_InitialReferences::_narrow(_obj);
    CORBA::release(_obj);
    return _result;
  }

  static inline void marshalObjRef(CORBA_InitialReferences_ptr obj,MemBufferedStream &s) {
    CORBA::MarshalObjRef(obj,CORBA_InitialReferences_IntfRepoID,36,s);
  }

  static inline CORBA_InitialReferences_ptr unmarshalObjRef(MemBufferedStream &s) {
    CORBA::Object_ptr _obj = CORBA::UnMarshalObjRef(CORBA_InitialReferences_IntfRepoID,s);
    CORBA_InitialReferences_ptr _result = CORBA_InitialReferences::_narrow(_obj);
    CORBA::release(_obj);
    return _result;
  }

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

protected:

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

private:

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

class _sk_CORBA_InitialReferences :  public virtual CORBA_InitialReferences {
public:

  _sk_CORBA_InitialReferences() {}
  _sk_CORBA_InitialReferences(const omniORB::objectKey& k);
  virtual ~_sk_CORBA_InitialReferences() {}
  CORBA_InitialReferences_ptr _this() { return CORBA_InitialReferences::_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::Object_ptr  get(const char*  id) = 0;
  virtual ObjIdList * list() = 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 CORBA_InitialReferences::_widenFromTheMostDerivedIntf(repoId,is_cxx_type_id);
  }
private:
  _sk_CORBA_InitialReferences (const _sk_CORBA_InitialReferences&);
  _sk_CORBA_InitialReferences &operator=(const _sk_CORBA_InitialReferences&);
};

class _proxy_CORBA_InitialReferences :  public virtual CORBA_InitialReferences {
public:

  _proxy_CORBA_InitialReferences (Rope *r,CORBA::Octet *key,size_t keysize,IOP::TaggedProfileList *profiles,CORBA::Boolean release) :
    omniObject(CORBA_InitialReferences_IntfRepoID,r,key,keysize,profiles,release) {
      omni::objectIsReady(this);
  }
  virtual ~_proxy_CORBA_InitialReferences() {}
  virtual CORBA::Object_ptr  get(const char*  id);
  virtual ObjIdList * list();

protected:

  _proxy_CORBA_InitialReferences () {}

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

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

class _nil_CORBA_InitialReferences : public virtual CORBA_InitialReferences {
public:
  _nil_CORBA_InitialReferences() : omniObject(omniObject::nilObjectManager()) { this->PR_setobj(0); }
  virtual ~_nil_CORBA_InitialReferences() {}
  CORBA::Object_ptr  get(const char*  id){
    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
  }

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

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

class CORBA_InitialReferences_proxyObjectFactory : public proxyObjectFactory {
public:
  CORBA_InitialReferences_proxyObjectFactory () {}
  virtual ~CORBA_InitialReferences_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 CORBA_InitialReferences_ptr _nil() {
    if (!__nil_CORBA_InitialReferences) {
      __nil_CORBA_InitialReferences = new _nil_CORBA_InitialReferences;
    }
    return __nil_CORBA_InitialReferences;
  }
private:
  static CORBA_InitialReferences_ptr __nil_CORBA_InitialReferences;
};

_CORBA_GLOBAL_VAR const CORBA::TypeCode_ptr _tc_CORBA_InitialReferences;

#ifndef __0RL_seq_any_s0_cstring__
#define __0RL_seq_any_s0_cstring__
#define __0RL_seq_anyimpl_CORBA__InitialReferences_mObjIdList__
extern void _0RL_seq_anyinsert_CORBA__InitialReferences_mObjIdList(CORBA::Any&, const _CORBA_Unbounded_Sequence<CORBA::String_member >&);

inline void operator<<=(CORBA::Any& a, const _CORBA_Unbounded_Sequence<CORBA::String_member >& s)
{
  _0RL_seq_anyinsert_CORBA__InitialReferences_mObjIdList(a, s);
}

inline void operator<<=(CORBA::Any& a, _CORBA_Unbounded_Sequence<CORBA::String_member >* sp)
{
  _0RL_seq_anyinsert_CORBA__InitialReferences_mObjIdList(a, *sp);
  delete sp;
}

extern CORBA::Boolean _0RL_seq_anyextract_CORBA__InitialReferences_mObjIdList(const CORBA::Any&, _CORBA_Unbounded_Sequence<CORBA::String_member >*&);

inline CORBA::Boolean operator>>=(const CORBA::Any& a, _CORBA_Unbounded_Sequence<CORBA::String_member >*& sp)
{
  return _0RL_seq_anyextract_CORBA__InitialReferences_mObjIdList(a, sp);
}

#endif


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


#undef _LC_attr

#endif // __bootstrap_hh__
