/*
 *  MICO --- a free CORBA implementation
 *  Copyright (C) 1997-98 Kay Roemer & Arno Puder
 *
 *  This file was automatically generated. DO NOT EDIT!
 */

#if !defined(__COSTIME_H__) || defined(MICO_NO_TOPLEVEL_MODULES)
#define __COSTIME_H__

#ifndef MICO_NO_TOPLEVEL_MODULES
#include <CORBA.h>
#include <mico/throw.h>
#endif

#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL TimeBase {
#endif

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_TimeBase)


typedef CORBA::ULongLong TimeT;
typedef TimeT InaccuracyT;
typedef CORBA::Short TdfT;
struct UtcT;
typedef TFixVar<UtcT> UtcT_var;
typedef UtcT_var UtcT_out;

struct UtcT {
  #ifdef HAVE_TYPEDEF_OVERLOAD
  typedef UtcT_var _var_type;
  #endif
  #ifdef HAVE_EXPLICIT_STRUCT_OPS
  UtcT();
  ~UtcT();
  UtcT( const UtcT& s );
  UtcT& operator=( const UtcT& s );
  #endif //HAVE_EXPLICIT_STRUCT_OPS

  TimeT time;
  CORBA::ULong inacclo;
  CORBA::UShort inacchi;
  TdfT tdf;
};

struct IntervalT;
typedef TFixVar<IntervalT> IntervalT_var;
typedef IntervalT_var IntervalT_out;

struct IntervalT {
  #ifdef HAVE_TYPEDEF_OVERLOAD
  typedef IntervalT_var _var_type;
  #endif
  #ifdef HAVE_EXPLICIT_STRUCT_OPS
  IntervalT();
  ~IntervalT();
  IntervalT( const IntervalT& s );
  IntervalT& operator=( const IntervalT& s );
  #endif //HAVE_EXPLICIT_STRUCT_OPS

  TimeT lower_bound;
  TimeT upper_bound;
};

#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_TimeBase)

#ifndef MICO_NO_TOPLEVEL_MODULES

};
#endif



#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL CosTime {
#endif

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_CosTime)


enum TimeComparison {
  TCEqualTo = 0,
  TCLessThan,
  TCGreaterThan,
  TCIndeterminate
};

typedef TimeComparison& TimeComparison_out;

enum ComparisonType {
  IntervalC = 0,
  MidC
};

typedef ComparisonType& ComparisonType_out;

enum OverlapType {
  OTContainer = 0,
  OTContained,
  OTOverlap,
  OTNoOverlap
};

typedef OverlapType& OverlapType_out;

struct TimeUnavailable : public CORBA::UserException {
  #ifdef HAVE_EXPLICIT_STRUCT_OPS
  TimeUnavailable();
  ~TimeUnavailable();
  TimeUnavailable( const TimeUnavailable& s );
  TimeUnavailable& operator=( const TimeUnavailable& s );
  #endif //HAVE_EXPLICIT_STRUCT_OPS


  #ifdef HAVE_STD_EH
  TimeUnavailable *operator->() { return this; }
  TimeUnavailable& operator*() { return *this; }
  operator TimeUnavailable*() { return this; }
  #endif // HAVE_STD_EH

  void _throwit() const;
  const char *_repoid() const;
  void _encode( CORBA::DataEncoder &en ) const;
  void _encode_any( CORBA::Any &a ) const;
  CORBA::Exception *_clone() const;
  static TimeUnavailable *EXCEPTION_DOWNCAST( CORBA::Exception *ex );
  static const TimeUnavailable *EXCEPTION_DOWNCAST( const CORBA::Exception *ex );
};

#ifdef HAVE_STD_EH
typedef TimeUnavailable TimeUnavailable_catch;
#else
typedef ExceptVar<TimeUnavailable> TimeUnavailable_var;
typedef TimeUnavailable_var TimeUnavailable_out;
typedef TimeUnavailable_var TimeUnavailable_catch;
#endif // HAVE_STD_EH

