RTI Connext CORBA Compatibility Kit  Version 6.0.0
 All Groups Pages
MessageS.cpp

[$(NDDSHOME)/example/CPP/corba/MessageS.h]

// -*- C++ -*-
// TAO_IDL - Generated from
// be/be_codegen.cpp:458
#ifndef _TAO_IDL_MESSAGES_ONBGPI_H_
#define _TAO_IDL_MESSAGES_ONBGPI_H_
#include "MessageC.h"
#include "tao/PortableServer/Basic_SArguments.h"
#include "tao/PortableServer/Special_Basic_SArguments.h"
#include "tao/PortableServer/BD_String_SArgument_T.h"
#include "tao/PortableServer/Fixed_Size_SArgument_T.h"
#include "tao/PortableServer/Var_Size_SArgument_T.h"
#include "tao/AnyTypeCode/Any.h"
#include "tao/PortableServer/Object_SArg_Traits.h"
#include "tao/PortableServer/UB_String_SArguments.h"
#include "tao/PortableServer/get_arg.h"
#include "tao/Special_Basic_Arguments.h"
#include "tao/UB_String_Arguments.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/PortableServer/PortableServer.h"
#include "tao/PortableServer/Servant_Base.h"
// TAO_IDL - Generated from
// be/be_visitor_arg_traits.cpp:66
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
// Arg traits specializations.
namespace TAO
{
// TAO_IDL - Generated from
// be/be_visitor_arg_traits.cpp:945
template<>
class SArg_Traits< ::DateTime>
: public
Fixed_Size_SArg_Traits_T<
::DateTime,
TAO::Any_Insert_Policy_Stream
>
{
};
#if !defined (_MESSAGETEXT255__SARG_TRAITS_)
#define _MESSAGETEXT255__SARG_TRAITS_
template<>
class SArg_Traits<MessageText_255>
: public
BD_String_SArg_Traits_T<
CORBA::String_var,
255,
TAO::Any_Insert_Policy_Stream
>
{
};
#endif /* end #if !defined */
// TAO_IDL - Generated from
// be/be_visitor_arg_traits.cpp:945
template<>
class SArg_Traits< ::Message>
: public
Var_Size_SArg_Traits_T<
::Message,
TAO::Any_Insert_Policy_Stream
>
{
};
// TAO_IDL - Generated from
// be/be_visitor_arg_traits.cpp:145
#if !defined (_MESSAGERECEIVER__SARG_TRAITS_)
#define _MESSAGERECEIVER__SARG_TRAITS_
template<>
class SArg_Traits< ::MessageReceiver>
: public
Object_SArg_Traits_T<
::MessageReceiver_ptr,
::MessageReceiver_var,
::MessageReceiver_out,
TAO::Any_Insert_Policy_Stream
>
{
};
#endif /* end #if !defined */
}
TAO_END_VERSIONED_NAMESPACE_DECL
// TAO_IDL - Generated from
// be/be_visitor_interface/interface_sh.cpp:73
class POA_MessageReceiver;
typedef POA_MessageReceiver *POA_MessageReceiver_ptr;
class POA_MessageReceiver
: public virtual PortableServer::ServantBase
{
protected:
POA_MessageReceiver (void);
public:
typedef ::MessageReceiver _stub_type;
typedef ::MessageReceiver_ptr _stub_ptr_type;
typedef ::MessageReceiver_var _stub_var_type;
POA_MessageReceiver (const POA_MessageReceiver& rhs);
virtual ~POA_MessageReceiver (void);
virtual ::CORBA::Boolean _is_a (const char* logical_type_id);
virtual void _dispatch (
TAO_ServerRequest & req,
TAO::Portable_Server::Servant_Upcall *servant_upcall);
::MessageReceiver *_this (void);
virtual const char* _interface_repository_id (void) const;
// TAO_IDL - Generated from
// be/be_visitor_operation/operation_sh.cpp:36
virtual void sendMessage (
const ::Message & msg) = 0;
static void sendMessage_skel (
TAO_ServerRequest &server_request,
TAO::Portable_Server::Servant_Upcall *servant_upcall,
TAO_ServantBase *servant);
};
#include "MessageS_T.h"
#endif /* ifndef */

