// This file is generated by omniidl (C++ backend) - omniORB_4_3. Do not edit.

#include "CosTime.hh"
#include <omniORB4/IOP_S.h>
#include <omniORB4/IOP_C.h>
#include <omniORB4/callDescriptor.h>
#include <omniORB4/callHandle.h>
#include <omniORB4/objTracker.h>


OMNI_USING_NAMESPACE(omni)

OMNI_MAYBE_UNUSED static const char* _0RL_library_version = omniORB_4_3;



::CORBA::Exception::insertExceptionToAny CosTime::TimeUnavailable::insertToAnyFn = 0;
::CORBA::Exception::insertExceptionToAnyNCP CosTime::TimeUnavailable::insertToAnyFnNCP = 0;

CosTime::TimeUnavailable::TimeUnavailable(const CosTime::TimeUnavailable& _s) : ::CORBA::UserException(_s)
{
  
}



CosTime::TimeUnavailable& CosTime::TimeUnavailable::operator=(const CosTime::TimeUnavailable& _s)
{
  if (&_s != this) {
    ((::CORBA::UserException*) this)->operator=(_s);
    
  }
  return *this;
}

CosTime::TimeUnavailable::~TimeUnavailable() {}

void CosTime::TimeUnavailable::_raise() const { throw *this; }

const char* CosTime::TimeUnavailable::_PD_repoId = "IDL:omg.org/CosTime/TimeUnavailable:1.0";
const char* CosTime::TimeUnavailable::_PD_typeId = "Exception/UserException/CosTime::TimeUnavailable";

CosTime::TimeUnavailable* CosTime::TimeUnavailable::_downcast(::CORBA::Exception* _e) {
  return (TimeUnavailable*) _NP_is_a(_e, _PD_typeId);
}

const CosTime::TimeUnavailable* CosTime::TimeUnavailable::_downcast(const ::CORBA::Exception* _e) {
  return (const TimeUnavailable*) _NP_is_a(_e, _PD_typeId);
}

::CORBA::Exception* CosTime::TimeUnavailable::_NP_duplicate() const {
  return new TimeUnavailable(*this);
}

const char* CosTime::TimeUnavailable::_NP_typeId() const {
  return _PD_typeId;
}

const char* CosTime::TimeUnavailable::_NP_repoId(int* _size) const {
  *_size = sizeof("IDL:omg.org/CosTime/TimeUnavailable:1.0");
  return _PD_repoId;
}
 
void CosTime::TimeUnavailable::_NP_marshal(cdrStream& _s) const {
  *this >>= _s;
}

CosTime::UTO_ptr CosTime::UTO_Helper::_nil() {
  return ::CosTime::UTO::_nil();
}

::CORBA::Boolean CosTime::UTO_Helper::is_nil(::CosTime::UTO_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosTime::UTO_Helper::release(::CosTime::UTO_ptr p) {
  ::CORBA::release(p);
}

void CosTime::UTO_Helper::marshalObjRef(::CosTime::UTO_ptr obj, cdrStream& s) {
  ::CosTime::UTO::_marshalObjRef(obj, s);
}

CosTime::UTO_ptr CosTime::UTO_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosTime::UTO::_unmarshalObjRef(s);
}

void CosTime::UTO_Helper::duplicate(::CosTime::UTO_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosTime::UTO_ptr
CosTime::UTO::_duplicate(::CosTime::UTO_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosTime::UTO_ptr
CosTime::UTO::_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_realNarrow(_PD_repoId);
  return e ? e : _nil();
}


CosTime::UTO_ptr
CosTime::UTO::_unchecked_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosTime::UTO_ptr
CosTime::UTO::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_UTO _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_UTO* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_UTO;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosTime::UTO::_PD_repoId = "IDL:omg.org/CosTime/UTO:1.0";


CosTime::_objref_UTO::~_objref_UTO() {
  
}


CosTime::_objref_UTO::_objref_UTO(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosTime::UTO::_PD_repoId, ior, id, 1)
   
   
{
  _PR_setobj(this);
}

void*
CosTime::_objref_UTO::_ptrToObjRef(const char* id)
{
  if (id == ::CosTime::UTO::_PD_repoId)
    return (::CosTime::UTO_ptr) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosTime::UTO::_PD_repoId))
    return (::CosTime::UTO_ptr) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosTime::UTO::_get_time

// Proxy call descriptor class. Mangled signature:
//  _cunsigned_plonglong
class _0RL_cd_99dff546ea0f9974_00000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_00000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  TimeBase::TimeT result;
};

void _0RL_cd_99dff546ea0f9974_00000000::marshalReturnedValues(cdrStream& _n)
{
  result >>= _n;

}

