// -*- C++ -*-
//
// $Id$

// ****  Code generated by the The ACE ORB (TAO) IDL Compiler ****
// TAO and the TAO IDL Compiler have been developed by:
//       Center for Distributed Object Computing
//       Washington University
//       St. Louis, MO
//       USA
//       http://www.cs.wustl.edu/~schmidt/doc-center.html
// and
//       Distributed Object Computing Laboratory
//       University of California at Irvine
//       Irvine, CA
//       USA
//       http://doc.ece.uci.edu/
// and
//       Institute for Software Integrated Systems
//       Vanderbilt University
//       Nashville, TN
//       USA
//       http://www.isis.vanderbilt.edu/
//
// Information about TAO is available at:
//     http://www.cs.wustl.edu/~schmidt/TAO.html


// TAO_IDL - Generated from
// be/be_visitor_interface/tie_si.cpp:96

#if defined (ACE_HAS_USING_KEYWORD)

template <class T> ACE_INLINE
POA_RtecScheduler::Scheduler_tie<T>::Scheduler_tie (T &t)
	: ptr_ (&t),
	  poa_ (PortableServer::POA::_nil ()),
	  rel_ (0)
{}

template <class T> ACE_INLINE
POA_RtecScheduler::Scheduler_tie<T>::Scheduler_tie (T &t, PortableServer::POA_ptr poa)
	: ptr_ (&t),
	  poa_ (PortableServer::POA::_duplicate (poa)),
	  rel_ (0)
{}

template <class T> ACE_INLINE
POA_RtecScheduler::Scheduler_tie<T>::Scheduler_tie (T *tp, CORBA::Boolean release)
	: ptr_ (tp),
	  poa_ (PortableServer::POA::_nil ()),
	  rel_ (release)
{}

template <class T> ACE_INLINE
POA_RtecScheduler::Scheduler_tie<T>::Scheduler_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release)
	: ptr_ (tp),
	  poa_ (PortableServer::POA::_duplicate (poa)),
	  rel_ (release)
{}

template <class T> ACE_INLINE
POA_RtecScheduler::Scheduler_tie<T>::~Scheduler_tie (void)
{
  if (this->rel_)
    {
      delete this->ptr_;
    }
}

template <class T> ACE_INLINE T *
POA_RtecScheduler::Scheduler_tie<T>::_tied_object (void)
{
  return this->ptr_;
}

template <class T> ACE_INLINE void
POA_RtecScheduler::Scheduler_tie<T>::_tied_object (T &obj)
{
  if (this->rel_)
    {
      delete this->ptr_;
    }
  
  this->ptr_ = &obj;
  this->rel_ = 0;
}

template <class T> ACE_INLINE void
POA_RtecScheduler::Scheduler_tie<T>::_tied_object (T *obj, CORBA::Boolean release)
{
  if (this->rel_)
    {
      delete this->ptr_;
    }
  
  this->ptr_ = obj;
  this->rel_ = release;
}

template <class T> ACE_INLINE CORBA::Boolean
POA_RtecScheduler::Scheduler_tie<T>::_is_owner (void)
{
  return this->rel_;
}

template <class T> ACE_INLINE void
POA_RtecScheduler::Scheduler_tie<T>::_is_owner (CORBA::Boolean b)
{
  this->rel_ = b;
}