class UTO;
typedef UTO *UTO_ptr;
typedef UTO_ptr UTORef;
typedef ObjVar<UTO> UTO_var;
typedef UTO_var UTO_out;

class TIO;
typedef TIO *TIO_ptr;
typedef TIO_ptr TIORef;
typedef ObjVar<TIO> TIO_var;
typedef TIO_var TIO_out;


// Common definitions for interface UTO
class UTO : 
  virtual public CORBA::Object
{
  public:
    virtual ~UTO();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef UTO_ptr _ptr_type;
    typedef UTO_var _var_type;
    #endif

    static UTO_ptr _narrow( CORBA::Object_ptr obj );
    static UTO_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static UTO_ptr _duplicate( UTO_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static UTO_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );
    static vector<CORBA::Narrow_proto> *_narrow_helpers;
    static bool _narrow_helper2( CORBA::Object_ptr obj );

    virtual TimeBase::TimeT time() = 0;
    virtual TimeBase::InaccuracyT inaccuracy() = 0;
    virtual TimeBase::TdfT tdf() = 0;
    virtual TimeBase::UtcT utc_time() = 0;

    virtual UTO_ptr absolute_time() = 0;
    virtual TimeComparison compare_time( ComparisonType comparison_type, UTO_ptr uto ) = 0;
    virtual TIO_ptr time_to_interval( UTO_ptr uto ) = 0;
    virtual TIO_ptr interval() = 0;
    virtual void destroy() = 0;

  protected:
    UTO() {};
  private:
    UTO( const UTO& );
    void operator=( const UTO& );
};

// Stub for interface UTO
class UTO_stub:
  virtual public UTO
{
  public:
    virtual ~UTO_stub();
    TimeBase::TimeT time();
    TimeBase::InaccuracyT inaccuracy();
    TimeBase::TdfT tdf();
    TimeBase::UtcT utc_time();

    UTO_ptr absolute_time();
    TimeComparison compare_time( ComparisonType comparison_type, UTO_ptr uto );
    TIO_ptr time_to_interval( UTO_ptr uto );
    TIO_ptr interval();
    void destroy();

  private:
    void operator=( const UTO_stub& );
};

#ifndef MICO_CONF_NO_POA

class UTO_stub_clp :
  virtual public UTO_stub,
  virtual public PortableServer::StubBase
{
  public:
    UTO_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~UTO_stub_clp ();
    TimeBase::TimeT time();
    TimeBase::InaccuracyT inaccuracy();
    TimeBase::TdfT tdf();
    TimeBase::UtcT utc_time();

    UTO_ptr absolute_time();
    TimeComparison compare_time( ComparisonType comparison_type, UTO_ptr uto );
    TIO_ptr time_to_interval( UTO_ptr uto );
    TIO_ptr interval();
    void destroy();

  protected:
    UTO_stub_clp ();
  private:
    void operator=( const UTO_stub_clp & );
};

#endif // MICO_CONF_NO_POA


// Common definitions for interface TIO
class TIO : 
  virtual public CORBA::Object
{
  public:
    virtual ~TIO();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef TIO_ptr _ptr_type;
    typedef TIO_var _var_type;
    #endif

    static TIO_ptr _narrow( CORBA::Object_ptr obj );
    static TIO_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static TIO_ptr _duplicate( TIO_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static TIO_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );
    static vector<CORBA::Narrow_proto> *_narrow_helpers;
    static bool _narrow_helper2( CORBA::Object_ptr obj );

    virtual TimeBase::IntervalT time_interval() = 0;

    virtual OverlapType spans( UTO_ptr time, TIO_ptr& overlap ) = 0;
    virtual OverlapType overlaps( TIO_ptr interval, TIO_ptr& overlap ) = 0;
    virtual UTO_ptr time() = 0;
    virtual void destroy() = 0;

  protected:
    TIO() {};
  private:
    TIO( const TIO& );
    void operator=( const TIO& );
};