void _0RL_cd_99dff546ea0f9974_00000000::unmarshalReturnedValues(cdrStream& _n)
{
  (TimeBase::TimeT&)result <<= _n;

}

const char* const _0RL_cd_99dff546ea0f9974_00000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_10000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_00000000* tcd = (_0RL_cd_99dff546ea0f9974_00000000*)cd;
  CosTime::_impl_UTO* impl = (CosTime::_impl_UTO*) svnt->_ptrToInterface(CosTime::UTO::_PD_repoId);
  tcd->result = impl->time();


}

TimeBase::TimeT CosTime::_objref_UTO::time()
{
  _0RL_cd_99dff546ea0f9974_00000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_10000000, "_get_time", 10);


  _invoke(_call_desc);
  return _call_desc.result;


}


//
// Code for CosTime::UTO::_get_inaccuracy

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_20000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_00000000* tcd = (_0RL_cd_99dff546ea0f9974_00000000*)cd;
  CosTime::_impl_UTO* impl = (CosTime::_impl_UTO*) svnt->_ptrToInterface(CosTime::UTO::_PD_repoId);
  tcd->result = impl->inaccuracy();


}

TimeBase::InaccuracyT CosTime::_objref_UTO::inaccuracy()
{
  _0RL_cd_99dff546ea0f9974_00000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_20000000, "_get_inaccuracy", 16);


  _invoke(_call_desc);
  return _call_desc.result;


}


//
// Code for CosTime::UTO::_get_tdf

// Proxy call descriptor class. Mangled signature:
//  _cshort
class _0RL_cd_99dff546ea0f9974_30000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_30000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  TimeBase::TdfT result;
};

void _0RL_cd_99dff546ea0f9974_30000000::marshalReturnedValues(cdrStream& _n)
{
  result >>= _n;

}

void _0RL_cd_99dff546ea0f9974_30000000::unmarshalReturnedValues(cdrStream& _n)
{
  (TimeBase::TdfT&)result <<= _n;

}

const char* const _0RL_cd_99dff546ea0f9974_30000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_40000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_30000000* tcd = (_0RL_cd_99dff546ea0f9974_30000000*)cd;
  CosTime::_impl_UTO* impl = (CosTime::_impl_UTO*) svnt->_ptrToInterface(CosTime::UTO::_PD_repoId);
  tcd->result = impl->tdf();


}

TimeBase::TdfT CosTime::_objref_UTO::tdf()
{
  _0RL_cd_99dff546ea0f9974_30000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_40000000, "_get_tdf", 9);


  _invoke(_call_desc);
  return _call_desc.result;


}


//
// Code for CosTime::UTO::_get_utc_time

// Proxy call descriptor class. Mangled signature:
//  _cTimeBase_mUtcT
class _0RL_cd_99dff546ea0f9974_50000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_50000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  TimeBase::UtcT result;
};

void _0RL_cd_99dff546ea0f9974_50000000::marshalReturnedValues(cdrStream& _n)
{
  (const TimeBase::UtcT&) result >>= _n;

}

void _0RL_cd_99dff546ea0f9974_50000000::unmarshalReturnedValues(cdrStream& _n)
{
  (TimeBase::UtcT&)result <<= _n;

}

const char* const _0RL_cd_99dff546ea0f9974_50000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_60000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_50000000* tcd = (_0RL_cd_99dff546ea0f9974_50000000*)cd;
  CosTime::_impl_UTO* impl = (CosTime::_impl_UTO*) svnt->_ptrToInterface(CosTime::UTO::_PD_repoId);
  tcd->result = impl->utc_time();


}

TimeBase::UtcT CosTime::_objref_UTO::utc_time()
{
  _0RL_cd_99dff546ea0f9974_50000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_60000000, "_get_utc_time", 14);


  _invoke(_call_desc);
  return _call_desc.result;


}


//
// Code for CosTime::UTO::absolute_time

// Proxy call descriptor class. Mangled signature:
//  _cCosTime_mUTO
class _0RL_cd_99dff546ea0f9974_70000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_70000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosTime::UTO_var result;
};

void _0RL_cd_99dff546ea0f9974_70000000::marshalReturnedValues(cdrStream& _n)
{
  CosTime::UTO::_marshalObjRef(result,_n);

}

void _0RL_cd_99dff546ea0f9974_70000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosTime::UTO::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_99dff546ea0f9974_70000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_80000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_70000000* tcd = (_0RL_cd_99dff546ea0f9974_70000000*)cd;
  CosTime::_impl_UTO* impl = (CosTime::_impl_UTO*) svnt->_ptrToInterface(CosTime::UTO::_PD_repoId);
  tcd->result = impl->absolute_time();


}

