📄 perfc.cc
字号:
if (_buffer && _release) { freebuf (_buffer); } _buffer = allocbuf (IT_s._maximum); _maximum = IT_s._maximum; _release = 1; } _length = IT_s._length; for (CORBA::ULong IT_j = 0; IT_j < _length; IT_j++) { _buffer[IT_j] = IT_s._buffer[IT_j]; } return *this;}CORBA::ULong _IDL_SEQUENCE_PerfStruct:: maximum () const{ return _maximum;}CORBA::ULong _IDL_SEQUENCE_PerfStruct:: length () const{ return _length;}void _IDL_SEQUENCE_PerfStruct:: length (CORBA::ULong len) { if (len > _maximum) { _IDL_SEQUENCE_PerfStruct tempSeq (*this); if (_buffer && _release) { { } freebuf (_buffer); } _release = 1; _length = len; _maximum = len; _buffer = allocbuf(len); for (CORBA::ULong IT_i = 0; IT_i < tempSeq._length; IT_i++) { _buffer[IT_i] = tempSeq._buffer[IT_i]; } } else if (len < _length) { if (_release) { } _length = len; } else { _length = len; }}PerfStruct& _IDL_SEQUENCE_PerfStruct:: operator [] (CORBA::ULong IT_i) { if (IT_i >= _length) ; return _buffer [IT_i];}const PerfStruct& _IDL_SEQUENCE_PerfStruct:: operator [] (CORBA::ULong IT_i) const { if (IT_i >= _length) ; return _buffer [IT_i];}PerfStruct* _IDL_SEQUENCE_PerfStruct:: allocbuf (CORBA::ULong nelems){ return (new PerfStruct[nelems]);}void _IDL_SEQUENCE_PerfStruct:: freebuf (PerfStruct* data){ if (data) delete [] data;}void _IDL_SEQUENCE_PerfStruct:: decodeInOutOp (CORBA::Request &IT_r) { CORBA::ULong IT_max; CORBA::ULong IT_length; IT_r >> IT_max; IT_r >> IT_length; unsigned char IT_codeSeqElems = IT_max ? 1 : 0; if (!_release || (IT_max > _maximum)) { if (_buffer && _release) { { } freebuf (_buffer); } _buffer = allocbuf (IT_max); _maximum = IT_max; _release = 1; } if (IT_length > IT_max) IT_r.makeRuntimeException4 (); else { for (CORBA::ULong IT_i = 0; IT_i < IT_length; IT_i++) { _buffer[IT_i].decodeInOutOp (IT_r); } } _length = IT_length;}void _IDL_SEQUENCE_PerfStruct:: encodeOp (CORBA::Request &IT_r) const { IT_r << _maximum; IT_r << _length; unsigned char IT_codeSeqElems = _maximum ? 1 : 0; for (CORBA::ULong IT_i = 0; IT_i < _length; IT_i++) { _buffer[IT_i].encodeOp (IT_r); }}void _IDL_SEQUENCE_PerfStruct:: decodeOp (CORBA::Request &IT_r) { IT_r >> _maximum; IT_r >> _length; unsigned char IT_codeSeqElems = _maximum ? 1 : 0; if (IT_codeSeqElems) { _buffer = allocbuf (_maximum); for (CORBA::ULong IT_i = 0; IT_i < _length; IT_i++) { _buffer[IT_i].decodeOp (IT_r); } } else _buffer = NULL;}PerfStruct& _IDL_SEQUENCE_PerfStruct_var:: operator[] (CORBA::ULong index) { return (*_ptr) [index];}const PerfStruct& _IDL_SEQUENCE_PerfStruct_var:: operator[] (CORBA::ULong index) const { return (*_ptr) [index];}#endifstructArray_slice* structArray_alloc () { return new structArray; }void structArray_free (structArray_slice *IT_p1) { delete IT_p1; } TestOneway::TestOneway (char *IT_OR) { m_pptr = new TestOneway_dispatch (IT_OR, this,(CORBA::Object*)this);} TestOneway::TestOneway (ObjectReference *IT_OR) { m_pptr = new TestOneway_dispatch (IT_OR, this,(CORBA::Object*)this);} #ifndef TestOnewayForwC#define TestOnewayForwCCORBA::ObjectRef TestOneway_getBase(void *IT_p){ return (TestOneway*) IT_p;}void TestOneway_release (TestOneway_ptr IT_p, CORBA::Environment &IT_env) { CORBA::release(IT_p, IT_env);}void TestOneway_release (TestOneway_ptr IT_p) { TestOneway_release (IT_p, CORBA::IT_chooseDefaultEnv ()); }TestOneway_ptr TestOneway_nil (CORBA::Environment &) { return TestOneway:: _nil ();}TestOneway_ptr TestOneway_nil () { return TestOneway_nil (CORBA::IT_chooseDefaultEnv ());}TestOneway_ptr TestOneway_duplicate (TestOneway_ptr IT_p, CORBA::Environment &IT_env) { return (TestOneway::_duplicate(IT_p, IT_env)); }TestOneway_ptr TestOneway_duplicate (TestOneway_ptr IT_p) { return TestOneway_duplicate (IT_p, CORBA::IT_chooseDefaultEnv ()); }#endifTestOneway* TestOneway:: _bind (const char* IT_markerServer, const char* host, const CORBA::Context &IT_c, CORBA::Environment &IT_env) { return (TestOneway*)CORBA::Factory.New (IT_markerServer, IT_env, IT_c, host, TestOneway_IMPL, TestOneway_IR);}TestOneway* TestOneway:: _bind (CORBA::Environment &IT_env) { return _bind (NULL,NULL,CORBA::Context(), IT_env); }TestOneway* TestOneway:: _bind (const char* IT_markerServer, const char* host, CORBA::Environment &IT_env) { return _bind (IT_markerServer, host, CORBA::Context (), IT_env); }TestOneway* TestOneway::_narrow (CORBA::Object* IT_obj, CORBA::Environment &IT_env) { CORBA::EnvExcRaiser IT_raise (&IT_env); if (CORBA::is_nil (IT_obj)) { IT_raise.maybeRaise(); return TestOneway:: _nil(); } TestOneway* IT_p = (TestOneway*)CORBA::Object::_castDown (IT_obj, TestOneway_IR, IT_env); IT_p = IT_p ? IT_p->__duplicate(IT_env) : NULL; if ((IT_env) &&(!strcmp(IT_env.exception()->id(), "CORBA::BAD_PARAM")) && (((CORBA::BAD_PARAM*)IT_env.exception())-> minor() == NARROW_FAILED)) { IT_env.exception_free(); } IT_raise.maybeRaise(); return IT_p; }void* TestOnewayProxyFactoryClass::New (char *IT_OR, CORBA::Environment&) { return new class TestOneway(IT_OR);}void* TestOnewayProxyFactoryClass::New (ObjectReference *IT_OR, CORBA::Environment&) { return new class TestOneway(IT_OR);}void* TestOnewayProxyFactoryClass::New2 () { return new class TestOneway();}void* TestOnewayProxyFactoryClass::IT_castUp (void *IT_p, char* IT_s) { void *IT_l; if (!CORBA::_interfaceCmp (IT_s,TestOneway_IR)) return IT_p; else if (IT_l=CORBA::ObjectFactoryClass::IT_castUp((CORBA::Object*)((class TestOneway*)IT_p),IT_s)) return IT_l; else return NULL; }CORBA::PPTR* TestOnewayProxyFactoryClass::pptr (void *IT_p) { return ((class TestOneway*)IT_p)->_pptr ();}void TestOnewayProxyFactoryClass::baseInterfaces (_IDL_SEQUENCE_string& seq) { add (seq, TestOneway_IR); CORBA::ObjectFactoryClass::baseInterfaces (seq);}void TestOneway:: test_no_param (CORBA::Environment &IT_env) throw (CORBA::SystemException) { CORBA::EnvExcRaiser IT_raise (&IT_env); if (IT_env || m_isNull) { IT_raise.maybeRaise (); return ; } CORBA::Request IT_r (this, "test_no_param",IT_env,1,1); IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env); if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) { IT_r.checkEnv (IT_env); } IT_raise.maybeRaise ();}void TestOneway:: test_prim_args (CORBA::Short shortVal, CORBA::Long longVal, CORBA::Float floatVal, CORBA::Double doubleVal, CORBA::Char charVal, const char * stringVal, CORBA::Environment &IT_env) throw (CORBA::SystemException) { CORBA::EnvExcRaiser IT_raise (&IT_env); if (IT_env || m_isNull) { IT_raise.maybeRaise (); return ; } CORBA::Request IT_r (this, "test_prim_args",IT_env,1,1); if (!IT_r.isException (IT_env)) { IT_r << shortVal; IT_r << longVal; IT_r << floatVal; IT_r << doubleVal; IT_r << charVal; IT_r.encodeStringOp (stringVal); } IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env); if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) { IT_r.checkEnv (IT_env); } IT_raise.maybeRaise ();}void TestOneway:: test_struct (const PerfStruct& structVal, CORBA::Environment &IT_env) throw (CORBA::SystemException) { CORBA::EnvExcRaiser IT_raise (&IT_env); if (IT_env || m_isNull) { IT_raise.maybeRaise (); return ; } CORBA::Request IT_r (this, "test_struct",IT_env,1,1); if (!IT_r.isException (IT_env)) { structVal.encodeOp (IT_r); } IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env); if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) { IT_r.checkEnv (IT_env); } IT_raise.maybeRaise ();}void TestOneway:: test_prim_seq (const shortSeq& shortVal, const longSeq& longVal, const floatSeq& floatVal, const doubleSeq& doubleVal, const charSeq& charVal, const stringSeq& stringVal, CORBA::Environment &IT_env) throw (CORBA::SystemException) { CORBA::EnvExcRaiser IT_raise (&IT_env); if (IT_env || m_isNull) { IT_raise.maybeRaise (); return ; } CORBA::Request IT_r (this, "test_prim_seq",IT_env,1,1); if (!IT_r.isException (IT_env)) { shortVal.encodeOp (IT_r); longVal.encodeOp (IT_r); floatVal.encodeOp (IT_r); doubleVal.encodeOp (IT_r); charVal.encodeOp (IT_r); stringVal.encodeOp (IT_r); } IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env); if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) { IT_r.checkEnv (IT_env); } IT_raise.maybeRaise ();}void TestOneway:: test_struct_seq (const structSeq& structVal, CORBA::Environment &IT_env) throw (CORBA::SystemException) { CORBA::EnvExcRaiser IT_raise (&IT_env); if (IT_env || m_isNull) { IT_raise.maybeRaise (); return ; } CORBA::Request IT_r (this, "test_struct_seq",IT_env,1,1); if (!IT_r.isException (IT_env)) { structVal.encodeOp (IT_r); } IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env); if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) { IT_r.checkEnv (IT_env); } IT_raise.maybeRaise ();}void TestOneway:: test_struct_array (const structArray arrayVal, CORBA::Environment &IT_env) throw (CORBA::SystemException) { CORBA::EnvExcRaiser IT_raise (&IT_env); if (IT_env || m_isNull) { IT_raise.maybeRaise (); return ; } CORBA::Request IT_r (this, "test_struct_array",IT_env,1,1); if (!IT_r.isException (IT_env)) { if (!arrayVal) { IT_r.makeRuntimeException5 (); return ; } else { PerfStruct const* IT_elem = (PerfStruct*) arrayVal; for (unsigned long i0 = 0; i0 < 100; i0++, IT_elem++) IT_elem->encodeOp (IT_r); } } IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env); if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) { IT_r.checkEnv (IT_env); } IT_raise.maybeRaise ();}TestOnewayProxyFactoryClass TestOnewayProxyFactory(1);#ifndef TestOneway_dispatch_implunsigned char TestOneway_dispatch::dispatch (CORBA::Request &IT_r, unsigned char, void *) { IT_r.makeRuntimeException1 ("TestOneway"); return 0;} #endifTestReqReply::TestReqReply (char *IT_OR) { m_pptr = new TestReqReply_dispatch (IT_OR, this,(CORBA::Object*)this);} TestReqReply::TestReqReply (ObjectReference *IT_OR) { m_pptr = new TestReqReply_dispatch (IT_OR, this,(CORBA::Object*)this);} #ifndef TestReqReplyForwC#define TestReqReplyForwCCORBA::ObjectRef TestReqReply_getBase(void *IT_p){ return (TestReqReply*) IT_p;}void TestReqReply_release (TestReqReply_ptr IT_p, CORBA::Environment &IT_env) { CORBA::release(IT_p, IT_env);}void TestReqReply_release (TestReqReply_ptr IT_p) { TestReqReply_release (IT_p, CORBA::IT_chooseDefaultEnv ()); }TestReqReply_ptr TestReqReply_nil (CORBA::Environment &) { return TestReqReply:: _nil ();}TestReqReply_ptr TestReqReply_nil () { return TestReqReply_nil (CORBA::IT_chooseDefaultEnv ());}TestReqReply_ptr TestReqReply_duplicate (TestReqReply_ptr IT_p, CORBA::Environment &IT_env) { return (TestReqReply::_duplicate(IT_p, IT_env)); }TestReqReply_ptr TestReqReply_duplicate (TestReqReply_ptr IT_p) { return TestReqReply_duplicate (IT_p, CORBA::IT_chooseDefaultEnv ()); }#endifTestReqReply* TestReqReply:: _bind (const char* IT_markerServer, const char* host, const CORBA::Context &IT_c, CORBA::Environment &IT_env) { return (TestReqReply*)CORBA::Factory.New (IT_markerServer, IT_env, IT_c, host, TestReqReply_IMPL, TestReqReply_IR);}TestReqReply* TestReqReply:: _bind (CORBA::Environment &IT_env) { return _bind (NULL,NULL,CORBA::Context(), IT_env); }TestReqReply* TestReqReply:: _bind (const char* IT_markerServer, const char* host, CORBA::Environment &IT_env) { return _bind (IT_markerServer, host, CORBA::Context (), IT_env); }TestReqReply* TestReqReply::_narrow (CORBA::Object* IT_obj, CORBA::Environment &IT_env) { CORBA::EnvExcRaiser IT_raise (&IT_env); if (CORBA::is_nil (IT_obj)) { IT_raise.maybeRaise(); return TestReqReply:: _nil(); } TestReqReply* IT_p = (TestReqReply*)CORBA::Object::_castDown (IT_obj, TestReqReply_IR, IT_env); IT_p = IT_p ? IT_p->__duplicate(IT_env) : NULL; if ((IT_env) &&(!strcmp(IT_env.exception()->id(), "CORBA::BAD_PARAM")) && (((CORBA::BAD_PARAM*)IT_env.exception())-> minor() == NARROW_FAILED)) { IT_env.exception_free(); } IT_raise.maybeRaise(); return IT_p; }void* TestReqReplyProxyFactoryClass::New (char *IT_OR, CORBA::Environment&) { return new class TestReqReply(IT_OR);}void* TestReqReplyProxyFactoryClass::New (ObjectReference *IT_OR, CORBA::Environment&) { return new class TestReqReply(IT_OR);}void* TestReqReplyProxyFactoryClass::New2 () { return new class TestReqReply();}void* TestReqReplyProxyFactoryClass::IT_castUp (void *IT_p, char* IT_s) { void *IT_l; if (!CORBA::_interfaceCmp (IT_s,TestReqReply_IR)) return IT_p; else if (IT_l=CORBA::ObjectFactoryClass::IT_castUp((CORBA::Object*)((class TestReqReply*)IT_p),IT_s)) return IT_l; else return NULL; }CORBA::PPTR* TestReqReplyProxyFactoryClass::pptr (void *IT_p) { return ((class TestReqReply*)IT_p)->_pptr ();}void TestReqReplyProxyFactoryClass::baseInterfaces (_IDL_SEQUENCE_string& seq) { add (seq, TestReqReply_IR); CORBA::ObjectFactoryClass::baseInterfaces (seq);}CORBA::Long TestReqReply:: test_prim_args (CORBA::Short shortVal, CORBA::Long longVal, CORBA::Float floatVal, CORBA::Double doubleVal, CORBA::Char charVal, const char * stringVal, CORBA::Short& inoutShort, CORBA::Long& inoutLong, CORBA::Float& inoutFloat, CORBA::Double& inoutDouble, CORBA::Char& inoutChar, char *& inoutString, CORBA::Short& outShort, CORBA::Long& outLong, CORBA::Float& outFloat, CORBA::Double& outDouble, CORBA::Char& outChar, char *& outString, CORBA::Environment &IT_env) throw (CORBA::SystemException) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -