perf_server_t.cc
来自「C++的CORBA程序源代码,isporb.1.1.1.tar.gz」· CC 代码 · 共 131 行
CC
131 行
// Don't modify this file as it will be overwritten.//#include "perf_server_t.hh"#include <iostream.h>int seq_size = 100;voidTestOneway_templated::test_no_param( CORBA2::Environment& env){}voidTestOneway_templated::test_prim_args( CORBA2::Short shortVal, CORBA2::Long longVal, CORBA2::Float floatVal, CORBA2::Double doubleVal, CORBA2::Char charVal, const char* stringVal, CORBA2::Environment& env){}voidTestOneway_templated::test_struct( const PerfStruct& structVal, CORBA2::Environment& env){}voidTestOneway_templated::test_prim_seq( const shortSeq& shortVal, const longSeq& longVal, const floatSeq& floatVal, const doubleSeq& doubleVal, const charSeq& charVal, const stringSeq& stringVal, CORBA2::Environment& env){}voidTestOneway_templated::test_struct_seq( const structSeq& structVal, CORBA2::Environment& env){}voidTestOneway_templated::test_struct_array( const structArray arrayVal, CORBA2::Environment& env){}CORBA2::LongTestReqReply_templated::test_prim_args( CORBA2::Short shortVal, CORBA2::Long longVal, CORBA2::Float floatVal, CORBA2::Double doubleVal, CORBA2::Char charVal, const char* stringVal, CORBA2::Short& inoutShort, CORBA2::Long& inoutLong, CORBA2::Float& inoutFloat, CORBA2::Double& inoutDouble, CORBA2::Char& inoutChar, char*& inoutString, CORBA2::Short& outShort, CORBA2::Long& outLong, CORBA2::Float& outFloat, CORBA2::Double& outDouble, CORBA2::Char& outChar, char*& outString, CORBA2::Environment& env){ outShort = 2; outLong = 2; outFloat = 2.0; outDouble = 2.0; outChar = 2; outString = CORBA2::string_dup("string out"); return 0;}CORBA2::LongTestReqReply_templated::test_struct_args( const PerfStruct& structVal, PerfStruct& inoutStruct, PerfStruct*& outStruct, CORBA2::Environment& env){ outStruct = new PerfStruct; return 0;}CORBA2::LongTestReqReply_templated::test_prim_seq( const shortSeq& shortVal, const longSeq& longVal, const floatSeq& floatVal, const doubleSeq& doubleVal, const charSeq& charVal, const stringSeq& stringVal, shortSeq& inoutShort, longSeq& inoutLong, floatSeq& inoutFloat, doubleSeq& inoutDouble, charSeq& inoutChar, stringSeq& inoutString, shortSeq*& outShort, longSeq*& outLong, floatSeq*& outFloat, doubleSeq*& outDouble, charSeq*& outChar, stringSeq*& outString, CORBA2::Environment& env){ outShort = new shortSeq(_shortSeq); outLong = new longSeq(_longSeq); outFloat = new floatSeq(_floatSeq); outDouble = new doubleSeq(_doubleSeq); outChar = new charSeq(_charSeq); outString = new stringSeq(_stringSeq); return 1;}CORBA2::LongTestReqReply_templated::test_struct_seq( const structSeq& structVal, structSeq& inoutStruct, structSeq*& outStruct, CORBA2::Environment& env){ outStruct = new structSeq(_structSeq); return 1;}CORBA2::LongTestReqReply_templated::test_struct_array( const structArray structVal, structArray inoutStruct, structArray_slice*& outStruct, CORBA2::Environment& env){#ifdef _IN_ORBIX20 structArray_slice *res = structArray_alloc (); if (res) for (int i = 0; i < 100; i++) ((PerfStruct *)res)[i] = ((PerfStruct *)structVal)[i]; outStruct = res;#else // _IN_ORBIX20 outStruct = structArray_dup(structVal);#endif // _IN_ORBIX20 return 0;}TestReqReply_templated::TestReqReply_templated(){ // _shortSeq = new shortSeq; // _longSeq = new longSeq; // _floatSeq = new floatSeq; // _doubleSeq = new doubleSeq; // _charSeq = new charSeq; // _stringSeq = new stringSeq; // _structSeq = new structSeq; // _structArray = structArray_alloc; _shortSeq.length(seq_size); _longSeq.length(seq_size); _floatSeq.length(seq_size); _doubleSeq.length(seq_size); _charSeq.length(seq_size); _stringSeq.length(seq_size); for (int i=0; i< seq_size; i++) { (_shortSeq)[i]=0; (_longSeq)[i]=0; (_floatSeq)[i]=0; (_doubleSeq)[i]=0; (_charSeq)[i]=0; (_stringSeq)[i]=CORBA2::string_dup("String"); _structArray[i].stringVal=CORBA2::string_dup("String");//_structSeq[i]=new PerfStruct; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?