CosTime::UTO_ptr CosTime::_objref_UTO::absolute_time()
{
  _0RL_cd_99dff546ea0f9974_70000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_80000000, "absolute_time", 14);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosTime::UTO::compare_time

// Proxy call descriptor class. Mangled signature:
//  _cCosTime_mTimeComparison_i_cCosTime_mComparisonType_i_cCosTime_mUTO
class _0RL_cd_99dff546ea0f9974_90000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_90000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosTime::ComparisonType arg_0;
  CosTime::UTO_var arg_1_;
  CosTime::UTO_ptr arg_1;
  CosTime::TimeComparison result;
};

void _0RL_cd_99dff546ea0f9974_90000000::marshalArguments(cdrStream& _n)
{
  arg_0 >>= _n;
  CosTime::UTO::_marshalObjRef(arg_1,_n);

}

void _0RL_cd_99dff546ea0f9974_90000000::unmarshalArguments(cdrStream& _n)
{
  (CosTime::ComparisonType&)arg_0 <<= _n;
  arg_1_ = CosTime::UTO::_unmarshalObjRef(_n);
  arg_1 = arg_1_.in();

}

void _0RL_cd_99dff546ea0f9974_90000000::marshalReturnedValues(cdrStream& _n)
{
  result >>= _n;

}

void _0RL_cd_99dff546ea0f9974_90000000::unmarshalReturnedValues(cdrStream& _n)
{
  (CosTime::TimeComparison&)result <<= _n;

}

const char* const _0RL_cd_99dff546ea0f9974_90000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_a0000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_90000000* tcd = (_0RL_cd_99dff546ea0f9974_90000000*)cd;
  CosTime::_impl_UTO* impl = (CosTime::_impl_UTO*) svnt->_ptrToInterface(CosTime::UTO::_PD_repoId);
  tcd->result = impl->compare_time(tcd->arg_0, tcd->arg_1);


}

CosTime::TimeComparison CosTime::_objref_UTO::compare_time(::CosTime::ComparisonType comparison_type, ::CosTime::UTO_ptr uto)
{
  _0RL_cd_99dff546ea0f9974_90000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_a0000000, "compare_time", 13);
  _call_desc.arg_0 = comparison_type;
  _call_desc.arg_1 = uto;

  _invoke(_call_desc);
  return _call_desc.result;


}


//
// Code for CosTime::UTO::time_to_interval

// Proxy call descriptor class. Mangled signature:
//  _cCosTime_mTIO_i_cCosTime_mUTO
class _0RL_cd_99dff546ea0f9974_b0000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_b0000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosTime::UTO_var arg_0_;
  CosTime::UTO_ptr arg_0;
  CosTime::TIO_var result;
};

void _0RL_cd_99dff546ea0f9974_b0000000::marshalArguments(cdrStream& _n)
{
  CosTime::UTO::_marshalObjRef(arg_0,_n);

}

void _0RL_cd_99dff546ea0f9974_b0000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = CosTime::UTO::_unmarshalObjRef(_n);
  arg_0 = arg_0_.in();

}

void _0RL_cd_99dff546ea0f9974_b0000000::marshalReturnedValues(cdrStream& _n)
{
  CosTime::TIO_Helper::marshalObjRef(result,_n);

}

void _0RL_cd_99dff546ea0f9974_b0000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosTime::TIO_Helper::unmarshalObjRef(_n);

}

const char* const _0RL_cd_99dff546ea0f9974_b0000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_c0000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_b0000000* tcd = (_0RL_cd_99dff546ea0f9974_b0000000*)cd;
  CosTime::_impl_UTO* impl = (CosTime::_impl_UTO*) svnt->_ptrToInterface(CosTime::UTO::_PD_repoId);
  tcd->result = impl->time_to_interval(tcd->arg_0);


}

CosTime::TIO_ptr CosTime::_objref_UTO::time_to_interval(::CosTime::UTO_ptr uto)
{
  _0RL_cd_99dff546ea0f9974_b0000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_c0000000, "time_to_interval", 17);
  _call_desc.arg_0 = uto;

  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosTime::UTO::interval

// Proxy call descriptor class. Mangled signature:
//  _cCosTime_mTIO
class _0RL_cd_99dff546ea0f9974_d0000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_d0000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosTime::TIO_var result;
};

void _0RL_cd_99dff546ea0f9974_d0000000::marshalReturnedValues(cdrStream& _n)
{
  CosTime::TIO_Helper::marshalObjRef(result,_n);

}

void _0RL_cd_99dff546ea0f9974_d0000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosTime::TIO_Helper::unmarshalObjRef(_n);

}