// Stub for interface TIO
class TIO_stub:
  virtual public TIO
{
  public:
    virtual ~TIO_stub();
    TimeBase::IntervalT time_interval();

    OverlapType spans( UTO_ptr time, TIO_ptr& overlap );
    OverlapType overlaps( TIO_ptr interval, TIO_ptr& overlap );
    UTO_ptr time();
    void destroy();

  private:
    void operator=( const TIO_stub& );
};

#ifndef MICO_CONF_NO_POA

class TIO_stub_clp :
  virtual public TIO_stub,
  virtual public PortableServer::StubBase
{
  public:
    TIO_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~TIO_stub_clp ();
    TimeBase::IntervalT time_interval();

    OverlapType spans( UTO_ptr time, TIO_ptr& overlap );
    OverlapType overlaps( TIO_ptr interval, TIO_ptr& overlap );
    UTO_ptr time();
    void destroy();

  protected:
    TIO_stub_clp ();
  private:
    void operator=( const TIO_stub_clp & );
};

#endif // MICO_CONF_NO_POA

class TimeService;
typedef TimeService *TimeService_ptr;
typedef TimeService_ptr TimeServiceRef;
typedef ObjVar<TimeService> TimeService_var;
typedef TimeService_var TimeService_out;


// Common definitions for interface TimeService
class TimeService : 
  virtual public CORBA::Object
{
  public:
    virtual ~TimeService();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef TimeService_ptr _ptr_type;
    typedef TimeService_var _var_type;
    #endif

    static TimeService_ptr _narrow( CORBA::Object_ptr obj );
    static TimeService_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static TimeService_ptr _duplicate( TimeService_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static TimeService_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );
    static vector<CORBA::Narrow_proto> *_narrow_helpers;
    static bool _narrow_helper2( CORBA::Object_ptr obj );

    virtual UTO_ptr universal_time() = 0;
    virtual UTO_ptr secure_universal_time() = 0;
    virtual UTO_ptr new_universal_time( TimeBase::TimeT time, TimeBase::InaccuracyT inaccuracy, TimeBase::TdfT tdf ) = 0;
    virtual UTO_ptr uto_from_utc( const TimeBase::UtcT& utc ) = 0;
    virtual TIO_ptr new_interval( TimeBase::TimeT lower, TimeBase::TimeT upper ) = 0;

  protected:
    TimeService() {};
  private:
    TimeService( const TimeService& );
    void operator=( const TimeService& );
};

// Stub for interface TimeService
class TimeService_stub:
  virtual public TimeService
{
  public:
    virtual ~TimeService_stub();
    UTO_ptr universal_time();
    UTO_ptr secure_universal_time();
    UTO_ptr new_universal_time( TimeBase::TimeT time, TimeBase::InaccuracyT inaccuracy, TimeBase::TdfT tdf );
    UTO_ptr uto_from_utc( const TimeBase::UtcT& utc );
    TIO_ptr new_interval( TimeBase::TimeT lower, TimeBase::TimeT upper );

  private:
    void operator=( const TimeService_stub& );
};

#ifndef MICO_CONF_NO_POA

class TimeService_stub_clp :
  virtual public TimeService_stub,
  virtual public PortableServer::StubBase
{
  public:
    TimeService_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~TimeService_stub_clp ();
    UTO_ptr universal_time();
    UTO_ptr secure_universal_time();
    UTO_ptr new_universal_time( TimeBase::TimeT time, TimeBase::InaccuracyT inaccuracy, TimeBase::TdfT tdf );
    UTO_ptr uto_from_utc( const TimeBase::UtcT& utc );
    TIO_ptr new_interval( TimeBase::TimeT lower, TimeBase::TimeT upper );

  protected:
    TimeService_stub_clp ();
  private:
    void operator=( const TimeService_stub_clp & );
};

#endif // MICO_CONF_NO_POA

#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_CosTime)

