1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
3
#include "swordorb-impl.hpp"
6
#include <markupfiltmgr.h>
8
sword::SWMgr swordmgr(new sword::MarkupFilterMgr(sword::FMT_WEBIF));
10
int main (int argc, char* argv[]) {
12
// Initialize the CORBA orb
13
CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
16
CORBA::Object_var pfobj = orb->resolve_initial_references("RootPOA");
18
PortableServer::POA_var rootPOA =
19
PortableServer::POA::_narrow(pfobj);
21
// Activate the root POA's manager
22
PortableServer::POAManager_var mgr = rootPOA->the_POAManager();
26
// Create a Servant and explicitly create a CORBA object
27
swordorb::SWMgr_impl servant(&swordmgr);
28
CORBA::Object_var object = servant._this();
30
// Here we get the IOR for the Hello server object.
31
// Our "client" will use the IOR to find the object to connect to
32
CORBA::String_var ref = orb->object_to_string( object );
35
std::cout << ref << std::endl;
37
// run the server event loop
40
catch(const CORBA::Exception& ex)
42
std::cout << "Exception caught." << std::endl;