const char* const _0RL_cd_99dff546ea0f9974_d0000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_e0000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_d0000000* tcd = (_0RL_cd_99dff546ea0f9974_d0000000*)cd;
  CosTime::_impl_UTO* impl = (CosTime::_impl_UTO*) svnt->_ptrToInterface(CosTime::UTO::_PD_repoId);
  tcd->result = impl->interval();


}

CosTime::TIO_ptr CosTime::_objref_UTO::interval()
{
  _0RL_cd_99dff546ea0f9974_d0000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_e0000000, "interval", 9);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}

CosTime::_pof_UTO::~_pof_UTO() {}


omniObjRef*
CosTime::_pof_UTO::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosTime::_objref_UTO(ior, id);
}


::CORBA::Boolean
CosTime::_pof_UTO::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosTime::UTO::_PD_repoId))
    return 1;
  
  return 0;
}

const CosTime::_pof_UTO _the_pof_CosTime_mUTO;

CosTime::_impl_UTO::~_impl_UTO() {}


::CORBA::Boolean
CosTime::_impl_UTO::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "_get_time")) {

    _0RL_cd_99dff546ea0f9974_00000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_10000000, "_get_time", 10, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "_get_inaccuracy")) {

    _0RL_cd_99dff546ea0f9974_00000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_20000000, "_get_inaccuracy", 16, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "_get_tdf")) {

    _0RL_cd_99dff546ea0f9974_30000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_40000000, "_get_tdf", 9, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "_get_utc_time")) {

    _0RL_cd_99dff546ea0f9974_50000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_60000000, "_get_utc_time", 14, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "absolute_time")) {

    _0RL_cd_99dff546ea0f9974_70000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_80000000, "absolute_time", 14, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "compare_time")) {

    _0RL_cd_99dff546ea0f9974_90000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_a0000000, "compare_time", 13, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "time_to_interval")) {

    _0RL_cd_99dff546ea0f9974_b0000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_c0000000, "time_to_interval", 17, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "interval")) {

    _0RL_cd_99dff546ea0f9974_d0000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_e0000000, "interval", 9, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }


  return 0;
}

void*
CosTime::_impl_UTO::_ptrToInterface(const char* id)
{
  if (id == ::CosTime::UTO::_PD_repoId)
    return (::CosTime::_impl_UTO*) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosTime::UTO::_PD_repoId))
    return (::CosTime::_impl_UTO*) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosTime::_impl_UTO::_mostDerivedRepoId()
{
  return ::CosTime::UTO::_PD_repoId;
}

CosTime::TIO_ptr CosTime::TIO_Helper::_nil() {
  return ::CosTime::TIO::_nil();
}

::CORBA::Boolean CosTime::TIO_Helper::is_nil(::CosTime::TIO_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosTime::TIO_Helper::release(::CosTime::TIO_ptr p) {
  ::CORBA::release(p);
}

void CosTime::TIO_Helper::marshalObjRef(::CosTime::TIO_ptr obj, cdrStream& s) {
  ::CosTime::TIO::_marshalObjRef(obj, s);
}

CosTime::TIO_ptr CosTime::TIO_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosTime::TIO::_unmarshalObjRef(s);
}

void CosTime::TIO_Helper::duplicate(::CosTime::TIO_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosTime::TIO_ptr
CosTime::TIO::_duplicate(::CosTime::TIO_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosTime::TIO_ptr
CosTime::TIO::_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_realNarrow(_PD_repoId);
  return e ? e : _nil();
}


CosTime::TIO_ptr
CosTime::TIO::_unchecked_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosTime::TIO_ptr
CosTime::TIO::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_TIO _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_TIO* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_TIO;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosTime::TIO::_PD_repoId = "IDL:omg.org/CosTime/TIO:1.0";


CosTime::_objref_TIO::~_objref_TIO() {
  
}


CosTime::_objref_TIO::_objref_TIO(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosTime::TIO::_PD_repoId, ior, id, 1)
   
   
{
  _PR_setobj(this);
}

void*
CosTime::_objref_TIO::_ptrToObjRef(const char* id)
{
  if (id == ::CosTime::TIO::_PD_repoId)
    return (::CosTime::TIO_ptr) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosTime::TIO::_PD_repoId))
    return (::CosTime::TIO_ptr) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosTime::TIO::_get_time_interval

// Proxy call descriptor class. Mangled signature:
//  _cTimeBase_mIntervalT
class _0RL_cd_99dff546ea0f9974_f0000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_f0000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  TimeBase::IntervalT result;
};

void _0RL_cd_99dff546ea0f9974_f0000000::marshalReturnedValues(cdrStream& _n)
{
  (const TimeBase::IntervalT&) result >>= _n;

}

void _0RL_cd_99dff546ea0f9974_f0000000::unmarshalReturnedValues(cdrStream& _n)
{
  (TimeBase::IntervalT&)result <<= _n;

}