#ifndef MICO_NO_TOPLEVEL_MODULES

};
#endif



#ifndef MICO_CONF_NO_POA

#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL POA_TimeBase {
#endif

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_POA_TimeBase)


#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_POA_TimeBase)

#ifndef MICO_NO_TOPLEVEL_MODULES

};
#endif



#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL POA_CosTime {
#endif

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_POA_CosTime)


class UTO : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~UTO ();
    CosTime::UTO_ptr _this ();
    bool dispatch (CORBA::StaticServerRequest_ptr);
    virtual void invoke (CORBA::StaticServerRequest_ptr);
    virtual CORBA::Boolean _is_a (const char *);
    virtual CORBA::InterfaceDef_ptr _get_interface ();
    virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr);

    virtual void * _narrow_helper (const char *);
    static UTO * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual TimeBase::TimeT time() = 0;
    virtual TimeBase::InaccuracyT inaccuracy() = 0;
    virtual TimeBase::TdfT tdf() = 0;
    virtual TimeBase::UtcT utc_time() = 0;

    virtual CosTime::UTO_ptr absolute_time() = 0;
    virtual CosTime::TimeComparison compare_time( CosTime::ComparisonType comparison_type, CosTime::UTO_ptr uto ) = 0;
    virtual CosTime::TIO_ptr time_to_interval( CosTime::UTO_ptr uto ) = 0;
    virtual CosTime::TIO_ptr interval() = 0;
    virtual void destroy() = 0;

  protected:
    UTO () {};

  private:
    UTO (const UTO &);
    void operator= (const UTO &);
};

#ifdef HAVE_NAMESPACE

template<class T>
class UTO_tie : 
  virtual public POA_Tie_Base<T>,
  virtual public UTO
{
  public:
    UTO_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    UTO_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    UTO_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    UTO_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~UTO_tie ();

    PortableServer::POA_ptr _default_POA ();

    TimeBase::TimeT time();
    TimeBase::InaccuracyT inaccuracy();
    TimeBase::TdfT tdf();
    TimeBase::UtcT utc_time();

    CosTime::UTO_ptr absolute_time();
    CosTime::TimeComparison compare_time( CosTime::ComparisonType comparison_type, CosTime::UTO_ptr uto );
    CosTime::TIO_ptr time_to_interval( CosTime::UTO_ptr uto );
    CosTime::TIO_ptr interval();
    void destroy();

  protected:
    UTO_tie () {};

  private:
    UTO_tie (const UTO_tie<T> &);
    void operator= (const UTO_tie<T> &);
};

template<class T>
UTO_tie<T>::~UTO_tie ()
{
}

template<class T>
PortableServer::POA_ptr
UTO_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
TimeBase::TimeT
UTO_tie<T>::time ()
{
  return POA_Tie_Base<T>::ptr->time ();
}

template<class T>
TimeBase::InaccuracyT
UTO_tie<T>::inaccuracy ()
{
  return POA_Tie_Base<T>::ptr->inaccuracy ();
}

template<class T>
TimeBase::TdfT
UTO_tie<T>::tdf ()
{
  return POA_Tie_Base<T>::ptr->tdf ();
}

template<class T>
TimeBase::UtcT
UTO_tie<T>::utc_time ()
{
  return POA_Tie_Base<T>::ptr->utc_time ();
}

template<class T>
CosTime::UTO_ptr
UTO_tie<T>::absolute_time ()
{
  return POA_Tie_Base<T>::ptr->absolute_time ();
}

template<class T>
CosTime::TimeComparison
UTO_tie<T>::compare_time (CosTime::ComparisonType comparison_type, CosTime::UTO_ptr uto)
{
  return POA_Tie_Base<T>::ptr->compare_time (comparison_type, uto);
}

template<class T>
CosTime::TIO_ptr
UTO_tie<T>::time_to_interval (CosTime::UTO_ptr uto)
{
  return POA_Tie_Base<T>::ptr->time_to_interval (uto);
}

template<class T>
CosTime::TIO_ptr
UTO_tie<T>::interval ()
{
  return POA_Tie_Base<T>::ptr->interval ();
}

template<class T>
void
UTO_tie<T>::destroy ()
{
  POA_Tie_Base<T>::ptr->destroy ();
}

#endif

class TIO : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~TIO ();
    CosTime::TIO_ptr _this ();
    bool dispatch (CORBA::StaticServerRequest_ptr);
    virtual void invoke (CORBA::StaticServerRequest_ptr);
    virtual CORBA::Boolean _is_a (const char *);
    virtual CORBA::InterfaceDef_ptr _get_interface ();
    virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr);

    virtual void * _narrow_helper (const char *);
    static TIO * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual TimeBase::IntervalT time_interval() = 0;

    virtual CosTime::OverlapType spans( CosTime::UTO_ptr time, CosTime::TIO_ptr& overlap ) = 0;
    virtual CosTime::OverlapType overlaps( CosTime::TIO_ptr interval, CosTime::TIO_ptr& overlap ) = 0;
    virtual CosTime::UTO_ptr time() = 0;
    virtual void destroy() = 0;

  protected:
    TIO () {};

  private:
    TIO (const TIO &);
    void operator= (const TIO &);
};

#ifdef HAVE_NAMESPACE

template<class T>
class TIO_tie : 
  virtual public POA_Tie_Base<T>,
  virtual public TIO
{
  public:
    TIO_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    TIO_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    TIO_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    TIO_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~TIO_tie ();

    PortableServer::POA_ptr _default_POA ();

    TimeBase::IntervalT time_interval();

    CosTime::OverlapType spans( CosTime::UTO_ptr time, CosTime::TIO_ptr& overlap );
    CosTime::OverlapType overlaps( CosTime::TIO_ptr interval, CosTime::TIO_ptr& overlap );
    CosTime::UTO_ptr time();
    void destroy();

  protected:
    TIO_tie () {};

  private:
    TIO_tie (const TIO_tie<T> &);
    void operator= (const TIO_tie<T> &);
};

template<class T>
TIO_tie<T>::~TIO_tie ()
{
}

template<class T>
PortableServer::POA_ptr
TIO_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
TimeBase::IntervalT
TIO_tie<T>::time_interval ()
{
  return POA_Tie_Base<T>::ptr->time_interval ();
}

template<class T>
CosTime::OverlapType
TIO_tie<T>::spans (CosTime::UTO_ptr time, CosTime::TIO_ptr& overlap)
{
  return POA_Tie_Base<T>::ptr->spans (time, overlap);
}

template<class T>
CosTime::OverlapType
TIO_tie<T>::overlaps (CosTime::TIO_ptr interval, CosTime::TIO_ptr& overlap)
{
  return POA_Tie_Base<T>::ptr->overlaps (interval, overlap);
}

template<class T>
CosTime::UTO_ptr
TIO_tie<T>::time ()
{
  return POA_Tie_Base<T>::ptr->time ();
}

template<class T>
void
TIO_tie<T>::destroy ()
{
  POA_Tie_Base<T>::ptr->destroy ();
}

#endif

class TimeService : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~TimeService ();
    CosTime::TimeService_ptr _this ();
    bool dispatch (CORBA::StaticServerRequest_ptr);
    virtual void invoke (CORBA::StaticServerRequest_ptr);
    virtual CORBA::Boolean _is_a (const char *);
    virtual CORBA::InterfaceDef_ptr _get_interface ();
    virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr);

    virtual void * _narrow_helper (const char *);
    static TimeService * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual CosTime::UTO_ptr universal_time() = 0;
    virtual CosTime::UTO_ptr secure_universal_time() = 0;
    virtual CosTime::UTO_ptr new_universal_time( TimeBase::TimeT time, TimeBase::InaccuracyT inaccuracy, TimeBase::TdfT tdf ) = 0;
    virtual CosTime::UTO_ptr uto_from_utc( const TimeBase::UtcT& utc ) = 0;
    virtual CosTime::TIO_ptr new_interval( TimeBase::TimeT lower, TimeBase::TimeT upper ) = 0;

  protected:
    TimeService () {};

  private:
    TimeService (const TimeService &);
    void operator= (const TimeService &);
};