[$(NDDSHOME)/example/CPP/corba/MessageS.cpp]

// -*- C++ -*-
// TAO_IDL - Generated from
// be/be_codegen.cpp:649
#ifndef _TAO_IDL_MESSAGES_CGPRJ5_CPP_
#define _TAO_IDL_MESSAGES_CGPRJ5_CPP_
#include "MessageS.h"
#include "tao/PortableServer/Operation_Table_Perfect_Hash.h"
#include "tao/PortableServer/Upcall_Command.h"
#include "tao/PortableServer/Upcall_Wrapper.h"
#include "tao/TAO_Server_Request.h"
#include "tao/ORB_Core.h"
#include "tao/Profile.h"
#include "tao/Stub.h"
#include "tao/IFR_Client_Adapter.h"
#include "tao/Object_T.h"
#include "tao/AnyTypeCode/TypeCode.h"
#include "tao/AnyTypeCode/DynamicC.h"
#include "tao/CDR.h"
#include "tao/operation_details.h"
#include "tao/PortableInterceptor.h"
#include "ace/Dynamic_Service.h"
#include "ace/Malloc_Allocator.h"
// TAO_IDL - Generated from
// be/be_interface.cpp:1865
class TAO_MessageReceiver_Perfect_Hash_OpTable
: public TAO_Perfect_Hash_OpTable
{
private:
unsigned int hash (const char *str, unsigned int len);
public:
const TAO_operation_db_entry * lookup (const char *str, unsigned int len);
};
/* C++ code produced by gperf version 2.8 (ACE version) */
/* Command-line: /local/applications/CORBA/ACE-TAO/ACE+TAO-2.4.1/build/x64Linux3gcc4.8.2/ACE_wrappers/bin/ace_gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_MessageReceiver_Perfect_Hash_OpTable -N lookup */
unsigned int
TAO_MessageReceiver_Perfect_Hash_OpTable::hash (const char *str, unsigned int len)
{
static const unsigned char asso_values[] =
{
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 0, 17, 0, 17, 17,
0, 5, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 0, 0, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17,
};
return len + asso_values[static_cast<int>(str[len - 1])] + asso_values[static_cast<int>(str[0])];
}
const TAO_operation_db_entry *
TAO_MessageReceiver_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len)
{
enum
{
TOTAL_KEYWORDS = 6,
MIN_WORD_LENGTH = 5,
MAX_WORD_LENGTH = 14,
MIN_HASH_VALUE = 5,
MAX_HASH_VALUE = 16,
HASH_VALUE_RANGE = 12,
DUPLICATES = 0,
WORDLIST_SIZE = 11
};
static const TAO_operation_db_entry wordlist[] =
{
{"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0},
{"_is_a", &TAO_ServantBase::_is_a_thru_poa_skel, 0},
{"",0,0},{"",0,0},{"",0,0},{"",0,0},
{"_component", &TAO_ServantBase::_component_thru_poa_skel, 0},
{"",0,0},{"",0,0},
{"_non_existent", &TAO_ServantBase::_non_existent_thru_poa_skel, 0},
{"_repository_id", &TAO_ServantBase::_repository_id_thru_poa_skel, 0},
{"_interface", &TAO_ServantBase::_interface_skel, 0},
{"sendMessage", &POA_MessageReceiver::sendMessage_skel, 0},
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
unsigned int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
{
const char *s = wordlist[key].opname;
if (*str == *s && !ACE_OS::strncmp (str + 1, s + 1, len - 1))
return &wordlist[key];
}
}
return 0;
}
static TAO_MessageReceiver_Perfect_Hash_OpTable tao_MessageReceiver_optable;
// TAO_IDL - Generated from
// be/be_visitor_interface/interface_ss.cpp:90
POA_MessageReceiver::POA_MessageReceiver (void)
: TAO_ServantBase ()
{
this->optable_ = &tao_MessageReceiver_optable;
}
POA_MessageReceiver::POA_MessageReceiver (const POA_MessageReceiver& rhs)
: TAO_Abstract_ServantBase (rhs),
TAO_ServantBase (rhs)
{
}
POA_MessageReceiver::~POA_MessageReceiver (void)
{
}
// TAO_IDL - Generated from
// be/be_visitor_operation/upcall_command_ss.cpp:80
class sendMessage_MessageReceiver
: public TAO::Upcall_Command
{
public:
inline sendMessage_MessageReceiver (
POA_MessageReceiver * servant,
TAO_Operation_Details const * operation_details,
TAO::Argument * const args[])
: servant_ (servant)
, operation_details_ (operation_details)
, args_ (args)
{
}
virtual void execute (void)
{
TAO::SArg_Traits< ::Message>::in_arg_type arg_1 =
TAO::Portable_Server::get_in_arg< ::Message> (
this->operation_details_,
this->args_,
1);
this->servant_->sendMessage (
arg_1);
}
private:
POA_MessageReceiver * const servant_;
TAO_Operation_Details const * const operation_details_;
TAO::Argument * const * const args_;
};
// TAO_IDL - Generated from
// be/be_visitor_operation/operation_ss.cpp:168
void POA_MessageReceiver::sendMessage_skel (
TAO_ServerRequest & server_request,
TAO::Portable_Server::Servant_Upcall *TAO_INTERCEPTOR (servant_upcall),
TAO_ServantBase *servant)
{
#if TAO_HAS_INTERCEPTORS == 1
static ::CORBA::TypeCode_ptr const * const exceptions = 0;
static ::CORBA::ULong const nexceptions = 0;
#endif /* TAO_HAS_INTERCEPTORS */
TAO::SArg_Traits< void>::ret_val retval;
TAO::SArg_Traits< ::Message>::in_arg_val _tao_msg;
TAO::Argument * const args[] =
{
&retval,
&_tao_msg
};
static size_t const nargs = 2;
POA_MessageReceiver * const impl =
dynamic_cast<POA_MessageReceiver *> (servant);
if (!impl)
{
throw ::CORBA::INTERNAL ();
}
sendMessage_MessageReceiver command (
impl,
server_request.operation_details (),
args);
TAO::Upcall_Wrapper upcall_wrapper;
upcall_wrapper.upcall (server_request
, args
, nargs
, command
#if TAO_HAS_INTERCEPTORS == 1
, servant_upcall
, exceptions
, nexceptions
#endif /* TAO_HAS_INTERCEPTORS == 1 */
);
}
// TAO_IDL - Generated from
// be/be_visitor_interface/interface_ss.cpp:163
::CORBA::Boolean POA_MessageReceiver::_is_a (const char* value)
{
return
(
ACE_OS::strcmp (
value,
"IDL:MessageReceiver:1.0"
) == 0 ||
!ACE_OS::strcmp (
value,
"IDL:omg.org/CORBA/Object:1.0"
)
);
}
const char* POA_MessageReceiver::_interface_repository_id (void) const
{
return "IDL:MessageReceiver:1.0";
}
// TAO_IDL - Generated from
// be/be_visitor_interface/interface_ss.cpp:423
void POA_MessageReceiver::_dispatch (
TAO_ServerRequest & req,
TAO::Portable_Server::Servant_Upcall* servant_upcall)
{
this->synchronous_upcall_dispatch (req, servant_upcall, this);
}
// TAO_IDL - Generated from
// be/be_visitor_interface/interface_ss.cpp:370
MessageReceiver *
POA_MessageReceiver::_this (void)
{
TAO_Stub *stub = this->_create_stub ();
TAO_Stub_Auto_Ptr safe_stub (stub);
::CORBA::Object_ptr tmp = CORBA::Object_ptr ();
::CORBA::Boolean const _tao_opt_colloc =
stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ();
ACE_NEW_RETURN (
tmp,
::CORBA::Object (stub, _tao_opt_colloc, this),
0);
::CORBA::Object_var obj = tmp;
(void) safe_stub.release ();
typedef ::MessageReceiver STUB_SCOPED_NAME;
return
TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow (
obj.in ());
}
#endif /* ifndef */

RTI Connext CORBA Compatibility Kit Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc