Extending the bindings

Classes and functions related to the addition of HPP class bindings. More...

Classes

class  hpp::corbaServer::AbstractServantKey
 Abstract class used to avoid duplication of the servants. More...
 
class  hpp::corbaServer::AbstractServantBase< T >
 Base class for classes which provides bindings for HPP classes. More...
 
class  hpp::corbaServer::ServantBase< T, _Storage >
 
class  hpp::corbaServer::AbstractStorage< T, Base >
 Abstraction of storage ot HPP class. More...
 
class  hpp::corbaServer::ServantFactoryBase< ServantBaseType >
 Class used to dynamiccally cast HPP classes and create the corresponding servant. More...
 
struct  hpp::corbaServer::ServantFactory< ServantBaseType, ServantType >
 
struct  hpp::corbaServer::vectorToSeqServant< OutType, InnerBaseType, InnerType >
 

Macros

#define SERVANT_BASE_TYPEDEFS(idlObj, hppObj)
 
#define SERVANT_BASE_TYPEDEFS(idlObj, hppObj)
 
#define SERVANT_BASE_TYPEDEFS(idlObj, hppObj)
 
#define SERVANT_BASE_TYPEDEFS(idlObj, hppObj)
 

Typedefs

typedef PortableServer::Servant_var< PortableServer::ServantBase > hpp::corbaServer::ServantBase_var
 

Functions

template<typename S , typename P >
PortableServer::Servant_var< S > hpp::corbaServer::reference_to_servant (Server *server, const P &p)
 
template<typename T , typename P >
AbstractServantBase< T > * hpp::corbaServer::reference_to_servant_base (Server *server, const P &p)
 
template<typename P , typename S >
hpp::corbaServer::makeServant (Server *server, S *s)
 Create and activate a omniORB servant. More...
 
template<typename U , typename V , template< typename > class StorageTpl>
static StorageTpl< U > hpp::corbaServer::storage_cast (const StorageTpl< V > &o)
 Cast the storage class of a servant. More...
 
template<typename ServantBaseType >
std::vector< ServantFactoryBase< ServantBaseType > * > & hpp::corbaServer::objectDowncasts ()
 
template<typename ServantBaseType >
void hpp::corbaServer::addDowncastObjects (ServantFactoryBase< ServantBaseType > *const object)
 
template<typename ServantBaseType , typename ReturnType >
ReturnType::Object_var hpp::corbaServer::makeServantDownCast (Server *server, const typename ServantBaseType::Storage &t)
 Create and activate a omniORB servant with class downcasting. More...
 
template<typename ServantBaseType >
ServantBaseType::Object_var hpp::corbaServer::makeServantDownCast (Server *server, const typename ServantBaseType::Storage &t)
 
template<typename ObjectRef , typename Types , typename T , template< typename > class StorageTpl>
ObjectRef::_var_type hpp::corbaServer::makeServantDownCast (Server *server, const StorageTpl< T > &t)
 Create and activate a omniORB servant with class downcasting. More...
 

Detailed Description

Classes and functions related to the addition of HPP class bindings.

Example usage can be found in classes hpp::corbaServer::core_idl::Path, hpp::corbaServer::core_idl::PathVector, hpp::corbaServer::core_idl::Distance

Steps for the topmost class of an hierarchy, called ClassA:
  • optionally write a storage class (or use boost::shared_ptr<ClassA>)
  • create a template <typename _Base, typename _Storage> ClassAServant that inherits
    • _Base, this will be an IDL class that inherits from IDLClassA.
    • ServantBase<boost::shared_ptr<ClassA>, _Storage >
  • Add SERVANT_BASE_TYPEDEFS(ClassAServant, boost::shared_ptr<ClassA>);
  • implement the functions of IDLClassA
  • add after your class typedef ClassAServant<IDLClassA, Storage> ClassA.
Steps for a derived class of an hierarchy, called ClassB:
  • optionally write a storage class (or use boost::shared_ptr<ClassB>)
  • create a template <typename _Base, typename _Storage> ClassBServant that inherits
    • ClassAServant<_Base, Storage>
  • implement the functions of IDLClassB
  • add after your class typedef ClassBServant<IDLClassB, Storage> ClassB.
about the storage class
See details section of AbstractStorage.

Macro Definition Documentation

