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

#include "CosTime.hh"

OMNI_USING_NAMESPACE(omni)

static const char* _0RL_dyn_library_version = omniORB_4_3_dyn;

static ::CORBA::TypeCode::_Tracker _0RL_tcTrack(__FILE__);

static const char* _0RL_enumMember_CosTime_mTimeComparison[] = { "TCEqualTo", "TCLessThan", "TCGreaterThan", "TCIndeterminate" };
static CORBA::TypeCode_ptr _0RL_tc_CosTime_mTimeComparison = CORBA::TypeCode::PR_enum_tc("IDL:omg.org/CosTime/TimeComparison:1.0", "TimeComparison", _0RL_enumMember_CosTime_mTimeComparison, 4, &_0RL_tcTrack);
#if defined(OMNI_HAS_Cplusplus_Namespace) && defined(_MSC_VER)
// MSVC++ does not give the constant external linkage otherwise.
namespace CosTime { 
  const ::CORBA::TypeCode_ptr _tc_TimeComparison = _0RL_tc_CosTime_mTimeComparison;
} 
#else
const ::CORBA::TypeCode_ptr CosTime::_tc_TimeComparison = _0RL_tc_CosTime_mTimeComparison;
#endif

static const char* _0RL_enumMember_CosTime_mComparisonType[] = { "IntervalC", "MidC" };
static CORBA::TypeCode_ptr _0RL_tc_CosTime_mComparisonType = CORBA::TypeCode::PR_enum_tc("IDL:omg.org/CosTime/ComparisonType:1.0", "ComparisonType", _0RL_enumMember_CosTime_mComparisonType, 2, &_0RL_tcTrack);
#if defined(OMNI_HAS_Cplusplus_Namespace) && defined(_MSC_VER)
// MSVC++ does not give the constant external linkage otherwise.
namespace CosTime { 
  const ::CORBA::TypeCode_ptr _tc_ComparisonType = _0RL_tc_CosTime_mComparisonType;
} 
#else
const ::CORBA::TypeCode_ptr CosTime::_tc_ComparisonType = _0RL_tc_CosTime_mComparisonType;
#endif

static const char* _0RL_enumMember_CosTime_mOverlapType[] = { "OTContainer", "OTContained", "OTOverlap", "OTNoOverlap" };
static CORBA::TypeCode_ptr _0RL_tc_CosTime_mOverlapType = CORBA::TypeCode::PR_enum_tc("IDL:omg.org/CosTime/OverlapType:1.0", "OverlapType", _0RL_enumMember_CosTime_mOverlapType, 4, &_0RL_tcTrack);
#if defined(OMNI_HAS_Cplusplus_Namespace) && defined(_MSC_VER)
// MSVC++ does not give the constant external linkage otherwise.
namespace CosTime { 
  const ::CORBA::TypeCode_ptr _tc_OverlapType = _0RL_tc_CosTime_mOverlapType;
} 
#else
const ::CORBA::TypeCode_ptr CosTime::_tc_OverlapType = _0RL_tc_CosTime_mOverlapType;
#endif


static CORBA::TypeCode_ptr _0RL_tc_CosTime_mTimeUnavailable = CORBA::TypeCode::PR_exception_tc("IDL:omg.org/CosTime/TimeUnavailable:1.0", "TimeUnavailable", (CORBA::PR_structMember*) 0, 0, &_0RL_tcTrack);
#if defined(OMNI_HAS_Cplusplus_Namespace) && defined(_MSC_VER)
// MSVC++ does not give the constant external linkage otherwise.
namespace CosTime { 
  const ::CORBA::TypeCode_ptr _tc_TimeUnavailable = _0RL_tc_CosTime_mTimeUnavailable;
} 
#else
const ::CORBA::TypeCode_ptr CosTime::_tc_TimeUnavailable = _0RL_tc_CosTime_mTimeUnavailable;
#endif


#if defined(OMNI_HAS_Cplusplus_Namespace) && defined(_MSC_VER)
// MSVC++ does not give the constant external linkage otherwise.
namespace CosTime { 
  const ::CORBA::TypeCode_ptr _tc_UTO = CORBA::TypeCode::PR_interface_tc("IDL:omg.org/CosTime/UTO:1.0", "UTO", &_0RL_tcTrack);
} 
#else
const ::CORBA::TypeCode_ptr CosTime::_tc_UTO = CORBA::TypeCode::PR_interface_tc("IDL:omg.org/CosTime/UTO:1.0", "UTO", &_0RL_tcTrack);
#endif

