9 #include "fwServices/IService.hpp" 10 #include "fwServices/ServiceFactoryRegistrar.hpp" 14 #include <boost/preprocessor/cat.hpp> 15 #include <boost/preprocessor/facilities/empty.hpp> 16 #include <boost/preprocessor/facilities/overload.hpp> 25 #define __FWSERVICES_REGISTER_MACRO( ServiceType, ServiceImpl ) \ 26 class BOOST_PP_CAT ( ServiceTypeConceptCheck, __LINE__ ) \ 29 BOOST_CONCEPT_ASSERT((::fwCore::concepts::SharedPtrTypedef< ServiceType >)); \ 31 class BOOST_PP_CAT ( ServiceImplConceptCheck, __LINE__ ) \ 34 BOOST_CONCEPT_ASSERT((::fwCore::concepts::SharedPtrTypedef< ServiceImpl >)); \ 36 static ::fwServices::ServiceFactoryRegistrar< ServiceImpl > \ 37 BOOST_PP_CAT( serviceRegistrar, __LINE__) ( #ServiceImpl, #ServiceType ); 39 #define __FWSERVICES_REGISTER_OBJECT_MACRO( ServiceImpl, ServiceObject ) \ 40 class BOOST_PP_CAT ( ServiceObjectConceptCheck, __LINE__ ) \ 43 BOOST_CONCEPT_ASSERT((::fwCore::concepts::SharedPtrTypedef< ServiceObject >)); \ 45 static ::fwServices::ServiceObjectFactoryRegistrar \ 46 BOOST_PP_CAT( serviceObjectRegistrar, __LINE__) ( #ServiceImpl, #ServiceObject ); 50 #define __FWSERVICES_REGISTER_MACRO_2(ServiceImpl, ServiceObject) \ 51 __FWSERVICES_REGISTER_MACRO(ServiceImpl, ServiceObject) 53 #define __FWSERVICES_REGISTER_MACRO_3(ServiceType, ServiceImpl, ServiceObject) \ 54 __FWSERVICES_REGISTER_MACRO(ServiceType, ServiceImpl) \ 55 __FWSERVICES_REGISTER_OBJECT_MACRO(ServiceImpl, ServiceObject) 61 #if !BOOST_PP_VARIADICS_MSVC 63 #define fwServicesRegisterMacro(...) BOOST_PP_OVERLOAD(__FWSERVICES_REGISTER_MACRO_, __VA_ARGS__)(__VA_ARGS__) 67 #define fwServicesRegisterMacro(...) \ 68 BOOST_PP_CAT(BOOST_PP_OVERLOAD(__FWSERVICES_REGISTER_MACRO_, __VA_ARGS__)(__VA_ARGS__), BOOST_PP_EMPTY()) 72 #define fwServicesRegisterObjectMacro(ServiceImpl, ServiceObject) \ 73 __FWSERVICES_REGISTER_OBJECT_MACRO(ServiceImpl, ServiceObject) Namespace fwServices is dedicated to (mimic) the dynamic affectation of methods to (pure data) object...
This file defines some fw4spl concept checks.