const char* const _0RL_cd_99dff546ea0f9974_f0000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_01000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_f0000000* tcd = (_0RL_cd_99dff546ea0f9974_f0000000*)cd;
  CosTime::_impl_TIO* impl = (CosTime::_impl_TIO*) svnt->_ptrToInterface(CosTime::TIO::_PD_repoId);
  tcd->result = impl->time_interval();


}

TimeBase::IntervalT CosTime::_objref_TIO::time_interval()
{
  _0RL_cd_99dff546ea0f9974_f0000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_01000000, "_get_time_interval", 19);


  _invoke(_call_desc);
  return _call_desc.result;


}


//
// Code for CosTime::TIO::spans

// Proxy call descriptor class. Mangled signature:
//  _cCosTime_mOverlapType_i_cCosTime_mUTO_o_cCosTime_mTIO
class _0RL_cd_99dff546ea0f9974_11000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_11000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosTime::UTO_var arg_0_;
  CosTime::UTO_ptr arg_0;
  CosTime::TIO_var arg_1;
  CosTime::OverlapType result;
};

void _0RL_cd_99dff546ea0f9974_11000000::marshalArguments(cdrStream& _n)
{
  CosTime::UTO::_marshalObjRef(arg_0,_n);

}

void _0RL_cd_99dff546ea0f9974_11000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = CosTime::UTO::_unmarshalObjRef(_n);
  arg_0 = arg_0_.in();

}

void _0RL_cd_99dff546ea0f9974_11000000::marshalReturnedValues(cdrStream& _n)
{
  result >>= _n;
  CosTime::TIO_Helper::marshalObjRef(arg_1,_n);

}

void _0RL_cd_99dff546ea0f9974_11000000::unmarshalReturnedValues(cdrStream& _n)
{
  (CosTime::OverlapType&)result <<= _n;
  arg_1 = CosTime::TIO_Helper::unmarshalObjRef(_n);

}

const char* const _0RL_cd_99dff546ea0f9974_11000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_21000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_11000000* tcd = (_0RL_cd_99dff546ea0f9974_11000000*)cd;
  CosTime::_impl_TIO* impl = (CosTime::_impl_TIO*) svnt->_ptrToInterface(CosTime::TIO::_PD_repoId);
  tcd->result = impl->spans(tcd->arg_0, tcd->arg_1.out());


}

CosTime::OverlapType CosTime::_objref_TIO::spans(::CosTime::UTO_ptr time, ::CosTime::TIO_out overlap)
{
  _0RL_cd_99dff546ea0f9974_11000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_21000000, "spans", 6);
  _call_desc.arg_0 = time;

  _invoke(_call_desc);
  overlap = _call_desc.arg_1._retn();
  return _call_desc.result;


}


//
// Code for CosTime::TIO::overlaps

// Proxy call descriptor class. Mangled signature:
//  _cCosTime_mOverlapType_i_cCosTime_mTIO_o_cCosTime_mTIO
class _0RL_cd_99dff546ea0f9974_31000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_31000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosTime::TIO_var arg_0_;
  CosTime::TIO_ptr arg_0;
  CosTime::TIO_var arg_1;
  CosTime::OverlapType result;
};

void _0RL_cd_99dff546ea0f9974_31000000::marshalArguments(cdrStream& _n)
{
  CosTime::TIO_Helper::marshalObjRef(arg_0,_n);

}

void _0RL_cd_99dff546ea0f9974_31000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = CosTime::TIO_Helper::unmarshalObjRef(_n);
  arg_0 = arg_0_.in();

}

void _0RL_cd_99dff546ea0f9974_31000000::marshalReturnedValues(cdrStream& _n)
{
  result >>= _n;
  CosTime::TIO_Helper::marshalObjRef(arg_1,_n);

}

void _0RL_cd_99dff546ea0f9974_31000000::unmarshalReturnedValues(cdrStream& _n)
{
  (CosTime::OverlapType&)result <<= _n;
  arg_1 = CosTime::TIO_Helper::unmarshalObjRef(_n);

}

const char* const _0RL_cd_99dff546ea0f9974_31000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_41000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_31000000* tcd = (_0RL_cd_99dff546ea0f9974_31000000*)cd;
  CosTime::_impl_TIO* impl = (CosTime::_impl_TIO*) svnt->_ptrToInterface(CosTime::TIO::_PD_repoId);
  tcd->result = impl->overlaps(tcd->arg_0, tcd->arg_1.out());


}