#if defined(OMNI_HAS_Cplusplus_Namespace) && defined(_MSC_VER)
// MSVC++ does not give the constant external linkage otherwise.
namespace CosTime { 
  const ::CORBA::TypeCode_ptr _tc_TIO = CORBA::TypeCode::PR_interface_tc("IDL:omg.org/CosTime/TIO:1.0", "TIO", &_0RL_tcTrack);
} 
#else
const ::CORBA::TypeCode_ptr CosTime::_tc_TIO = CORBA::TypeCode::PR_interface_tc("IDL:omg.org/CosTime/TIO:1.0", "TIO", &_0RL_tcTrack);
#endif

#if defined(OMNI_HAS_Cplusplus_Namespace) && defined(_MSC_VER)
// MSVC++ does not give the constant external linkage otherwise.
namespace CosTime { 
  const ::CORBA::TypeCode_ptr _tc_TimeService = CORBA::TypeCode::PR_interface_tc("IDL:omg.org/CosTime/TimeService:1.0", "TimeService", &_0RL_tcTrack);
} 
#else
const ::CORBA::TypeCode_ptr CosTime::_tc_TimeService = CORBA::TypeCode::PR_interface_tc("IDL:omg.org/CosTime/TimeService:1.0", "TimeService", &_0RL_tcTrack);
#endif

static void _0RL_CosTime_mTimeComparison_marshal_fn(cdrStream& _s, void* _v)
{
  CosTime::TimeComparison* _p = (CosTime::TimeComparison*)_v;
  *_p >>= _s;
}
static void _0RL_CosTime_mTimeComparison_unmarshal_fn(cdrStream& _s, void*& _v)
{
  CosTime::TimeComparison* _p = (CosTime::TimeComparison*)_v;
  *_p <<= _s;
}

void operator<<=(::CORBA::Any& _a, CosTime::TimeComparison _s)
{
  _a.PR_insert(_0RL_tc_CosTime_mTimeComparison,
               _0RL_CosTime_mTimeComparison_marshal_fn,
               &_s);
}

::CORBA::Boolean operator>>=(const ::CORBA::Any& _a, CosTime::TimeComparison& _s)
{
  return _a.PR_extract(_0RL_tc_CosTime_mTimeComparison,
                       _0RL_CosTime_mTimeComparison_unmarshal_fn,
                       &_s);
}

static void _0RL_CosTime_mComparisonType_marshal_fn(cdrStream& _s, void* _v)
{
  CosTime::ComparisonType* _p = (CosTime::ComparisonType*)_v;
  *_p >>= _s;
}
static void _0RL_CosTime_mComparisonType_unmarshal_fn(cdrStream& _s, void*& _v)
{
  CosTime::ComparisonType* _p = (CosTime::ComparisonType*)_v;
  *_p <<= _s;
}

void operator<<=(::CORBA::Any& _a, CosTime::ComparisonType _s)
{
  _a.PR_insert(_0RL_tc_CosTime_mComparisonType,
               _0RL_CosTime_mComparisonType_marshal_fn,
               &_s);
}

::CORBA::Boolean operator>>=(const ::CORBA::Any& _a, CosTime::ComparisonType& _s)
{
  return _a.PR_extract(_0RL_tc_CosTime_mComparisonType,
                       _0RL_CosTime_mComparisonType_unmarshal_fn,
                       &_s);
}

static void _0RL_CosTime_mOverlapType_marshal_fn(cdrStream& _s, void* _v)
{
  CosTime::OverlapType* _p = (CosTime::OverlapType*)_v;
  *_p >>= _s;
}
static void _0RL_CosTime_mOverlapType_unmarshal_fn(cdrStream& _s, void*& _v)
{
  CosTime::OverlapType* _p = (CosTime::OverlapType*)_v;
  *_p <<= _s;
}

void operator<<=(::CORBA::Any& _a, CosTime::OverlapType _s)
{
  _a.PR_insert(_0RL_tc_CosTime_mOverlapType,
               _0RL_CosTime_mOverlapType_marshal_fn,
               &_s);
}

::CORBA::Boolean operator>>=(const ::CORBA::Any& _a, CosTime::OverlapType& _s)
{
  return _a.PR_extract(_0RL_tc_CosTime_mOverlapType,
                       _0RL_CosTime_mOverlapType_unmarshal_fn,
                       &_s);
}


static void _0RL_CosTime_mTimeUnavailable_marshal_fn(cdrStream& _s, void* _v)
{
  const CosTime::TimeUnavailable* _p = (const CosTime::TimeUnavailable*)_v;
  ::CORBA::Any::PR_marshalExceptionRepoId(_s, _p->_rep_id());
  *_p >>= _s;
}
static void _0RL_CosTime_mTimeUnavailable_unmarshal_fn(cdrStream& _s, void*& _v)
{
  ::CORBA::Any::PR_unmarshalExceptionRepoId(_s);
  CosTime::TimeUnavailable* _p = new CosTime::TimeUnavailable;
  *_p <<= _s;
  _v = _p;
}
static void _0RL_CosTime_mTimeUnavailable_destructor_fn(void* _v)
{
  CosTime::TimeUnavailable* _p = (CosTime::TimeUnavailable*)_v;
  delete _p;
}

