rtschedulerc.cpp

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 1,697 行 · 第 1/3 页

CPP
1,697
字号
// -*- C++ -*-
//
// RTSchedulerC.cpp,v 1.8 2003/12/29 17:41:05 bala Exp

// ****  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_codegen.cpp:338


#include "RTScheduler.h"
#include "tao/ORB_Core.h"
#include "tao/Typecode.h"
#include "tao/Var_Size_Argument_T.h"
#include "ace/OS_NS_string.h"

#if defined (__BORLANDC__)
#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
#endif /* __BORLANDC__ */

#if !defined (__ACE_INLINE__)
#include "RTSchedulerC.i"
#endif /* !defined INLINE */

// TAO_IDL - Generated from
// be/be_visitor_arg_traits.cpp:62

// Arg traits specializations.
namespace TAO
{

  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:265

#if !defined (_CORBA_POLICYLIST__ARG_TRAITS_CS_)
#define _CORBA_POLICYLIST__ARG_TRAITS_CS_

  ACE_TEMPLATE_SPECIALIZATION
  class TAO_RTScheduler_Export Arg_Traits<CORBA::PolicyList>
    : public
        Var_Size_Arg_Traits_T<
            CORBA::PolicyList,
            CORBA::PolicyList_var,
            CORBA::PolicyList_out
          >
  {
  };

#endif /* end #if !defined */
}


// TAO_IDL - Generated from
// be/be_visitor_interface/interface_cs.cpp:60

// Traits specializations for RTScheduling::ThreadAction.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
RTScheduling::ThreadAction_ptr
TAO::Objref_Traits<RTScheduling::ThreadAction>::tao_duplicate (
    RTScheduling::ThreadAction_ptr p
  )
{
  return RTScheduling::ThreadAction::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<RTScheduling::ThreadAction>::tao_release (
    RTScheduling::ThreadAction_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
RTScheduling::ThreadAction_ptr
TAO::Objref_Traits<RTScheduling::ThreadAction>::tao_nil (void)
{
  return RTScheduling::ThreadAction::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<RTScheduling::ThreadAction>::tao_marshal (
    RTScheduling::ThreadAction_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return p->marshal (cdr);
}

// Function pointer for collocation factory initialization.
TAO::Collocation_Proxy_Broker *
(*RTScheduling__TAO_ThreadAction_Proxy_Broker_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;

RTScheduling::ThreadAction::ThreadAction (void)
{}

RTScheduling::ThreadAction::~ThreadAction (void)
{}

RTScheduling::ThreadAction_ptr
RTScheduling::ThreadAction::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (_tao_objref))
    {
      return ThreadAction::_nil ();
    }

  ThreadAction_ptr proxy =
    dynamic_cast<ThreadAction_ptr> (_tao_objref);

  return ThreadAction::_duplicate (proxy);
}

RTScheduling::ThreadAction_ptr
RTScheduling::ThreadAction::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (_tao_objref))
    {
      return ThreadAction::_nil ();
    }

  ThreadAction_ptr proxy =
    dynamic_cast<ThreadAction_ptr> (_tao_objref);

  return ThreadAction::_duplicate (proxy);
}

RTScheduling::ThreadAction_ptr
RTScheduling::ThreadAction::_duplicate (ThreadAction_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }

  return obj;
}

CORBA::Boolean
RTScheduling::ThreadAction::_is_a (
    const char *value
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:RTScheduling/ThreadAction:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CORBA/LocalObject:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CORBA/Object:1.0"
        )
     )
    {
      return 1; // success using local knowledge
    }
  else
    {
      return 0;
    }
}

const char* RTScheduling::ThreadAction::_interface_repository_id (void) const
{
  return "IDL:RTScheduling/ThreadAction:1.0";
}

CORBA::Boolean
RTScheduling::ThreadAction::marshal (TAO_OutputCDR &)
{
  return 0;
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/typecode_defn.cpp:284

static const CORBA::Long _oc_RTScheduling_ThreadAction[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  34,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x52545363),
  ACE_NTOHL (0x68656475),
  ACE_NTOHL (0x6c696e67),
  ACE_NTOHL (0x2f546872),
  ACE_NTOHL (0x65616441),
  ACE_NTOHL (0x6374696f),
  ACE_NTOHL (0x6e3a312e),
  ACE_NTOHL (0x30000000),  // repository ID = IDL:RTScheduling/ThreadAction:1.0
    13,
  ACE_NTOHL (0x54687265),
  ACE_NTOHL (0x61644163),
  ACE_NTOHL (0x74696f6e),
  ACE_NTOHL (0x0),  // name = ThreadAction
  };

