20 #include <coil/stringutil.h> 24 #define UNUSED_ARG(a) do {} while (&a == 0) 100 catch (const ::Ice::Exception& e)
102 std::cerr << e << std::endl;
143 const char*
id = impl->id();
144 std::cout <<
"IceManager::activateObject: id " <<
id << std::endl;
145 std::cout <<
"IceManager::activateObject: name " << impl->name() << std::endl;
158 std::cout <<
"dynamic_cast<IceServantBase*> failed" << std::endl;
164 catch (std::bad_alloc& e)
191 if (strcmp(impl->id(), servant->id()) != 0)
200 ::Ice::ObjectPrx obj;
202 m_ice->stringToIdentity(impl->name()));
240 ::Ice::ObjectPtr obj;
261 if (
name == NULL)
return NULL;
264 if (entry == NULL)
return NULL;
278 if (servant == NULL)
return NULL;
280 std::cout <<
"toImpl(Servant)" << std::endl;
283 std::cout <<
"name: " << csvt->
name() << std::endl;
297 if (
name == NULL)
return NULL;
300 if (entry == NULL)
return NULL;
315 if (impl == NULL)
return NULL;
334 if (p.
result_ == NULL)
return NULL;
432 args.insert(args.begin(),
"manager");
434 int argc(args.size());
438 m_ice = ::Ice::initialize(argc, argv);
::Ice::CommunicatorPtr m_ice
virtual ImplBase * toImpl(doil::ServantBase *servant)
Getting impl object by servant.
virtual ServantBase * create()
ServantBase *(* ServantNewFunc)()
::Ice::ObjectAdapterPtr m_adapter
Object * find(const Identifier &id) const
Find the object.
virtual ImplBase * getImpl(const char *name)
Getting object by name.
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
IceServantBase * servant_
vstring split(const std::string &input, const std::string &delimiter, bool ignore_empty)
Split string by delimiter.
static ORBManager & instance()
getting instance
ObjectManager< const char *, ServantFactory, FactoryPred > m_factory
virtual ReturnCode_t registerFactory(const char *id, doil::ServantNewFunc new_func, doil::ServantDeleteFunc delete_func)
Register servant's factory.
bool registerObject(Object *obj)
Register the specified object.
void(* ServantDeleteFunc)(ServantBase *)
Object * unregisterObject(const Identifier &id)
Unregister the specified object.
::Ice::ObjectPrx toReference(doil::ImplBase *impl)
Converting Impl object to object reference.
char ** toArgv(const vstring &args)
Convert the given string list into the argument list.
virtual const char * name() const
::Ice::CommunicatorPtr getORB()
Getting ORB pointer.
virtual ReturnCode_t deactivateObject(doil::ImplBase *impl)
Deactivate object.
virtual ServantBase * getServant(const char *name)
Getting servant object by name.
Pred for_each(Pred p)
Functor for searching object.
prop
Organization::get_organization_property ();.
virtual void shutdown()
Shutdown ORB.
ReturnCode_t addORB(IORB *orb)
Register an ORB to the ORBManager.
virtual const char * name()=0
Class represents a set of properties.
::Ice::ObjectAdapterPtr getAdapter()
Getting default POA pointer.
virtual ServantBase * toServant(doil::ImplBase *lobj)
Getting servant object by impl object.
static IceManager * init(coil::Properties prop)
initializer
::Ice::ObjectPrx getReference(const char *name)
Getting object reference from the given name.
static IceManager * manager
void initIce(coil::Properties prop)
Ice ORB initialization.
void DoilIceInit(coil::Properties &prop)
virtual const char * name()
Getting ORB's name.
virtual const char * id() const
std::string createIceOptions()
Create ORB command options.
static IceManager & instance()
getting instance
virtual void destroy(ServantBase *servant)
coil::Properties m_config
virtual ReturnCode_t activateObject(doil::ImplBase *impl)
Activate object.