void operator<<=(::CORBA::Any& _a, const CosTime::TimeUnavailable& _s)
{
  CosTime::TimeUnavailable* _p = new CosTime::TimeUnavailable(_s);
  _a.PR_insert(_0RL_tc_CosTime_mTimeUnavailable,
               _0RL_CosTime_mTimeUnavailable_marshal_fn,
               _0RL_CosTime_mTimeUnavailable_destructor_fn,
               _p);
}
void operator<<=(::CORBA::Any& _a, const CosTime::TimeUnavailable* _sp)
{
  _a.PR_insert(_0RL_tc_CosTime_mTimeUnavailable,
               _0RL_CosTime_mTimeUnavailable_marshal_fn,
               _0RL_CosTime_mTimeUnavailable_destructor_fn,
               (CosTime::TimeUnavailable*)_sp);
}

::CORBA::Boolean operator>>=(const ::CORBA::Any& _a, const CosTime::TimeUnavailable*& _sp)
{
  void* _v;
  if (_a.PR_extract(_0RL_tc_CosTime_mTimeUnavailable,
                    _0RL_CosTime_mTimeUnavailable_unmarshal_fn,
                    _0RL_CosTime_mTimeUnavailable_marshal_fn,
                    _0RL_CosTime_mTimeUnavailable_destructor_fn,
                    _v)) {
    _sp = (const CosTime::TimeUnavailable*)_v;
    return 1;
  }
  return 0;
}

static void _0RL_insertToAny__cCosTime_mTimeUnavailable(::CORBA::Any& _a, const ::CORBA::Exception& _e) {
  const CosTime::TimeUnavailable & _ex = (const CosTime::TimeUnavailable &) _e;
  operator<<=(_a,_ex);
}

static void _0RL_insertToAnyNCP__cCosTime_mTimeUnavailable (::CORBA::Any& _a, const ::CORBA::Exception* _e) {
  const CosTime::TimeUnavailable* _ex = (const CosTime::TimeUnavailable*) _e;
  operator<<=(_a,_ex);
}

class _0RL_insertToAny_Singleton__cCosTime_mTimeUnavailable {
public:
  _0RL_insertToAny_Singleton__cCosTime_mTimeUnavailable() {
    CosTime::TimeUnavailable::insertToAnyFn = _0RL_insertToAny__cCosTime_mTimeUnavailable;
    CosTime::TimeUnavailable::insertToAnyFnNCP = _0RL_insertToAnyNCP__cCosTime_mTimeUnavailable;
  }
};
static _0RL_insertToAny_Singleton__cCosTime_mTimeUnavailable _0RL_insertToAny_Singleton__cCosTime_mTimeUnavailable_;

static void _0RL_CosTime_mUTO_marshal_fn(cdrStream& _s, void* _v)
{
  omniObjRef* _o = (omniObjRef*)_v;
  omniObjRef::_marshal(_o, _s);
}
static void _0RL_CosTime_mUTO_unmarshal_fn(cdrStream& _s, void*& _v)
{
  omniObjRef* _o = omniObjRef::_unMarshal(CosTime::UTO::_PD_repoId, _s);
  _v = _o;
}
static void _0RL_CosTime_mUTO_destructor_fn(void* _v)
{
  omniObjRef* _o = (omniObjRef*)_v;
  if (_o)
    omni::releaseObjRef(_o);
}

void operator<<=(::CORBA::Any& _a, CosTime::UTO_ptr _o)
{
  CosTime::UTO_ptr _no = CosTime::UTO::_duplicate(_o);
  _a.PR_insert(CosTime::_tc_UTO,
               _0RL_CosTime_mUTO_marshal_fn,
               _0RL_CosTime_mUTO_destructor_fn,
               _no->_PR_getobj());
}
void operator<<=(::CORBA::Any& _a, CosTime::UTO_ptr* _op)
{
  _a.PR_insert(CosTime::_tc_UTO,
               _0RL_CosTime_mUTO_marshal_fn,
               _0RL_CosTime_mUTO_destructor_fn,
               (*_op)->_PR_getobj());
  *_op = CosTime::UTO::_nil();
}

