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

📄 call_funcs.cxx

📁 这是经典的CORBA程序
💻 CXX
字号:
//-----------------------------------------------------------------------------// Copyright (c) 2003-2020 EBUPT INFO CO.,LTD//-----------------------------------------------------------------------------//// Client-side calling functions that invoke operations on the server.//#include <omg/orb.hh>#include "call_funcs.h"#include "it_print_funcs.h"#include "it_random_funcs.h"#include <it_cal/iostream.h>IT_USING_NAMESPACE_STD// Declare the global ORB defined in the client main file.//extern CORBA::ORB_varglobal_orb;// call_Hello_getGreeting -- client function that illustrates how to invoke IDL // operation Hello::getGreeting.//voidcall_Hello_getGreeting(    Hello_ptr IT_obj){    // Variables to be used as parameters to the call    //    CORBA::String_var               _result;    cout << "call_Hello_getGreeting(): invoking operation" << endl;    //--------    // Make the call and handle any exceptions that are thrown    //--------    try {        _result = IT_obj->getGreeting();    }    catch(const CORBA::SystemException &ex) {        cout << "call_Hello_getGreeting(): call failed." << endl             << ex << endl;        //--------        // No memory management issues to take care of        //--------        return;    }    // Diagnostics: print the values of "out" and "inout" parameters,    // and return value, if any.    //    cout << "call_Hello_getGreeting(): "         << "success: got back..."         << endl;    cout << "    _result = ";    global_print->print_string(cout, _result, 1);    cout << endl;    //--------    // No memory management issues to take care of    //--------}

⌨️ 快捷键说明

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