TAO에서 제공하는 initial reference

1625 단어
응용 프로그램이 이동할 수 있는 값을 필요로 한다는 것은 초기화 대상의 인용을 얻을 수 있다는 것을 의미한다.TAO는 어떤 초기화 애플리케이션을 제공했습니까?우리는 프로그램을 통해 얻을 수 있다.
버전 OCI TAO 1.6a
Windows XP
소스 코드:

#include "ace/OS_main.h"
#include "ace/Log_Msg.h"
#include "tao/tao/ObjectIdListC.h"
#include "tao/ORB.h"
#include "ace/streams.h"
int ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
	ACE_DEBUG((LM_DEBUG,ACE_TEXT("(%t) test start here.//n")));
	try
	{
		CORBA::ORB_var orb = CORBA::ORB_init(argc,argv,"test");
	    CORBA::ORB_ObjectIdList_var lis = orb->list_initial_services();

		CORBA::ULong n = lis->length();
		for(CORBA::ULong index = 0UL; index < n; index ++)
		{
			 const char* name  = lis[index];
			 cout << index << "  " << name << endl;
		}
		orb->shutdown();
		orb->destroy();
	}	
	catch (CORBA::Exception& ex)
	{
		ex._tao_print_exception("main");
	}
	return 0;
}

     

0  NameService 1  TradingService 2  ImplRepoService 3  RootPOA 4  POACurrent 5  InterfaceRepository 6  ORBPolicyManager 7  PolicyCurrent 8  IORManipulation 9  IORTable 10  DynAnyFactory 11  TypeCodeFactory 12  CompressionManager 13  Monitor

좋은 웹페이지 즐겨찾기