#ifdef HAVE_NAMESPACE

template<class T>
class TimeService_tie : 
  virtual public POA_Tie_Base<T>,
  virtual public TimeService
{
  public:
    TimeService_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    TimeService_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    TimeService_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    TimeService_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~TimeService_tie ();

    PortableServer::POA_ptr _default_POA ();

    CosTime::UTO_ptr universal_time();
    CosTime::UTO_ptr secure_universal_time();
    CosTime::UTO_ptr new_universal_time( TimeBase::TimeT time, TimeBase::InaccuracyT inaccuracy, TimeBase::TdfT tdf );
    CosTime::UTO_ptr uto_from_utc( const TimeBase::UtcT& utc );
    CosTime::TIO_ptr new_interval( TimeBase::TimeT lower, TimeBase::TimeT upper );

  protected:
    TimeService_tie () {};

  private:
    TimeService_tie (const TimeService_tie<T> &);
    void operator= (const TimeService_tie<T> &);
};

template<class T>
TimeService_tie<T>::~TimeService_tie ()
{
}

template<class T>
PortableServer::POA_ptr
TimeService_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
CosTime::UTO_ptr
TimeService_tie<T>::universal_time ()
{
  return POA_Tie_Base<T>::ptr->universal_time ();
}

template<class T>
CosTime::UTO_ptr
TimeService_tie<T>::secure_universal_time ()
{
  return POA_Tie_Base<T>::ptr->secure_universal_time ();
}

template<class T>
CosTime::UTO_ptr
TimeService_tie<T>::new_universal_time (TimeBase::TimeT time, TimeBase::InaccuracyT inaccuracy, TimeBase::TdfT tdf)
{
  return POA_Tie_Base<T>::ptr->new_universal_time (time, inaccuracy, tdf);
}

template<class T>
CosTime::UTO_ptr
TimeService_tie<T>::uto_from_utc (const TimeBase::UtcT& utc)
{
  return POA_Tie_Base<T>::ptr->uto_from_utc (utc);
}

template<class T>
CosTime::TIO_ptr
TimeService_tie<T>::new_interval (TimeBase::TimeT lower, TimeBase::TimeT upper)
{
  return POA_Tie_Base<T>::ptr->new_interval (lower, upper);
}

#endif

#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_POA_CosTime)

#ifndef MICO_NO_TOPLEVEL_MODULES

};
#endif



#ifndef HAVE_NAMESPACE

template<class T>
class POA_CosTime_UTO_tie : 
  virtual public POA_Tie_Base<T>,
  virtual public POA_CosTime::UTO
{
  public:
    POA_CosTime_UTO_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    POA_CosTime_UTO_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    POA_CosTime_UTO_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    POA_CosTime_UTO_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~POA_CosTime_UTO_tie ();

    PortableServer::POA_ptr _default_POA ();

    TimeBase::TimeT time();
    TimeBase::InaccuracyT inaccuracy();
    TimeBase::TdfT tdf();
    TimeBase::UtcT utc_time();

    CosTime::UTO_ptr absolute_time();
    CosTime::TimeComparison compare_time( CosTime::ComparisonType comparison_type, CosTime::UTO_ptr uto );
    CosTime::TIO_ptr time_to_interval( CosTime::UTO_ptr uto );
    CosTime::TIO_ptr interval();
    void destroy();

  protected:
    POA_CosTime_UTO_tie () {};

  private:
    POA_CosTime_UTO_tie (const POA_CosTime_UTO_tie<T> &);
    void operator= (const POA_CosTime_UTO_tie<T> &);
};