CosTime::OverlapType CosTime::_objref_TIO::overlaps(::CosTime::TIO_ptr interval, ::CosTime::TIO_out overlap)
{
  _0RL_cd_99dff546ea0f9974_31000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_41000000, "overlaps", 9);
  _call_desc.arg_0 = interval;

  _invoke(_call_desc);
  overlap = _call_desc.arg_1._retn();
  return _call_desc.result;


}


//
// Code for CosTime::TIO::time

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_51000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_70000000* tcd = (_0RL_cd_99dff546ea0f9974_70000000*)cd;
  CosTime::_impl_TIO* impl = (CosTime::_impl_TIO*) svnt->_ptrToInterface(CosTime::TIO::_PD_repoId);
  tcd->result = impl->time();


}

CosTime::UTO_ptr CosTime::_objref_TIO::time()
{
  _0RL_cd_99dff546ea0f9974_70000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_51000000, "time", 5);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}

CosTime::_pof_TIO::~_pof_TIO() {}


omniObjRef*
CosTime::_pof_TIO::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosTime::_objref_TIO(ior, id);
}


::CORBA::Boolean
CosTime::_pof_TIO::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosTime::TIO::_PD_repoId))
    return 1;
  
  return 0;
}

const CosTime::_pof_TIO _the_pof_CosTime_mTIO;

CosTime::_impl_TIO::~_impl_TIO() {}


::CORBA::Boolean
CosTime::_impl_TIO::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "_get_time_interval")) {

    _0RL_cd_99dff546ea0f9974_f0000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_01000000, "_get_time_interval", 19, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "spans")) {

    _0RL_cd_99dff546ea0f9974_11000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_21000000, "spans", 6, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "overlaps")) {

    _0RL_cd_99dff546ea0f9974_31000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_41000000, "overlaps", 9, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "time")) {

    _0RL_cd_99dff546ea0f9974_70000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_51000000, "time", 5, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }


  return 0;
}

void*
CosTime::_impl_TIO::_ptrToInterface(const char* id)
{
  if (id == ::CosTime::TIO::_PD_repoId)
    return (::CosTime::_impl_TIO*) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosTime::TIO::_PD_repoId))
    return (::CosTime::_impl_TIO*) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosTime::_impl_TIO::_mostDerivedRepoId()
{
  return ::CosTime::TIO::_PD_repoId;
}

CosTime::TimeService_ptr CosTime::TimeService_Helper::_nil() {
  return ::CosTime::TimeService::_nil();
}

::CORBA::Boolean CosTime::TimeService_Helper::is_nil(::CosTime::TimeService_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosTime::TimeService_Helper::release(::CosTime::TimeService_ptr p) {
  ::CORBA::release(p);
}

void CosTime::TimeService_Helper::marshalObjRef(::CosTime::TimeService_ptr obj, cdrStream& s) {
  ::CosTime::TimeService::_marshalObjRef(obj, s);
}

CosTime::TimeService_ptr CosTime::TimeService_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosTime::TimeService::_unmarshalObjRef(s);
}

void CosTime::TimeService_Helper::duplicate(::CosTime::TimeService_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosTime::TimeService_ptr
CosTime::TimeService::_duplicate(::CosTime::TimeService_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosTime::TimeService_ptr
CosTime::TimeService::_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_realNarrow(_PD_repoId);
  return e ? e : _nil();
}


CosTime::TimeService_ptr
CosTime::TimeService::_unchecked_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosTime::TimeService_ptr
CosTime::TimeService::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_TimeService _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_TimeService* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_TimeService;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosTime::TimeService::_PD_repoId = "IDL:omg.org/CosTime/TimeService:1.0";


CosTime::_objref_TimeService::~_objref_TimeService() {
  
}


CosTime::_objref_TimeService::_objref_TimeService(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosTime::TimeService::_PD_repoId, ior, id, 1)
   
   
{
  _PR_setobj(this);
}

void*
CosTime::_objref_TimeService::_ptrToObjRef(const char* id)
{
  if (id == ::CosTime::TimeService::_PD_repoId)
    return (::CosTime::TimeService_ptr) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosTime::TimeService::_PD_repoId))
    return (::CosTime::TimeService_ptr) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosTime::TimeService::universal_time

// Proxy call descriptor class. Mangled signature:
//  _cCosTime_mUTO_e_cCosTime_mTimeUnavailable
class _0RL_cd_99dff546ea0f9974_61000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_61000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 1, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosTime::UTO_var result;
};

void _0RL_cd_99dff546ea0f9974_61000000::marshalReturnedValues(cdrStream& _n)
{
  CosTime::UTO::_marshalObjRef(result,_n);

}

void _0RL_cd_99dff546ea0f9974_61000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosTime::UTO::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_99dff546ea0f9974_61000000::_user_exns[] = {
  CosTime::TimeUnavailable::_PD_repoId
};