::CORBA::Boolean operator>>=(const ::CORBA::Any& _a, CosTime::UTO_ptr& _o)
{
  void* _v;
  if (_a.PR_extract(CosTime::_tc_UTO,
                    _0RL_CosTime_mUTO_unmarshal_fn,
                    _0RL_CosTime_mUTO_marshal_fn,
                    _0RL_CosTime_mUTO_destructor_fn,
                    _v)) {
    omniObjRef* _r = (omniObjRef*)_v;
    if (_r)
      _o = (CosTime::UTO_ptr)_r->_ptrToObjRef(CosTime::UTO::_PD_repoId);
    else
      _o = CosTime::UTO::_nil();
    return 1;
  }
  return 0;
}

static void _0RL_CosTime_mTIO_marshal_fn(cdrStream& _s, void* _v)
{
  omniObjRef* _o = (omniObjRef*)_v;
  omniObjRef::_marshal(_o, _s);
}
static void _0RL_CosTime_mTIO_unmarshal_fn(cdrStream& _s, void*& _v)
{
  omniObjRef* _o = omniObjRef::_unMarshal(CosTime::TIO::_PD_repoId, _s);
  _v = _o;
}
static void _0RL_CosTime_mTIO_destructor_fn(void* _v)
{
  omniObjRef* _o = (omniObjRef*)_v;
  if (_o)
    omni::releaseObjRef(_o);
}

void operator<<=(::CORBA::Any& _a, CosTime::TIO_ptr _o)
{
  CosTime::TIO_ptr _no = CosTime::TIO::_duplicate(_o);
  _a.PR_insert(CosTime::_tc_TIO,
               _0RL_CosTime_mTIO_marshal_fn,
               _0RL_CosTime_mTIO_destructor_fn,
               _no->_PR_getobj());
}
void operator<<=(::CORBA::Any& _a, CosTime::TIO_ptr* _op)
{
  _a.PR_insert(CosTime::_tc_TIO,
               _0RL_CosTime_mTIO_marshal_fn,
               _0RL_CosTime_mTIO_destructor_fn,
               (*_op)->_PR_getobj());
  *_op = CosTime::TIO::_nil();
}

::CORBA::Boolean operator>>=(const ::CORBA::Any& _a, CosTime::TIO_ptr& _o)
{
  void* _v;
  if (_a.PR_extract(CosTime::_tc_TIO,
                    _0RL_CosTime_mTIO_unmarshal_fn,
                    _0RL_CosTime_mTIO_marshal_fn,
                    _0RL_CosTime_mTIO_destructor_fn,
                    _v)) {
    omniObjRef* _r = (omniObjRef*)_v;
    if (_r)
      _o = (CosTime::TIO_ptr)_r->_ptrToObjRef(CosTime::TIO::_PD_repoId);
    else
      _o = CosTime::TIO::_nil();
    return 1;
  }
  return 0;
}

static void _0RL_CosTime_mTimeService_marshal_fn(cdrStream& _s, void* _v)
{
  omniObjRef* _o = (omniObjRef*)_v;
  omniObjRef::_marshal(_o, _s);
}
static void _0RL_CosTime_mTimeService_unmarshal_fn(cdrStream& _s, void*& _v)
{
  omniObjRef* _o = omniObjRef::_unMarshal(CosTime::TimeService::_PD_repoId, _s);
  _v = _o;
}
static void _0RL_CosTime_mTimeService_destructor_fn(void* _v)
{
  omniObjRef* _o = (omniObjRef*)_v;
  if (_o)
    omni::releaseObjRef(_o);
}

void operator<<=(::CORBA::Any& _a, CosTime::TimeService_ptr _o)
{
  CosTime::TimeService_ptr _no = CosTime::TimeService::_duplicate(_o);
  _a.PR_insert(CosTime::_tc_TimeService,
               _0RL_CosTime_mTimeService_marshal_fn,
               _0RL_CosTime_mTimeService_destructor_fn,
               _no->_PR_getobj());
}
void operator<<=(::CORBA::Any& _a, CosTime::TimeService_ptr* _op)
{
  _a.PR_insert(CosTime::_tc_TimeService,
               _0RL_CosTime_mTimeService_marshal_fn,
               _0RL_CosTime_mTimeService_destructor_fn,
               (*_op)->_PR_getobj());
  *_op = CosTime::TimeService::_nil();
}

::CORBA::Boolean operator>>=(const ::CORBA::Any& _a, CosTime::TimeService_ptr& _o)
{
  void* _v;
  if (_a.PR_extract(CosTime::_tc_TimeService,
                    _0RL_CosTime_mTimeService_unmarshal_fn,
                    _0RL_CosTime_mTimeService_marshal_fn,
                    _0RL_CosTime_mTimeService_destructor_fn,
                    _v)) {
    omniObjRef* _r = (omniObjRef*)_v;
    if (_r)
      _o = (CosTime::TimeService_ptr)_r->_ptrToObjRef(CosTime::TimeService::_PD_repoId);
    else
      _o = CosTime::TimeService::_nil();
    return 1;
  }
  return 0;
}

