// This file is generated by omniidl2- omniORB_2_8. Do not edit.
#include "omniLifeCycle.hh"
#include <omniORB2/proxyCall.h>

static const char* _0RL_library_version = omniORB_2_8;


omniLifeCycleInfo::~omniLifeCycleInfo () {}

_sk_omniLifeCycleInfo::~_sk_omniLifeCycleInfo () {}

_proxy_omniLifeCycleInfo::~_proxy_omniLifeCycleInfo () {}

_nil_omniLifeCycleInfo::~_nil_omniLifeCycleInfo () {}

omniLifeCycleInfo_proxyObjectFactory::~omniLifeCycleInfo_proxyObjectFactory () {}

// Proxy call descriptor class. Mangled signature:
//  void_i_cCORBA_sObject
class _0RL_pc_ff0e03829d93c64e_00000000
  : public OmniProxyCallDesc
{
public:
  inline _0RL_pc_ff0e03829d93c64e_00000000(const char* _op, size_t _op_len, CORBA::Object_ptr _a_obj) :
    OmniProxyCallDesc(_op, _op_len),
    arg_obj(_a_obj)  {}

  virtual CORBA::ULong alignedSize(CORBA::ULong size_in);
  virtual void marshalArguments(GIOP_C&);

private:
  CORBA::Object_ptr arg_obj;
};

CORBA::ULong _0RL_pc_ff0e03829d93c64e_00000000::alignedSize(CORBA::ULong msgsize)
{
  msgsize = CORBA::Object_Helper::NP_alignedSize(arg_obj,msgsize);
  return msgsize;
}

void _0RL_pc_ff0e03829d93c64e_00000000::marshalArguments(GIOP_C& giop_client)
{
  CORBA::Object_Helper::marshalObjRef(arg_obj,giop_client);
}

void _proxy_omniLifeCycleInfo::reportMove(CORBA::Object_ptr  obj)
{
  _0RL_pc_ff0e03829d93c64e_00000000 _call_desc("reportMove", 11, obj);

  OmniProxyCallWrapper::invoke(this, _call_desc);
}



void _proxy_omniLifeCycleInfo::reportRemove()
{
  OmniProxyCallWrapper::void_call _call_desc("reportRemove", 13);

  OmniProxyCallWrapper::invoke(this, _call_desc);
}



// Proxy call descriptor class. Mangled signature:
//  _cCORBA_sObject
class _0RL_pc_ff0e03829d93c64e_10000000
  : public OmniProxyCallDesc
{
public:
  inline _0RL_pc_ff0e03829d93c64e_10000000(const char* _op, size_t _op_len) :
    OmniProxyCallDesc(_op, _op_len)  {}

  virtual void unmarshalReturnedValues(GIOP_C&);
  inline CORBA::Object_ptr result() { return pd_result; }

private:
  CORBA::Object_ptr pd_result;
};

void _0RL_pc_ff0e03829d93c64e_10000000::unmarshalReturnedValues(GIOP_C& giop_client)
{
  pd_result = CORBA::Object_Helper::unmarshalObjRef(giop_client);
}

CORBA::Object_ptr _proxy_omniLifeCycleInfo::homeObject()
{
  _0RL_pc_ff0e03829d93c64e_10000000 _call_desc("_get_homeObject", 16);

  OmniProxyCallWrapper::invoke(this, _call_desc);
  return _call_desc.result();
}



CORBA::Boolean
_sk_omniLifeCycleInfo::dispatch(GIOP_S &_0RL_s,const char *_0RL_op,CORBA::Boolean _0RL_response_expected)
{
  if (strcmp(_0RL_op,"reportMove") == 0)
  {
    CORBA::Object_var obj;
    obj = CORBA::Object_Helper::unmarshalObjRef(_0RL_s);
    _0RL_s.RequestReceived();
        reportMove(obj);
    size_t _0RL_msgsize = (size_t) GIOP_S::ReplyHeaderSize();
    _0RL_s.InitialiseReply(GIOP::NO_EXCEPTION,(CORBA::ULong)_0RL_msgsize);
    _0RL_s.ReplyCompleted();
    return 1;
  }
  else if (strcmp(_0RL_op,"reportRemove") == 0)
  {
    _0RL_s.RequestReceived();
        reportRemove();
    size_t _0RL_msgsize = (size_t) GIOP_S::ReplyHeaderSize();
    _0RL_s.InitialiseReply(GIOP::NO_EXCEPTION,(CORBA::ULong)_0RL_msgsize);
    _0RL_s.ReplyCompleted();
    return 1;
  }
  else if (strcmp(_0RL_op,"_get_homeObject") == 0)
  {
    if (!_0RL_response_expected) {
      throw CORBA::BAD_OPERATION(0,CORBA::COMPLETED_NO);
    }
    _0RL_s.RequestReceived();
    CORBA::Object_var _0RL_result = homeObject();
    size_t _0RL_msgsize = (size_t) GIOP_S::ReplyHeaderSize();
    _0RL_msgsize = CORBA::Object_Helper::NP_alignedSize((_0RL_result.operator->()),_0RL_msgsize);
    _0RL_s.InitialiseReply(GIOP::NO_EXCEPTION,(CORBA::ULong)_0RL_msgsize);
    CORBA::Object_Helper::marshalObjRef((_0RL_result.operator->()),_0RL_s);
    _0RL_s.ReplyCompleted();
    return 1;
  }
  else {
    return 0;
  }
}

