亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? eg3_tieimpl.cc

?? 中間件omniORB在vs2005下的開發(fā)應(yīng)用例子代碼
?? CC
字號:
// eg3_tieimpl.cc - This example is similar to eg3_impl.cc except that
//                  the tie implementation skeleton is used.
//
//               This is the object implementation.
//
// Usage: eg3_tieimpl
//
//        On startup, the object reference is registered with the 
//        COS naming service. The client uses the naming service to
//        locate this object.
//
//        The name which the object is bound to is as follows:
//              root  [context]
//               |
//              test  [context] kind [my_context]
//               |
//              Echo  [object]  kind [Object]
//

#include <echo.hh>

#ifdef HAVE_STD
#  include <iostream>
   using namespace std;
#else
#  include <iostream.h>
#endif

static CORBA::Boolean bindObjectToName(CORBA::ORB_ptr,CORBA::Object_ptr);


// This is the object implementation.  Notice that it does not inherit
// from any stub class, and notice that the echoString() member
// function does not have to be virtual.

class Echo_i {
public:
  inline Echo_i() {}
  inline ~Echo_i() {}
  char* echoString(const char* mesg);
};


char* Echo_i::echoString(const char* mesg)
{
  return CORBA::string_dup("I hate templates,i am a special no the same!!!");
}

//////////////////////////////////////////////////////////////////////

int main(int argc, char** argv)
{
  try {
    CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);

    CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
    PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);

    // Note that the <myecho> tie object is constructed on the stack
    // here. It will delete its implementation (myimpl) when it it
    // itself destroyed (when it goes out of scope).  It is essential
    // however to ensure that such servants are not deleted whilst
    // still activated.
    //
    // Tie objects can of course be allocated on the heap using new,
    // in which case they are deleted when their reference count
    // becomes zero, as with any other servant object.
    Echo_i* myimpl = new Echo_i();
    POA_Echo_tie<Echo_i> myecho(myimpl);

    PortableServer::ObjectId_var myechoid = poa->activate_object(&myecho);

    // Obtain a reference to the object, and register it in
    // the naming service.
    obj = myecho._this();
    if( !bindObjectToName(orb, obj) )
      return 1;

    PortableServer::POAManager_var pman = poa->the_POAManager();
    pman->activate();

    orb->run();
  }
  catch(CORBA::SystemException& ex) {
    cerr << "Caught CORBA::" << ex._name() << endl;
  }
  catch(CORBA::Exception& ex) {
    cerr << "Caught CORBA::Exception: " << ex._name() << endl;
  }
  catch(omniORB::fatalException& fe) {
    cerr << "Caught omniORB::fatalException:" << endl;
    cerr << "  file: " << fe.file() << endl;
    cerr << "  line: " << fe.line() << endl;
    cerr << "  mesg: " << fe.errmsg() << endl;
  }
  return 0;
}

//////////////////////////////////////////////////////////////////////