template<class T>
POA_CosTime_UTO_tie<T>::~POA_CosTime_UTO_tie ()
{
}

template<class T>
PortableServer::POA_ptr
POA_CosTime_UTO_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
TimeBase::TimeT
POA_CosTime_UTO_tie<T>::time ()
{
  return POA_Tie_Base<T>::ptr->time ();
}

template<class T>
TimeBase::InaccuracyT
POA_CosTime_UTO_tie<T>::inaccuracy ()
{
  return POA_Tie_Base<T>::ptr->inaccuracy ();
}

template<class T>
TimeBase::TdfT
POA_CosTime_UTO_tie<T>::tdf ()
{
  return POA_Tie_Base<T>::ptr->tdf ();
}

template<class T>
TimeBase::UtcT
POA_CosTime_UTO_tie<T>::utc_time ()
{
  return POA_Tie_Base<T>::ptr->utc_time ();
}

template<class T>
CosTime::UTO_ptr
POA_CosTime_UTO_tie<T>::absolute_time ()
{
  return POA_Tie_Base<T>::ptr->absolute_time ();
}

template<class T>
CosTime::TimeComparison
POA_CosTime_UTO_tie<T>::compare_time (CosTime::ComparisonType comparison_type, CosTime::UTO_ptr uto)
{
  return POA_Tie_Base<T>::ptr->compare_time (comparison_type, uto);
}

template<class T>
CosTime::TIO_ptr
POA_CosTime_UTO_tie<T>::time_to_interval (CosTime::UTO_ptr uto)
{
  return POA_Tie_Base<T>::ptr->time_to_interval (uto);
}

template<class T>
CosTime::TIO_ptr
POA_CosTime_UTO_tie<T>::interval ()
{
  return POA_Tie_Base<T>::ptr->interval ();
}

template<class T>
void
POA_CosTime_UTO_tie<T>::destroy ()
{
  POA_Tie_Base<T>::ptr->destroy ();
}

#endif

#ifndef HAVE_NAMESPACE

template<class T>
class POA_CosTime_TIO_tie : 
  virtual public POA_Tie_Base<T>,
  virtual public POA_CosTime::TIO
{
  public:
    POA_CosTime_TIO_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    POA_CosTime_TIO_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    POA_CosTime_TIO_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    POA_CosTime_TIO_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~POA_CosTime_TIO_tie ();

    PortableServer::POA_ptr _default_POA ();

    TimeBase::IntervalT time_interval();

    CosTime::OverlapType spans( CosTime::UTO_ptr time, CosTime::TIO_ptr& overlap );
    CosTime::OverlapType overlaps( CosTime::TIO_ptr interval, CosTime::TIO_ptr& overlap );
    CosTime::UTO_ptr time();
    void destroy();

  protected:
    POA_CosTime_TIO_tie () {};

  private:
    POA_CosTime_TIO_tie (const POA_CosTime_TIO_tie<T> &);
    void operator= (const POA_CosTime_TIO_tie<T> &);
};

template<class T>
POA_CosTime_TIO_tie<T>::~POA_CosTime_TIO_tie ()
{
}

template<class T>
PortableServer::POA_ptr
POA_CosTime_TIO_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
TimeBase::IntervalT
POA_CosTime_TIO_tie<T>::time_interval ()
{
  return POA_Tie_Base<T>::ptr->time_interval ();
}

template<class T>
CosTime::OverlapType
POA_CosTime_TIO_tie<T>::spans (CosTime::UTO_ptr time, CosTime::TIO_ptr& overlap)
{
  return POA_Tie_Base<T>::ptr->spans (time, overlap);
}

template<class T>
CosTime::OverlapType
POA_CosTime_TIO_tie<T>::overlaps (CosTime::TIO_ptr interval, CosTime::TIO_ptr& overlap)
{
  return POA_Tie_Base<T>::ptr->overlaps (interval, overlap);
}