void _0RL_cd_99dff546ea0f9974_61000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosTime::TimeUnavailable::_PD_repoId)) {
    CosTime::TimeUnavailable _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_71000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_61000000* tcd = (_0RL_cd_99dff546ea0f9974_61000000*)cd;
  CosTime::_impl_TimeService* impl = (CosTime::_impl_TimeService*) svnt->_ptrToInterface(CosTime::TimeService::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  tcd->result = impl->universal_time();
#else
  if (!cd->is_upcall())
    tcd->result = impl->universal_time();
  else {
    try {
      tcd->result = impl->universal_time();
    }
    catch(CosTime::TimeUnavailable& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

CosTime::UTO_ptr CosTime::_objref_TimeService::universal_time()
{
  _0RL_cd_99dff546ea0f9974_61000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_71000000, "universal_time", 15);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosTime::TimeService::secure_universal_time

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_81000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_61000000* tcd = (_0RL_cd_99dff546ea0f9974_61000000*)cd;
  CosTime::_impl_TimeService* impl = (CosTime::_impl_TimeService*) svnt->_ptrToInterface(CosTime::TimeService::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  tcd->result = impl->secure_universal_time();
#else
  if (!cd->is_upcall())
    tcd->result = impl->secure_universal_time();
  else {
    try {
      tcd->result = impl->secure_universal_time();
    }
    catch(CosTime::TimeUnavailable& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

CosTime::UTO_ptr CosTime::_objref_TimeService::secure_universal_time()
{
  _0RL_cd_99dff546ea0f9974_61000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_81000000, "secure_universal_time", 22);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosTime::TimeService::new_universal_time

// Proxy call descriptor class. Mangled signature:
//  _cCosTime_mUTO_i_cunsigned_plonglong_i_cunsigned_plonglong_i_cshort
class _0RL_cd_99dff546ea0f9974_91000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_91000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  TimeBase::TimeT arg_0;
  TimeBase::InaccuracyT arg_1;
  TimeBase::TdfT arg_2;
  CosTime::UTO_var result;
};

void _0RL_cd_99dff546ea0f9974_91000000::marshalArguments(cdrStream& _n)
{
  arg_0 >>= _n;
  arg_1 >>= _n;
  arg_2 >>= _n;

}

void _0RL_cd_99dff546ea0f9974_91000000::unmarshalArguments(cdrStream& _n)
{
  (TimeBase::TimeT&)arg_0 <<= _n;
  (TimeBase::InaccuracyT&)arg_1 <<= _n;
  (TimeBase::TdfT&)arg_2 <<= _n;

}

void _0RL_cd_99dff546ea0f9974_91000000::marshalReturnedValues(cdrStream& _n)
{
  CosTime::UTO::_marshalObjRef(result,_n);

}

void _0RL_cd_99dff546ea0f9974_91000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosTime::UTO::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_99dff546ea0f9974_91000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_a1000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_91000000* tcd = (_0RL_cd_99dff546ea0f9974_91000000*)cd;
  CosTime::_impl_TimeService* impl = (CosTime::_impl_TimeService*) svnt->_ptrToInterface(CosTime::TimeService::_PD_repoId);
  tcd->result = impl->new_universal_time(tcd->arg_0, tcd->arg_1, tcd->arg_2);


}

CosTime::UTO_ptr CosTime::_objref_TimeService::new_universal_time(::TimeBase::TimeT time, ::TimeBase::InaccuracyT inaccuracy, ::TimeBase::TdfT tdf)
{
  _0RL_cd_99dff546ea0f9974_91000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_a1000000, "new_universal_time", 19);
  _call_desc.arg_0 = time;
  _call_desc.arg_1 = inaccuracy;
  _call_desc.arg_2 = tdf;

  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosTime::TimeService::uto_from_utc

// Proxy call descriptor class. Mangled signature:
//  _cCosTime_mUTO_i_cTimeBase_mUtcT
class _0RL_cd_99dff546ea0f9974_b1000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_b1000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  TimeBase::UtcT arg_0_;
  const TimeBase::UtcT* arg_0;
  CosTime::UTO_var result;
};

void _0RL_cd_99dff546ea0f9974_b1000000::marshalArguments(cdrStream& _n)
{
  (const TimeBase::UtcT&) *arg_0 >>= _n;

}

void _0RL_cd_99dff546ea0f9974_b1000000::unmarshalArguments(cdrStream& _n)
{
  (TimeBase::UtcT&)arg_0_ <<= _n;
  arg_0 = &arg_0_;

}

void _0RL_cd_99dff546ea0f9974_b1000000::marshalReturnedValues(cdrStream& _n)
{
  CosTime::UTO::_marshalObjRef(result,_n);

}

void _0RL_cd_99dff546ea0f9974_b1000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosTime::UTO::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_99dff546ea0f9974_b1000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_c1000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_b1000000* tcd = (_0RL_cd_99dff546ea0f9974_b1000000*)cd;
  CosTime::_impl_TimeService* impl = (CosTime::_impl_TimeService*) svnt->_ptrToInterface(CosTime::TimeService::_PD_repoId);
  tcd->result = impl->uto_from_utc(*tcd->arg_0);


}

CosTime::UTO_ptr CosTime::_objref_TimeService::uto_from_utc(const ::TimeBase::UtcT& utc)
{
  _0RL_cd_99dff546ea0f9974_b1000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_c1000000, "uto_from_utc", 13);
  _call_desc.arg_0 = &(::TimeBase::UtcT&) utc;

  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosTime::TimeService::new_interval

// Proxy call descriptor class. Mangled signature:
//  _cCosTime_mTIO_i_cunsigned_plonglong_i_cunsigned_plonglong
class _0RL_cd_99dff546ea0f9974_d1000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_99dff546ea0f9974_d1000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  TimeBase::TimeT arg_0;
  TimeBase::TimeT arg_1;
  CosTime::TIO_var result;
};

void _0RL_cd_99dff546ea0f9974_d1000000::marshalArguments(cdrStream& _n)
{
  arg_0 >>= _n;
  arg_1 >>= _n;

}

void _0RL_cd_99dff546ea0f9974_d1000000::unmarshalArguments(cdrStream& _n)
{
  (TimeBase::TimeT&)arg_0 <<= _n;
  (TimeBase::TimeT&)arg_1 <<= _n;

}

void _0RL_cd_99dff546ea0f9974_d1000000::marshalReturnedValues(cdrStream& _n)
{
  CosTime::TIO_Helper::marshalObjRef(result,_n);

}

void _0RL_cd_99dff546ea0f9974_d1000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosTime::TIO_Helper::unmarshalObjRef(_n);

}

const char* const _0RL_cd_99dff546ea0f9974_d1000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_99dff546ea0f9974_e1000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_99dff546ea0f9974_d1000000* tcd = (_0RL_cd_99dff546ea0f9974_d1000000*)cd;
  CosTime::_impl_TimeService* impl = (CosTime::_impl_TimeService*) svnt->_ptrToInterface(CosTime::TimeService::_PD_repoId);
  tcd->result = impl->new_interval(tcd->arg_0, tcd->arg_1);


}

