⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 it_random_funcs.cxx

📁 这是经典的CORBA程序
💻 CXX
字号:
//-----------------------------------------------------------------------------// Copyright (c) 2003-2020 EBUPT INFO CO.,LTD//-----------------------------------------------------------------------------#include <omg/orb.hh>#include "it_random_funcs.h"// Global random generator object.//IT_GenieRandom*global_random = 0;IT_GenieRandom::IT_GenieRandom(    CORBA::ORB_ptr  orb,    CORBA::ULong    seed) :    IT_RandomAny(        orb,        3,                  // Maximum nesting depth.        5,                  // Maximum sequence length.        3,                  // Maximum recursive sequence length.        seed                // Random number seed    ){    // Add some random values for strings and typecodes.    //        add_string("");    add_string("x");    add_string("xy");    add_string("xyz");    add_string("buzz");    add_string("Orbix everywhere");    add_string("Making software work together (TM)");    add_string("foobar");    add_string("fred");    add_string("foo");    add_typecode(CORBA::_tc_void);    add_typecode(CORBA::_tc_short);    add_typecode(CORBA::_tc_long);    add_typecode(CORBA::_tc_ushort);    add_typecode(CORBA::_tc_ulong);    add_typecode(CORBA::_tc_longlong);    add_typecode(CORBA::_tc_ulonglong);    add_typecode(CORBA::_tc_float);    add_typecode(CORBA::_tc_double);    add_typecode(CORBA::_tc_longdouble);    add_typecode(CORBA::_tc_boolean);    add_typecode(CORBA::_tc_octet);    add_typecode(CORBA::_tc_char);    add_typecode(CORBA::_tc_string);    add_typecode(CORBA::_tc_wchar);    add_typecode(CORBA::_tc_wstring);    add_typecode(CORBA::_tc_any);    add_typecode(CORBA::_tc_Object);    add_typecode(_tc_Hello);}IT_GenieRandom::~IT_GenieRandom(){    // Deliberately empty}voidIT_GenieRandom::genie_Hello(    Hello_out result){    CORBA::Any_var result_any =        get_any_containing(_tc_Hello);    Hello_ptr                       extracted_result;    CORBA::Boolean is_ok =         (result_any >>= extracted_result);    assert(is_ok);    result = Hello::_duplicate(extracted_result);}

⌨️ 快捷键说明

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