static CORBA::Boolean
bindObjectToName(CORBA::ORB_ptr orb, CORBA::Object_ptr objref)
{
  CosNaming::NamingContext_var rootContext;

  try {
    // Obtain a reference to the root context of the Name service:
    CORBA::Object_var obj;
    obj = orb->resolve_initial_references("NameService");

    // Narrow the reference returned.
    rootContext = CosNaming::NamingContext::_narrow(obj);
    if( CORBA::is_nil(rootContext) ) {
      cerr << "Failed to narrow the root naming context." << endl;
      return 0;
    }
  }
  catch (CORBA::NO_RESOURCES&) {
    cerr << "Caught NO_RESOURCES exception. You must configure omniORB "
	 << "with the location" << endl
	 << "of the naming service." << endl;
    return 0;
  }
  catch (CORBA::ORB::InvalidName&) {
    // This should not happen!
    cerr << "Service required is invalid [does not exist]." << endl;
    return 0;
  }

  try {
    // Bind a context called "test" to the root context:

    CosNaming::Name contextName;
    contextName.length(1);
    contextName[0].id   = (const char*) "test";       // string copied
    contextName[0].kind = (const char*) "my_context"; // string copied
    // Note on kind: The kind field is used to indicate the type
    // of the object. This is to avoid conventions such as that used
    // by files (name.type -- e.g. test.ps = postscript etc.)

    CosNaming::NamingContext_var testContext;
    try {
      // Bind the context to root.
      testContext = rootContext->bind_new_context(contextName);
    }
    catch(CosNaming::NamingContext::AlreadyBound& ex) {
      // If the context already exists, this exception will be raised.
      // In this case, just resolve the name and assign testContext
      // to the object returned:
      CORBA::Object_var obj;
      obj = rootContext->resolve(contextName);
      testContext = CosNaming::NamingContext::_narrow(obj);
      if( CORBA::is_nil(testContext) ) {
        cerr << "Failed to narrow naming context." << endl;
        return 0;
      }
    }

    // Bind objref with name Echo to the testContext:
    CosNaming::Name objectName;
    objectName.length(1);
    objectName[0].id   = (const char*) "Echo";   // string copied
    objectName[0].kind = (const char*) "Object"; // string copied

    try {
      testContext->bind(objectName, objref);
    }
    catch(CosNaming::NamingContext::AlreadyBound& ex) {
      testContext->rebind(objectName, objref);
    }
    // Note: Using rebind() will overwrite any Object previously bound
    //       to /test/Echo with obj.
    //       Alternatively, bind() can be used, which will raise a
    //       CosNaming::NamingContext::AlreadyBound exception if the name
    //       supplied is already bound to an object.

    // Amendment: When using OrbixNames, it is necessary to first try bind
    // and then rebind, as rebind on it's own will throw a NotFoundexception if
    // the Name has not already been bound. [This is incorrect behaviour -
    // it should just bind].
  }
  catch(CORBA::TRANSIENT& ex) {
    cerr << "Caught system exception TRANSIENT -- unable to contact the "
         << "naming service." << endl
	 << "Make sure the naming server is running and that omniORB is "
	 << "configured correctly." << endl;

    return 0;
  }
  catch(CORBA::SystemException& ex) {
    cerr << "Caught a CORBA::" << ex._name()
	 << " while using the naming service." << endl;
    return 0;
  }
  return 1;
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
4438亚洲最大| 99久久免费国产| 欧美美女喷水视频| 香蕉久久一区二区不卡无毒影院| 欧洲精品一区二区| 午夜a成v人精品| 精品少妇一区二区三区在线播放 | 亚洲午夜久久久久中文字幕久| 欧美偷拍一区二区| 美腿丝袜一区二区三区| 久久综合成人精品亚洲另类欧美| 国产一区不卡在线| 中文一区二区完整视频在线观看| 一本一本大道香蕉久在线精品 | 国产乱码精品一品二品| 国产偷国产偷精品高清尤物| 97久久人人超碰| 婷婷成人激情在线网| 精品欧美一区二区久久| 国产传媒日韩欧美成人| 亚洲嫩草精品久久| 3751色影院一区二区三区| 国产一区二区三区四区五区美女| 国产精品麻豆欧美日韩ww| 欧美日韩免费视频| 另类中文字幕网| 国产精品不卡视频| 欧美一区二区三区在线看| 韩国一区二区三区| 亚洲一区二区三区三| 精品国产区一区| 91在线丨porny丨国产| 美女性感视频久久| 亚洲品质自拍视频| 精品日韩在线观看| 在线视频综合导航| 国模套图日韩精品一区二区| 夜夜操天天操亚洲| 欧美国产一区二区| 欧美电影免费观看高清完整版在线观看| 丰满亚洲少妇av| 久久av老司机精品网站导航| 一区二区不卡在线播放| 久久精品免视看| 欧美日韩免费观看一区二区三区| 成人免费视频一区| 韩国v欧美v亚洲v日本v| 亚洲高清视频在线| 自拍偷拍亚洲欧美日韩| 久久女同精品一区二区| 在线不卡的av| 欧美天堂一区二区三区| 国产一区二区久久| 丝袜诱惑亚洲看片 | 亚洲一区二区三区小说| 国产亚洲成av人在线观看导航| 欧美电影一区二区三区| 91免费国产在线| aaa国产一区| 久久成人久久鬼色| 日本欧洲一区二区| 午夜精品久久久久久久久久久| 自拍偷自拍亚洲精品播放| 欧美韩国日本综合| 日本一区二区三区电影| 久久综合九色综合久久久精品综合 | 97久久超碰国产精品电影| 国产精品夜夜爽| 国产一区二区伦理| 国模冰冰炮一区二区| 久久电影国产免费久久电影| 免费成人小视频| 久久精品国产在热久久| 久久99精品国产麻豆不卡| 日韩精品五月天| 欧美a一区二区| 蜜桃一区二区三区四区| 蜜臀91精品一区二区三区 | 精品日韩欧美在线| 精品久久久久久久人人人人传媒 | 欧美亚洲动漫另类| 欧美羞羞免费网站| 欧美视频日韩视频在线观看| 欧美视频在线观看一区二区| 久久人人爽人人爽| 久久综合色8888| 国产精品人妖ts系列视频| 国产精品亲子伦对白| 亚洲人成网站在线| 亚洲大型综合色站| 青青草国产成人av片免费| 蜜桃av一区二区在线观看| 久久爱另类一区二区小说| 国产福利电影一区二区三区| 成人黄色国产精品网站大全在线免费观看| 国产一区二区伦理| 99国产精品国产精品毛片| 在线观看日韩一区| 777午夜精品免费视频| 日韩一区二区三区四区| 欧美精品一区二区三| 国产精品色眯眯| 亚洲一区二区不卡免费| 久久精品久久综合| av一区二区久久| 7777精品伊人久久久大香线蕉| 日韩精品中文字幕一区二区三区 | www日韩大片| 亚洲精品你懂的| 蜜桃av一区二区| 9久草视频在线视频精品| 欧美乱熟臀69xxxxxx| 国产亲近乱来精品视频| 一区二区三区高清在线| 美国三级日本三级久久99| 成人av动漫网站| 欧美一区二区三区四区视频| 国产精品久久免费看| 五月婷婷另类国产| 成人国产精品免费观看动漫| 9191精品国产综合久久久久久| 日本一区二区三区国色天香 | 日韩综合小视频| 不卡视频一二三| 日韩一区国产二区欧美三区| 综合中文字幕亚洲| 狠狠久久亚洲欧美| 欧美日韩在线播放一区| 国产精品无人区| 麻豆国产精品777777在线| 色国产精品一区在线观看| 久久久久久久综合日本| 日韩中文字幕1| 在线观看国产精品网站| 中文av一区二区| 国产在线视频不卡二| 欧美久久久久久蜜桃| 亚洲欧美经典视频| 国产成人在线看| 精品久久国产97色综合| 亚洲成av人综合在线观看| 99久久免费精品高清特色大片| 久久综合五月天婷婷伊人| 日韩—二三区免费观看av| 一本色道久久综合精品竹菊| 久久久久久久久久久久久夜| 美女一区二区久久| 在线电影欧美成精品| 亚洲成人精品一区| 色婷婷综合久久| 亚洲色图在线看| a在线播放不卡| 国产精品久久三区| 福利电影一区二区| 国产欧美精品一区二区色综合朱莉| 麻豆传媒一区二区三区| 91.xcao| 奇米精品一区二区三区四区| 亚洲精品水蜜桃| 9久草视频在线视频精品| 国产三级精品在线| 极品少妇一区二区三区精品视频| 91精品国产入口| 美女视频网站黄色亚洲| 日韩限制级电影在线观看| 日本91福利区| 欧美成人精品高清在线播放| 美女久久久精品| 欧美zozo另类异族| 国产综合久久久久久久久久久久| 日韩视频免费观看高清完整版在线观看| 亚洲综合久久久久| 在线不卡中文字幕| 美女国产一区二区| 久久久91精品国产一区二区三区| 国产剧情一区在线| 国产精品免费aⅴ片在线观看| 成人av在线一区二区| 国产精品家庭影院| 在线观看av一区二区| 日韩精品亚洲专区| 欧美va亚洲va| 国产·精品毛片| 亚洲精品欧美综合四区| 欧美日韩精品一区二区三区| 麻豆freexxxx性91精品| 久久精品视频免费| 色噜噜狠狠色综合欧洲selulu| 亚洲成av人片在www色猫咪| 日韩一级精品视频在线观看| 韩国理伦片一区二区三区在线播放 | www.亚洲色图.com| 香蕉影视欧美成人| 久久亚洲精精品中文字幕早川悠里| 国产aⅴ综合色| 午夜精品久久久久久久久| 久久品道一品道久久精品| 色综合中文综合网| 国产麻豆视频一区二区| 中文字幕一区二区三区精华液|