CosTime::TIO_ptr CosTime::_objref_TimeService::new_interval(::TimeBase::TimeT lower, ::TimeBase::TimeT upper)
{
  _0RL_cd_99dff546ea0f9974_d1000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_e1000000, "new_interval", 13);
  _call_desc.arg_0 = lower;
  _call_desc.arg_1 = upper;

  _invoke(_call_desc);
  return _call_desc.result._retn();


}

CosTime::_pof_TimeService::~_pof_TimeService() {}


omniObjRef*
CosTime::_pof_TimeService::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosTime::_objref_TimeService(ior, id);
}


::CORBA::Boolean
CosTime::_pof_TimeService::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosTime::TimeService::_PD_repoId))
    return 1;
  
  return 0;
}

const CosTime::_pof_TimeService _the_pof_CosTime_mTimeService;

CosTime::_impl_TimeService::~_impl_TimeService() {}


::CORBA::Boolean
CosTime::_impl_TimeService::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "universal_time")) {

    _0RL_cd_99dff546ea0f9974_61000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_71000000, "universal_time", 15, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "secure_universal_time")) {

    _0RL_cd_99dff546ea0f9974_61000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_81000000, "secure_universal_time", 22, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "new_universal_time")) {

    _0RL_cd_99dff546ea0f9974_91000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_a1000000, "new_universal_time", 19, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "uto_from_utc")) {

    _0RL_cd_99dff546ea0f9974_b1000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_c1000000, "uto_from_utc", 13, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "new_interval")) {

    _0RL_cd_99dff546ea0f9974_d1000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_e1000000, "new_interval", 13, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }


  return 0;
}

void*
CosTime::_impl_TimeService::_ptrToInterface(const char* id)
{
  if (id == ::CosTime::TimeService::_PD_repoId)
    return (::CosTime::_impl_TimeService*) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosTime::TimeService::_PD_repoId))
    return (::CosTime::_impl_TimeService*) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosTime::_impl_TimeService::_mostDerivedRepoId()
{
  return ::CosTime::TimeService::_PD_repoId;
}

POA_CosTime::UTO::~UTO() {}

POA_CosTime::TIO::~TIO() {}

POA_CosTime::TimeService::~TimeService() {}