_sk_omniLifeCycleInfo::_sk_omniLifeCycleInfo (const omniORB::objectKey& k)
{
  omniRopeAndKey l(0,(CORBA::Octet*)&k,(CORBA::ULong)sizeof(k));
  setRopeAndKey(l,0);
}

omniORB::objectKey
_sk_omniLifeCycleInfo::_key()
{
  omniRopeAndKey l;
  getRopeAndKey(l);
  return (*((omniORB::objectKey*)l.key()));
}

omniLifeCycleInfo_ptr
omniLifeCycleInfo::_duplicate(omniLifeCycleInfo_ptr obj)
{
  if (CORBA::is_nil(obj))
    return omniLifeCycleInfo::_nil();
  CORBA::Object::_duplicate(obj);
  return obj;
}

omniLifeCycleInfo_ptr
omniLifeCycleInfo::_narrow(CORBA::Object_ptr obj)
{
  if (CORBA::is_nil(obj))
    return omniLifeCycleInfo::_nil();
  omniLifeCycleInfo_ptr e = (omniLifeCycleInfo_ptr) (obj->PR_getobj()->_realNarrow(omniLifeCycleInfo_IntfRepoID));
  if (e)
    return e;
  else
    return omniLifeCycleInfo::_nil();
}

void *
omniLifeCycleInfo::_widenFromTheMostDerivedIntf(const char *repoId,CORBA::Boolean is_cxx_type_id)
{
  if (is_cxx_type_id) return 0;
  if (!repoId)
    return (void *)((CORBA::Object_ptr)this);
  if (strcmp(omniLifeCycleInfo_IntfRepoID,repoId) == 0)
    return (void *)this;
  else {
    return 0;
  }
}

CORBA::Boolean
omniLifeCycleInfo::_0RL_is_a(const char *base_repoId) {
  if (strcmp(base_repoId,(const char *)omniLifeCycleInfo_IntfRepoID)==0)
    return 1;
  else
    return 0;
}

omniLifeCycleInfo_ptr
omniLifeCycleInfo_Helper::_nil() {
  return omniLifeCycleInfo::_nil();
}

CORBA::Boolean
omniLifeCycleInfo_Helper::is_nil(omniLifeCycleInfo_ptr p) {
  return CORBA::is_nil(p);
}

void
omniLifeCycleInfo_Helper::release(omniLifeCycleInfo_ptr p) {
  CORBA::release(p);
}

void
omniLifeCycleInfo_Helper::duplicate(omniLifeCycleInfo_ptr p) {
  CORBA::Object::_duplicate(p);
}

size_t
omniLifeCycleInfo_Helper::NP_alignedSize(omniLifeCycleInfo_ptr obj,size_t initialoffset) {
  return omniLifeCycleInfo::NP_alignedSize(obj,initialoffset);
}

void
omniLifeCycleInfo_Helper::marshalObjRef(omniLifeCycleInfo_ptr obj,NetBufferedStream &s) {
  omniLifeCycleInfo::marshalObjRef(obj,s);
}

omniLifeCycleInfo_ptr omniLifeCycleInfo_Helper::unmarshalObjRef(NetBufferedStream &s) {
  return omniLifeCycleInfo::unmarshalObjRef(s);
}

void
omniLifeCycleInfo_Helper::marshalObjRef(omniLifeCycleInfo_ptr obj,MemBufferedStream &s) {
  omniLifeCycleInfo::marshalObjRef(obj,s);
}

omniLifeCycleInfo_ptr omniLifeCycleInfo_Helper::unmarshalObjRef(MemBufferedStream &s) {
  return omniLifeCycleInfo::unmarshalObjRef(s);
}

const char *
omniLifeCycleInfo_proxyObjectFactory::irRepoId() const
{
  return (const char *)omniLifeCycleInfo_IntfRepoID;
}

CORBA::Object_ptr
omniLifeCycleInfo_proxyObjectFactory::newProxyObject(Rope *r,CORBA::Octet *key,size_t keysize,IOP::TaggedProfileList *profiles,CORBA::Boolean release)
{
  _proxy_omniLifeCycleInfo *p = new _proxy_omniLifeCycleInfo(r,key,keysize,profiles,release);
  if (!p) {
    throw CORBA::NO_MEMORY(0,CORBA::COMPLETED_NO);
  }
  return (CORBA::Object_ptr) p;
}

CORBA::Boolean
omniLifeCycleInfo_proxyObjectFactory::is_a(const char *base_repoId) const
{
  return omniLifeCycleInfo::_0RL_is_a(base_repoId);

}

omniLifeCycleInfo_ptr
omniLifeCycleInfo::_nil() {
  return omniLifeCycleInfo_proxyObjectFactory::_nil();
}

static const omniLifeCycleInfo_proxyObjectFactory omniLifeCycleInfo_proxyObjectFactory;
omniLifeCycleInfo_ptr omniLifeCycleInfo_proxyObjectFactory::__nil_omniLifeCycleInfo = 0;