template<class T>
CosTime::UTO_ptr
POA_CosTime_TIO_tie<T>::time ()
{
  return POA_Tie_Base<T>::ptr->time ();
}

template<class T>
void
POA_CosTime_TIO_tie<T>::destroy ()
{
  POA_Tie_Base<T>::ptr->destroy ();
}

#endif

#ifndef HAVE_NAMESPACE

template<class T>
class POA_CosTime_TimeService_tie : 
  virtual public POA_Tie_Base<T>,
  virtual public POA_CosTime::TimeService
{
  public:
    POA_CosTime_TimeService_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    POA_CosTime_TimeService_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    POA_CosTime_TimeService_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    POA_CosTime_TimeService_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~POA_CosTime_TimeService_tie ();

    PortableServer::POA_ptr _default_POA ();

    CosTime::UTO_ptr universal_time();
    CosTime::UTO_ptr secure_universal_time();
    CosTime::UTO_ptr new_universal_time( TimeBase::TimeT time, TimeBase::InaccuracyT inaccuracy, TimeBase::TdfT tdf );
    CosTime::UTO_ptr uto_from_utc( const TimeBase::UtcT& utc );
    CosTime::TIO_ptr new_interval( TimeBase::TimeT lower, TimeBase::TimeT upper );

  protected:
    POA_CosTime_TimeService_tie () {};

  private:
    POA_CosTime_TimeService_tie (const POA_CosTime_TimeService_tie<T> &);
    void operator= (const POA_CosTime_TimeService_tie<T> &);
};

template<class T>
POA_CosTime_TimeService_tie<T>::~POA_CosTime_TimeService_tie ()
{
}

template<class T>
PortableServer::POA_ptr
POA_CosTime_TimeService_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
CosTime::UTO_ptr
POA_CosTime_TimeService_tie<T>::universal_time ()
{
  return POA_Tie_Base<T>::ptr->universal_time ();
}

template<class T>
CosTime::UTO_ptr
POA_CosTime_TimeService_tie<T>::secure_universal_time ()
{
  return POA_Tie_Base<T>::ptr->secure_universal_time ();
}

template<class T>
CosTime::UTO_ptr
POA_CosTime_TimeService_tie<T>::new_universal_time (TimeBase::TimeT time, TimeBase::InaccuracyT inaccuracy, TimeBase::TdfT tdf)
{
  return POA_Tie_Base<T>::ptr->new_universal_time (time, inaccuracy, tdf);
}

template<class T>
CosTime::UTO_ptr
POA_CosTime_TimeService_tie<T>::uto_from_utc (const TimeBase::UtcT& utc)
{
  return POA_Tie_Base<T>::ptr->uto_from_utc (utc);
}

template<class T>
CosTime::TIO_ptr
POA_CosTime_TimeService_tie<T>::new_interval (TimeBase::TimeT lower, TimeBase::TimeT upper)
{
  return POA_Tie_Base<T>::ptr->new_interval (lower, upper);
}

#endif

#endif // MICO_CONF_NO_POA

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)

extern CORBA::StaticTypeInfo *_marshaller_TimeBase_UtcT;

extern CORBA::StaticTypeInfo *_marshaller_TimeBase_IntervalT;

extern CORBA::StaticTypeInfo *_marshaller_CosTime_TimeComparison;

extern CORBA::StaticTypeInfo *_marshaller_CosTime_ComparisonType;

extern CORBA::StaticTypeInfo *_marshaller_CosTime_OverlapType;

extern CORBA::StaticTypeInfo *_marshaller_CosTime_TimeUnavailable;

extern CORBA::StaticTypeInfo *_marshaller_CosTime_UTO;

extern CORBA::StaticTypeInfo *_marshaller_CosTime_TIO;

extern CORBA::StaticTypeInfo *_marshaller_CosTime_TimeService;

#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)


#if !defined(MICO_NO_TOPLEVEL_MODULES) && !defined(MICO_IN_GENERATED_CODE)
#include <mico/template_impl.h>
#endif

#endif