static CORBA::TypeCode _tc_TAO_tc_RTScheduling_ThreadAction (
    CORBA::tk_objref,
    sizeof (_oc_RTScheduling_ThreadAction),
    (char *) &_oc_RTScheduling_ThreadAction,
    0,
    sizeof (RTScheduling::ThreadAction)
  );

namespace RTScheduling
{
  ::CORBA::TypeCode_ptr _tc_ThreadAction =
    &_tc_TAO_tc_RTScheduling_ThreadAction;
}

// TAO_IDL - Generated from
// be/be_visitor_interface/interface_cs.cpp:60

// Traits specializations for RTScheduling::DistributableThread.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
RTScheduling::DistributableThread_ptr
TAO::Objref_Traits<RTScheduling::DistributableThread>::tao_duplicate (
    RTScheduling::DistributableThread_ptr p
  )
{
  return RTScheduling::DistributableThread::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<RTScheduling::DistributableThread>::tao_release (
    RTScheduling::DistributableThread_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
RTScheduling::DistributableThread_ptr
TAO::Objref_Traits<RTScheduling::DistributableThread>::tao_nil (void)
{
  return RTScheduling::DistributableThread::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<RTScheduling::DistributableThread>::tao_marshal (
    RTScheduling::DistributableThread_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return p->marshal (cdr);
}

// Function pointer for collocation factory initialization.
TAO::Collocation_Proxy_Broker *
(*RTScheduling__TAO_DistributableThread_Proxy_Broker_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;

// TAO_IDL - Generated from
// be/be_visitor_typecode/typecode_defn.cpp:284

static const CORBA::Long _oc_RTScheduling_DistributableThread_DT_State[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  50,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x52545363),
  ACE_NTOHL (0x68656475),
  ACE_NTOHL (0x6c696e67),
  ACE_NTOHL (0x2f446973),
  ACE_NTOHL (0x74726962),
  ACE_NTOHL (0x75746162),
  ACE_NTOHL (0x6c655468),
  ACE_NTOHL (0x72656164),
  ACE_NTOHL (0x2f44545f),
  ACE_NTOHL (0x53746174),
  ACE_NTOHL (0x653a312e),
  ACE_NTOHL (0x30000000),  // repository ID = IDL:RTScheduling/DistributableThread/DT_State:1.0
  9,
  ACE_NTOHL (0x44545f53),
  ACE_NTOHL (0x74617465),
  ACE_NTOHL (0x0),  // name = DT_State
  2, // member count
  7,
  ACE_NTOHL (0x41435449),
  ACE_NTOHL (0x56450000),  // name = ACTIVE
  10,
  ACE_NTOHL (0x43414e43),
  ACE_NTOHL (0x454c4c45),
  ACE_NTOHL (0x44000000),  // name = CANCELLED
  };

static CORBA::TypeCode _tc_TAO_tc_RTScheduling_DistributableThread_DT_State (
    CORBA::tk_enum,
    sizeof (_oc_RTScheduling_DistributableThread_DT_State),
    (char *) &_oc_RTScheduling_DistributableThread_DT_State,
    0,
    sizeof (RTScheduling::DistributableThread::DT_State)
  );

::CORBA::TypeCode_ptr RTScheduling::DistributableThread::_tc_DT_State =
  &_tc_TAO_tc_RTScheduling_DistributableThread_DT_State;

RTScheduling::DistributableThread::DistributableThread (void)
{}

RTScheduling::DistributableThread::~DistributableThread (void)
{}

RTScheduling::DistributableThread_ptr
RTScheduling::DistributableThread::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (_tao_objref))
    {
      return DistributableThread::_nil ();
    }

  DistributableThread_ptr proxy =
    dynamic_cast<DistributableThread_ptr> (_tao_objref);

  return DistributableThread::_duplicate (proxy);
}

RTScheduling::DistributableThread_ptr
RTScheduling::DistributableThread::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (_tao_objref))
    {
      return DistributableThread::_nil ();
    }

  DistributableThread_ptr proxy =
    dynamic_cast<DistributableThread_ptr> (_tao_objref);

  return DistributableThread::_duplicate (proxy);
}

RTScheduling::DistributableThread_ptr
RTScheduling::DistributableThread::_duplicate (DistributableThread_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }

  return obj;
}