#define SERVANT_BASE_TYPEDEFS (   idlObj,
  hppObj 
)
Value:
protected: \
using AbstractServantBase<hppObj>::server_; \
public: \
typedef _Base Base; \
typedef _Storage Storage; \
typedef idlObj Object; \
typedef idlObj ## _ptr Object_ptr; \
typedef idlObj ## _var Object_var; \
typedef ServantBase<hppObj, _Storage> _ServantBase; \
using _ServantBase::get; \
using _ServantBase::getT; \
using _ServantBase::getS
SplineGradientBasedAbstract< _PolynomeBasis, _SplineOrder > Base
#define SERVANT_BASE_TYPEDEFS (   idlObj,
  hppObj 
)
Value:
protected: \
using AbstractServantBase<hppObj>::server_; \
public: \
typedef _Base Base; \
typedef _Storage Storage; \
typedef idlObj Object; \
typedef idlObj ## _ptr Object_ptr; \
typedef ServantBase<hppObj, _Storage> _ServantBase; \
using _ServantBase::get; \
using _ServantBase::getS
SplineGradientBasedAbstract< _PolynomeBasis, _SplineOrder > Base
#define SERVANT_BASE_TYPEDEFS (   idlObj,
  hppObj 
)
Value:
protected: \
using AbstractServantBase<hppObj>::server_; \
public: \
typedef _Base Base; \
typedef _Storage Storage; \
typedef idlObj Object; \
typedef idlObj ## _ptr Object_ptr; \
typedef ServantBase<hppObj, _Storage> _ServantBase; \
using _ServantBase::get; \
using _ServantBase::getS
SplineGradientBasedAbstract< _PolynomeBasis, _SplineOrder > Base
#define SERVANT_BASE_TYPEDEFS (   idlObj,
  hppObj 
)
Value:
protected: \
using AbstractServantBase<hppObj>::server_; \
public: \
typedef _Base Base; \
typedef _Storage Storage; \
typedef idlObj Object; \
typedef idlObj ## _ptr Object_ptr; \
typedef ServantBase<hppObj, _Storage> _ServantBase; \
using _ServantBase::get; \
using _ServantBase::getS
SplineGradientBasedAbstract< _PolynomeBasis, _SplineOrder > Base

Typedef Documentation

typedef PortableServer::Servant_var< PortableServer::ServantBase > hpp::corbaServer::ServantBase_var

Function Documentation

template<typename ServantBaseType >
void hpp::corbaServer::addDowncastObjects ( ServantFactoryBase< ServantBaseType > *const  object)
template<typename P , typename S >
P hpp::corbaServer::makeServant ( Server server,
S *  s 
)

Create and activate a omniORB servant.

Template Parameters
PAn CORBA::Object_ptr (typically S::Object_ptr)
SA class deriving from AbstractServantKey and PortableServer::ServantBase (or a class generated by omniidl in the namespace POA_*).
Returns
a reference to the OmniORB servant.
Note
if a OmniORB servant serving s exists, no servant is created and a reference to the existing servant is returned.

References hpp::corbaServer::Server::addServantKeyAndServant(), hpp::corbaServer::Server::getServant(), and hpp::corbaServer::Server::poa().

Referenced by hpp::corbaServer::AbstractStorage< D, core::SteeringMethod >::operator bool().

template<typename ObjectRef , typename Types , typename T , template< typename > class StorageTpl>
ObjectRef::_var_type hpp::corbaServer::makeServantDownCast ( Server server,
const StorageTpl< T > &  t 
)

Create and activate a omniORB servant with class downcasting.

This automaticcally downcast

Template Parameters
ObjectRefthe return type.
Typesa boost::mpl::vector of types to check. The order matters. Put the base classes after their children.
Tthe HPP class
StorageTpleither boost::shared_ptr or a class inheriting from AbstractStorage
template<typename ServantBaseType , typename ReturnType >
ReturnType::Object_var hpp::corbaServer::makeServantDownCast ( Server server,
const typename ServantBaseType::Storage &  t 
)

Create and activate a omniORB servant with class downcasting.

Template Parameters
ServantBaseTypethe top classes of the hierarchy.

Referenced by hpp::corbaServer::AbstractStorage< D, core::SteeringMethod >::operator bool().

template<typename ServantBaseType >
ServantBaseType::Object_var hpp::corbaServer::makeServantDownCast ( Server server,
const typename ServantBaseType::Storage &  t 
)
template<typename ServantBaseType >
std::vector< ServantFactoryBase<ServantBaseType>* >& hpp::corbaServer::objectDowncasts ( )
template<typename S , typename P >
PortableServer::Servant_var< S > hpp::corbaServer::reference_to_servant ( Server server,
const P &  p 
)
template<typename T , typename P >
AbstractServantBase< T > * hpp::corbaServer::reference_to_servant_base ( Server server,
const P &  p 
)
template<typename U , typename V , template< typename > class StorageTpl>
static StorageTpl<U> hpp::corbaServer::storage_cast ( const StorageTpl< V > &  o)
static