template <class T> ACE_INLINE PortableServer::POA_ptr
POA_RtecScheduler::Scheduler_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL)
{
  if (!CORBA::is_nil (this->poa_.in ()))
    {
      return PortableServer::POA::_duplicate (this->poa_.in ());
    }
  
  return this->Scheduler::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
RtecScheduler::handle_t POA_RtecScheduler::Scheduler_tie<T>::create  (
    const char * entry_point
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::DUPLICATE_NAME,
    ::RtecScheduler::INTERNAL,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE
  ))
{
  return this->ptr_->create (
    entry_point
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
RtecScheduler::handle_t POA_RtecScheduler::Scheduler_tie<T>::lookup  (
    const char * entry_point
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UNKNOWN_TASK,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE
  ))
{
  return this->ptr_->lookup (
    entry_point
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
::RtecScheduler::RT_Info * POA_RtecScheduler::Scheduler_tie<T>::get  (
    ::RtecScheduler::handle_t handle
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UNKNOWN_TASK,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE
  ))
{
  return this->ptr_->get (
    handle
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::set  (
    ::RtecScheduler::handle_t handle,
    ::RtecScheduler::Criticality_t criticality,
    ::RtecScheduler::Time wc_time,
    ::RtecScheduler::Time typical_time,
    ::RtecScheduler::Time cached_time,
    ::RtecScheduler::Period_t period,
    ::RtecScheduler::Importance_t importance,
    ::RtecScheduler::Quantum_t quantum,
    ::RtecScheduler::Threads_t threads,
    ::RtecScheduler::Info_Type_t info_type
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UNKNOWN_TASK,
    ::RtecScheduler::INTERNAL,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE
  ))
{
  this->ptr_->set (
    handle,
    criticality,
    wc_time,
    typical_time,
    cached_time,
    period,
    importance,
    quantum,
    threads,
    info_type
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::reset  (
    ::RtecScheduler::handle_t handle,
    ::RtecScheduler::Criticality_t criticality,
    ::RtecScheduler::Time wc_time,
    ::RtecScheduler::Time typical_time,
    ::RtecScheduler::Time cached_time,
    ::RtecScheduler::Period_t period,
    ::RtecScheduler::Importance_t importance,
    ::RtecScheduler::Quantum_t quantum,
    ::RtecScheduler::Threads_t threads,
    ::RtecScheduler::Info_Type_t info_type
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UNKNOWN_TASK,
    ::RtecScheduler::INTERNAL,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE
  ))
{
  this->ptr_->reset (
    handle,
    criticality,
    wc_time,
    typical_time,
    cached_time,
    period,
    importance,
    quantum,
    threads,
    info_type
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::set_seq  (
    const ::RtecScheduler::RT_Info_Set & infos
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UNKNOWN_TASK,
    ::RtecScheduler::INTERNAL,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE
  ))
{
  this->ptr_->set_seq (
    infos
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::reset_seq  (
    const ::RtecScheduler::RT_Info_Set & infos
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UNKNOWN_TASK,
    ::RtecScheduler::INTERNAL,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE
  ))
{
  this->ptr_->reset_seq (
    infos
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::replace_seq  (
    const ::RtecScheduler::RT_Info_Set & infos
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UNKNOWN_TASK,
    ::RtecScheduler::INTERNAL,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE
  ))
{
  this->ptr_->replace_seq (
    infos
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::add_dependency  (
    ::RtecScheduler::handle_t handle,
    ::RtecScheduler::handle_t dependency,
    ::CORBA::Long number_of_calls,
    ::RtecScheduler::Dependency_Type_t dependency_type
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::UNKNOWN_TASK
  ))
{
  this->ptr_->add_dependency (
    handle,
    dependency,
    number_of_calls,
    dependency_type
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::remove_dependency  (
    ::RtecScheduler::handle_t handle,
    ::RtecScheduler::handle_t dependency,
    ::CORBA::Long number_of_calls,
    ::RtecScheduler::Dependency_Type_t dependency_type
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::UNKNOWN_TASK
  ))
{
  this->ptr_->remove_dependency (
    handle,
    dependency,
    number_of_calls,
    dependency_type
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::set_dependency_enable_state  (
    ::RtecScheduler::handle_t handle,
    ::RtecScheduler::handle_t dependency,
    ::CORBA::Long number_of_calls,
    ::RtecScheduler::Dependency_Type_t dependency_type,
    ::RtecScheduler::Dependency_Enabled_Type_t enabled
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::UNKNOWN_TASK
  ))
{
  this->ptr_->set_dependency_enable_state (
    handle,
    dependency,
    number_of_calls,
    dependency_type,
    enabled
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::set_dependency_enable_state_seq  (
    const ::RtecScheduler::Dependency_Set & dependencies
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::UNKNOWN_TASK
  ))
{
  this->ptr_->set_dependency_enable_state_seq (
    dependencies
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::set_rt_info_enable_state  (
    ::RtecScheduler::handle_t handle,
    ::RtecScheduler::RT_Info_Enabled_Type_t enabled
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::INTERNAL,
    ::RtecScheduler::UNKNOWN_TASK
  ))
{
  this->ptr_->set_rt_info_enable_state (
    handle,
    enabled
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::set_rt_info_enable_state_seq  (
    const ::RtecScheduler::RT_Info_Enable_State_Pair_Set & pair_set
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::INTERNAL,
    ::RtecScheduler::UNKNOWN_TASK
  ))
{
  this->ptr_->set_rt_info_enable_state_seq (
    pair_set
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::priority  (
    ::RtecScheduler::handle_t handle,
    ::RtecScheduler::OS_Priority_out o_priority,
    ::RtecScheduler::Preemption_Subpriority_t_out p_subpriority,
    ::RtecScheduler::Preemption_Priority_t_out p_priority
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UNKNOWN_TASK,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::NOT_SCHEDULED
  ))
{
  this->ptr_->priority (
    handle,
    o_priority,
    p_subpriority,
    p_priority
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::entry_point_priority  (
    const char * entry_point,
    ::RtecScheduler::OS_Priority_out o_priority,
    ::RtecScheduler::Preemption_Subpriority_t_out p_subpriority,
    ::RtecScheduler::Preemption_Priority_t_out p_priority
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UNKNOWN_TASK,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::NOT_SCHEDULED
  ))
{
  this->ptr_->entry_point_priority (
    entry_point,
    o_priority,
    p_subpriority,
    p_priority
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::compute_scheduling  (
    ::CORBA::Long minimum_priority,
    ::CORBA::Long maximum_priority,
    ::RtecScheduler::RT_Info_Set_out infos,
    ::RtecScheduler::Dependency_Set_out dependencies,
    ::RtecScheduler::Config_Info_Set_out configs,
    ::RtecScheduler::Scheduling_Anomaly_Set_out anomalies
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UTILIZATION_BOUND_EXCEEDED,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::INSUFFICIENT_THREAD_PRIORITY_LEVELS,
    ::RtecScheduler::TASK_COUNT_MISMATCH,
    ::RtecScheduler::INTERNAL,
    ::RtecScheduler::DUPLICATE_NAME
  ))
{
  this->ptr_->compute_scheduling (
    minimum_priority,
    maximum_priority,
    infos,
    dependencies,
    configs,
    anomalies
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::recompute_scheduling  (
    ::CORBA::Long minimum_priority,
    ::CORBA::Long maximum_priority,
    ::RtecScheduler::Scheduling_Anomaly_Set_out anomalies
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::UTILIZATION_BOUND_EXCEEDED,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::INSUFFICIENT_THREAD_PRIORITY_LEVELS,
    ::RtecScheduler::TASK_COUNT_MISMATCH,
    ::RtecScheduler::INTERNAL,
    ::RtecScheduler::DUPLICATE_NAME
  ))
{
  this->ptr_->recompute_scheduling (
    minimum_priority,
    maximum_priority,
    anomalies
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::get_rt_info_set  (
    ::RtecScheduler::RT_Info_Set_out infos
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::INTERNAL
  ))
{
  this->ptr_->get_rt_info_set (
    infos
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::get_dependency_set  (
    ::RtecScheduler::Dependency_Set_out dependencies
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::INTERNAL
  ))
{
  this->ptr_->get_dependency_set (
    dependencies
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::get_config_info_set  (
    ::RtecScheduler::Config_Info_Set_out configs
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::INTERNAL
  ))
{
  this->ptr_->get_config_info_set (
    configs
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::dispatch_configuration  (
    ::RtecScheduler::Preemption_Priority_t p_priority,
    ::RtecScheduler::OS_Priority_out o_priority,
    ::RtecScheduler::Dispatching_Type_t_out d_type
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::NOT_SCHEDULED,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::UNKNOWN_PRIORITY_LEVEL
  ))
{
  this->ptr_->dispatch_configuration (
    p_priority,
    o_priority,
    d_type
    ACE_ENV_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
RtecScheduler::Preemption_Priority_t POA_RtecScheduler::Scheduler_tie<T>::last_scheduled_priority  (
    ACE_ENV_SINGLE_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::NOT_SCHEDULED
  ))
{
  return this->ptr_->last_scheduled_priority (
    ACE_ENV_SINGLE_ARG_PARAMETER
  );
}

// TAO_IDL - Generated from 
// be/be_visitor_operation/tie_si.cpp:68

template <class T> ACE_INLINE
void POA_RtecScheduler::Scheduler_tie<T>::get_config_infos  (
    ::RtecScheduler::Config_Info_Set_out configs
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::RtecScheduler::SYNCHRONIZATION_FAILURE,
    ::RtecScheduler::NOT_SCHEDULED
  ))
{
  this->ptr_->get_config_infos (
    configs
    ACE_ENV_ARG_PARAMETER
  );
}

#endif /* ACE_HAS_USING_KEYWORD */