CORBA::Boolean
RTScheduling::DistributableThread::_is_a (
    const char *value
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:RTScheduling/DistributableThread:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CORBA/LocalObject:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CORBA/Object:1.0"
        )
     )
    {
      return 1; // success using local knowledge
    }
  else
    {
      return 0;
    }
}

const char* RTScheduling::DistributableThread::_interface_repository_id (void) const
{
  return "IDL:RTScheduling/DistributableThread:1.0";
}

CORBA::Boolean
RTScheduling::DistributableThread::marshal (TAO_OutputCDR &)
{
  return 0;
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/typecode_defn.cpp:284

static const CORBA::Long _oc_RTScheduling_DistributableThread[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  41,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x52545363),
  ACE_NTOHL (0x68656475),
  ACE_NTOHL (0x6c696e67),
  ACE_NTOHL (0x2f446973),
  ACE_NTOHL (0x74726962),
  ACE_NTOHL (0x75746162),
  ACE_NTOHL (0x6c655468),
  ACE_NTOHL (0x72656164),
  ACE_NTOHL (0x3a312e30),
  ACE_NTOHL (0x0),  // repository ID = IDL:RTScheduling/DistributableThread:1.0
    20,
  ACE_NTOHL (0x44697374),
  ACE_NTOHL (0x72696275),
  ACE_NTOHL (0x7461626c),
  ACE_NTOHL (0x65546872),
  ACE_NTOHL (0x65616400),  // name = DistributableThread
  };

static CORBA::TypeCode _tc_TAO_tc_RTScheduling_DistributableThread (
    CORBA::tk_objref,
    sizeof (_oc_RTScheduling_DistributableThread),
    (char *) &_oc_RTScheduling_DistributableThread,
    0,
    sizeof (RTScheduling::DistributableThread)
  );

namespace RTScheduling
{
  ::CORBA::TypeCode_ptr _tc_DistributableThread =
    &_tc_TAO_tc_RTScheduling_DistributableThread;
}

// TAO_IDL - Generated from
// be/be_visitor_interface/interface_cs.cpp:60

// Traits specializations for RTScheduling::Current.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
RTScheduling::Current_ptr
TAO::Objref_Traits<RTScheduling::Current>::tao_duplicate (
    RTScheduling::Current_ptr p
  )
{
  return RTScheduling::Current::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<RTScheduling::Current>::tao_release (
    RTScheduling::Current_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
RTScheduling::Current_ptr
TAO::Objref_Traits<RTScheduling::Current>::tao_nil (void)
{
  return RTScheduling::Current::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<RTScheduling::Current>::tao_marshal (
    RTScheduling::Current_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return p->marshal (cdr);
}

// Function pointer for collocation factory initialization.
TAO::Collocation_Proxy_Broker *
(*RTScheduling__TAO_Current_Proxy_Broker_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;

// TAO_IDL - Generated from
// be/be_visitor_exception/exception_cs.cpp:63

RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE::UNSUPPORTED_SCHEDULING_DISCIPLINE (void)
  : CORBA::UserException (
        "IDL:RTScheduling/Current/UNSUPPORTED_SCHEDULING_DISCIPLINE:1.0",
        "UNSUPPORTED_SCHEDULING_DISCIPLINE"
      )
{
}

RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE::~UNSUPPORTED_SCHEDULING_DISCIPLINE (void)
{
}

RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE::UNSUPPORTED_SCHEDULING_DISCIPLINE (const ::RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE &_tao_excp)
  : CORBA::UserException (
        _tao_excp._rep_id (),
        _tao_excp._name ()
      )
{
}

RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE&
RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE::operator= (const ::RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE &_tao_excp)
{
  this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp);
  return *this;
}

RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE *
RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE::_downcast (CORBA::Exception *_tao_excp)
{
  if (!ACE_OS::strcmp ("IDL:RTScheduling/Current/UNSUPPORTED_SCHEDULING_DISCIPLINE:1.0", _tao_excp->_rep_id ()))
    {
      return ACE_dynamic_cast (UNSUPPORTED_SCHEDULING_DISCIPLINE *, _tao_excp);
    }
  else
    {
      return 0;
    }
}

CORBA::Exception *RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE::_alloc (void)
{
  CORBA::Exception *retval = 0;
  ACE_NEW_RETURN (retval, ::RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE, 0);
  return retval;
}

CORBA::Exception *

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?