diff --git a/build/use_genesis.props b/build/use_genesis.props index b39f8e7..bc3a1f8 100644 --- a/build/use_genesis.props +++ b/build/use_genesis.props @@ -6,7 +6,6 @@ ..\genesis\include;%(AdditionalIncludeDirectories) - None diff --git a/externals/essentials/include/essentials/sxprintf.hpp b/externals/essentials/include/essentials/sxprintf.hpp index f6c4d72..cee4672 100644 --- a/externals/essentials/include/essentials/sxprintf.hpp +++ b/externals/essentials/include/essentials/sxprintf.hpp @@ -109,7 +109,7 @@ void print_superfluous_parameters( std::ostream& _os, #endif -void sxprintf( std::ostream& _os, const char* _format ); +void sxprintf( std::ostream& _os, const char* _format ); #ifndef SX_CPP03_BOOST template< typename value, typename ... args > diff --git a/externals/essentials/source/essentials_version.cpp b/externals/essentials/source/essentials_version.cpp index 1d851f7..ad5323b 100644 --- a/externals/essentials/source/essentials_version.cpp +++ b/externals/essentials/source/essentials_version.cpp @@ -29,8 +29,8 @@ namespace const sxe::uint16_t VERSION_MAJOR( 1 ); -const sxe::uint16_t VERSION_MINOR( 2 ); -const sxe::uint16_t VERSION_PATCH( 0 ); +const sxe::uint16_t VERSION_MINOR( 3 ); +const sxe::uint16_t VERSION_PATCH( 1 ); } diff --git a/genesis/source/loop_block.cpp b/genesis/source/loop_block.cpp index b6e7d8c..b295dc4 100644 --- a/genesis/source/loop_block.cpp +++ b/genesis/source/loop_block.cpp @@ -41,7 +41,7 @@ void loop_block::create( recipe_callback& _recipe_callback, std::stringstream& _ while( _recipe_callback.check_loop_condition( loop_name_ ) ) { _recipe_callback.before_loop_iteration( loop_name_ ); - create_children( _recipe_callback, _ostream ); + create_children( _recipe_callback, _ostream ); _recipe_callback.after_loop_iteration( loop_name_ ); } _recipe_callback.after_loop( loop_name_ ); diff --git a/genesis/source/template_block.cpp b/genesis/source/template_block.cpp index 2d39ed3..1f1f773 100644 --- a/genesis/source/template_block.cpp +++ b/genesis/source/template_block.cpp @@ -385,7 +385,7 @@ const std::string template_block::get_last_to_be_closed() const std::string template_block::read_template_file( const std::string& _template_name, const std::string& _templates_path ) { - std::string template_file_as_string; + std::string template_file_as_string; read( _templates_path + "/" + _template_name, template_file_as_string ); if( template_file_as_string.empty() ) { diff --git a/genesis/source/variable_step.cpp b/genesis/source/variable_step.cpp index fbd1d28..43acfce 100644 --- a/genesis/source/variable_step.cpp +++ b/genesis/source/variable_step.cpp @@ -33,7 +33,7 @@ variable_step::~variable_step() SX_NOEXCEPT // Nothing to do... } - + void variable_step::create( recipe_callback& _recipe_callback, std::stringstream& _ostream ) { _ostream << _recipe_callback.get_variable_content( variable_name_ ); diff --git a/genesis/source/version.cpp b/genesis/source/version.cpp index f762998..74d4df0 100644 --- a/genesis/source/version.cpp +++ b/genesis/source/version.cpp @@ -33,8 +33,8 @@ namespace const sxe::uint16_t VERSION_MAJOR( 0 ); -const sxe::uint16_t VERSION_MINOR( 2 ); -const sxe::uint16_t VERSION_PATCH( 0 ); +const sxe::uint16_t VERSION_MINOR( 3 ); +const sxe::uint16_t VERSION_PATCH( 1 ); } diff --git a/libyasmine/CMakeLists.txt b/libyasmine/CMakeLists.txt index 3e48936..b15d818 100644 --- a/libyasmine/CMakeLists.txt +++ b/libyasmine/CMakeLists.txt @@ -63,6 +63,12 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQ message(STATUS "Y_PROFILER is defined.") endif() + option("SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG" "Sets to use a workaround for bug in GCC with expansion of template parameter pack that appears in a lambda-expression (bug reported for GCC 4.8.4)") + if( "${SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG}" ) + set(extra_flags "${extra_flags} -D \"SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG\"") + message(STATUS "SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG is defined.") + endif() + elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # Checks buffer security. @@ -154,6 +160,12 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D \"Y_PROFILER\"") message(STATUS "Y_PROFILER is defined.") endif() + + option("SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG" "Sets to use a workaround for bug in GCC with expansion of template parameter pack that appears in a lambda-expression (bug reported for GCC 4.8.4)") + if( "${SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG}" ) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D \"SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG\"") + message(STATUS "SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG is defined.") + endif() # for release if( "${CMAKE_BUILD_TYPE}" STREQUAL "Release" ) @@ -184,7 +196,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") endif() SET_TARGET_PROPERTIES ( libyasmine PROPERTIES - VERSION 1.2.1 + VERSION 1.2.3 SOVERSION 1.2 ) install(TARGETS libyasmine DESTINATION lib) diff --git a/libyasmine/changelog.txt b/libyasmine/changelog.txt index 95de654..542d6e0 100644 --- a/libyasmine/changelog.txt +++ b/libyasmine/changelog.txt @@ -1,6 +1,16 @@ # Change log All notable changes to this project are documented in this file. +##[1.2.3] - 2017-08-22 + +### Changed +• CMake: setting rapidJSON path by setting the SX_RAPIDJSON variable + +### Fixed +• SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG: workaround for bug in GCC with expansion of template parameter pack that appears in a lambda-expression (reported for GCC 4.8.4) +• bug when passing template class member function to Y_BEHAVIOR_METHOD2 and Y_GUARD_METHOD2 (reported for GCC 5.0.4) + + ##[1.2.2] - 2017-08-18 ### Fix diff --git a/libyasmine/include/assembly.hpp b/libyasmine/include/assembly.hpp index dac9c6d..8984c70 100644 --- a/libyasmine/include/assembly.hpp +++ b/libyasmine/include/assembly.hpp @@ -22,10 +22,10 @@ #include "constraint_fwd.hpp" #include "caller.hpp" #include "guard_caller.hpp" - + #ifndef SX_CPP03_BOOST - + //!\deprecated Use Y_BEHAVIOR_METHOD2 instead. #define Y_BEHAVIOR_METHOD( ... ) EXPAND( VA_SELECT( Y_BEHAVIOR_METHOD_SELECT, __VA_ARGS__ ) ) @@ -215,10 +215,156 @@ #define Y_GUARD_FUNCTION_EVENT( ... ) EXPAND( VA_SELECT( Y_GUARD_FUNCTION_EVENT_SELECT, __VA_ARGS__ ) ) +#ifdef SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG + + +template< typename method1 > +sxy::behavior_function create_behavior_function( method1 _method1 ) +{ + return ( sxy::behavior_function( [_method1]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, _method1 ); } ) ); +} + + +template< typename method1, typename method2 > +sxy::behavior_function create_behavior_function( method1 _method1, method2 _method2 ) +{ + return ( sxy::behavior_function( [_method1, _method2]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, _method1, _method2 ); } ) ); +} + + +template< typename method1, typename method2, typename method3 > +sxy::behavior_function create_behavior_function( method1 _method1, method2 _method2, method3 _method3 ) +{ + return ( sxy::behavior_function( [_method1, _method2, _method3]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, _method1, _method2, _method3 ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4 > +sxy::behavior_function create_behavior_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4 ) +{ + return ( sxy::behavior_function( [_method1, _method2, _method3, _method4]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, _method1, _method2, _method3, _method4 ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5 > +sxy::behavior_function create_behavior_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5 ) +{ + return ( sxy::behavior_function( [_method1, _method2, _method3, _method4, _method5]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5 ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5, typename method6 > +sxy::behavior_function create_behavior_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5, method6 _method6 ) +{ + return ( sxy::behavior_function( [_method1, _method2, _method3, _method4, _method5, _method6]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5, _method6 ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5, typename method6, typename method7 > +sxy::behavior_function create_behavior_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5, method6 _method6, method7 _method7 ) +{ + return ( sxy::behavior_function( [_method1, _method2, _method3, _method4, _method5, _method6, _method7]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5, _method6, _method7 ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5, typename method6, typename method7, typename method8 > +sxy::behavior_function create_behavior_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5, method6 _method6, method7 _method7, method8 _method8 ) +{ + return ( sxy::behavior_function( [_method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8 ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5, typename method6, typename method7, typename method8, typename method9 > +sxy::behavior_function create_behavior_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5, method6 _method6, method7 _method7, method8 _method8, method9 _method9 ) +{ + return ( sxy::behavior_function( [_method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9 ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5, typename method6, typename method7, typename method8, typename method9, typename method10 > +sxy::behavior_function create_behavior_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5, method6 _method6, method7 _method7, method8 _method8, method9 _method9, method10 _method10 ) +{ + return ( sxy::behavior_function( [_method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9, _method10]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9, _method10 ); } ) ); +} + + +template< typename method1 > +sxy::constraint_function create_guard_function( method1 _method1 ) +{ + return ( sxy::constraint_function( [_method1]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, _method1 ) ); } ) ); +} + + +template< typename method1, typename method2 > +sxy::constraint_function create_guard_function( method1 _method1, method2 _method2 ) +{ + return ( sxy::constraint_function( [_method1, _method2]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, _method1, _method2 ) ); } ) ); +} + + +template< typename method1, typename method2, typename method3 > +sxy::constraint_function create_guard_function( method1 _method1, method2 _method2, method3 _method3 ) +{ + return ( sxy::constraint_function( [_method1, _method2, _method3]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, _method1, _method2, _method3 ) ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4 > +sxy::constraint_function create_guard_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4 ) +{ + return ( sxy::constraint_function( [_method1, _method2, _method3, _method4]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, _method1, _method2, _method3, _method4 ) ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5 > +sxy::constraint_function create_guard_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5 ) +{ + return ( sxy::constraint_function( [_method1, _method2, _method3, _method4, _method5]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5 ) ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5, typename method6 > +sxy::constraint_function create_guard_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5, method6 _method6 ) +{ + return ( sxy::constraint_function( [_method1, _method2, _method3, _method4, _method5, _method6]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5, _method6 ) ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5, typename method6, typename method7 > +sxy::constraint_function create_guard_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5, method6 _method6, method7 _method7 ) +{ + return ( sxy::constraint_function( [_method1, _method2, _method3, _method4, _method5, _method6, _method7]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5, _method6, _method7 ) ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5, typename method6, typename method7, typename method8 > +sxy::constraint_function create_guard_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5, method6 _method6, method7 _method7, method8 _method8 ) +{ + return ( sxy::constraint_function( [_method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8 ) ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5, typename method6, typename method7, typename method8, typename method9 > +sxy::constraint_function create_guard_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5, method6 _method6, method7 _method7, method8 _method8, method9 _method9 ) +{ + return ( sxy::constraint_function( [_method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9 ) ); } ) ); +} + + +template< typename method1, typename method2, typename method3, typename method4, typename method5, typename method6, typename method7, typename method8, typename method9, typename method10 > +sxy::constraint_function create_guard_function( method1 _method1, method2 _method2, method3 _method3, method4 _method4, method5 _method5, method6 _method6, method7 _method7, method8 _method8, method9 _method9, method10 _method10 ) +{ + return ( sxy::constraint_function( [_method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9, _method10]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9, _method10 ) ); } ) ); +} + + +#else + + template< typename ... Args > sxy::behavior_function create_behavior_function( Args...args ) { - return ( sxy::behavior_function( [ args... ]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, args... ); } ) ); + return ( sxy::behavior_function( [args...]( const sxy::event& _event, sxy::event_collector& _event_collector ) { behavior_caller( _event, _event_collector, args... ); } ) ); } @@ -228,27 +374,30 @@ sxy::constraint_function create_guard_function( Args...args ) return ( sxy::constraint_function( [args...]( const sxy::event& _event, sxy::event_collector& _event_collector ) { return( guard_caller( _event, _event_collector, args... ) ); } ) ); } - #define Y_BEHAVIOR_METHOD2_SELECT_1( _class_instance, _method ) create_behavior_function( adapt::type>( _class_instance, _method ) ) - #define Y_BEHAVIOR_METHOD2_SELECT_2( _class_instance, _method1, _method2 ) create_behavior_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ) ) - #define Y_BEHAVIOR_METHOD2_SELECT_3( _class_instance, _method1, _method2, _method3 ) create_behavior_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ) ) - #define Y_BEHAVIOR_METHOD2_SELECT_4( _class_instance, _method1, _method2, _method3, _method4 ) create_behavior_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ) ) - #define Y_BEHAVIOR_METHOD2_SELECT_5( _class_instance, _method1, _method2, _method3, _method4, _method5 ) create_behavior_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ) ) - #define Y_BEHAVIOR_METHOD2_SELECT_6( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6 ) create_behavior_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ), adapt::type>( _class_instance, _method6 ) ) - #define Y_BEHAVIOR_METHOD2_SELECT_7( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7 ) create_behavior_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ), adapt::type>( _class_instance, _method6 ), adapt::type>( _class_instance, _method7 ) ) - #define Y_BEHAVIOR_METHOD2_SELECT_8( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8 ) create_behavior_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ), adapt::type>( _class_instance, _method6 ), adapt::type>( _class_instance, _method7 ), adapt::type>( _class_instance, _method8 ) ) - #define Y_BEHAVIOR_METHOD2_SELECT_9( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9 ) create_behavior_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ), adapt::type>( _class_instance, _method6 ), adapt::type>( _class_instance, _method7 ), adapt::type>( _class_instance, _method8 ), adapt::type>( _class_instance, _method9 ) ) - #define Y_BEHAVIOR_METHOD2_SELECT_10( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9, _method10 ) create_behavior_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ), adapt::type>( _class_instance, _method6 ), adapt::type>( _class_instance, _method7 ), adapt::type>( _class_instance, _method8 ), adapt::type>( _class_instance, _method9 ), adapt::type>( _class_instance, _method10 ) ) - - #define Y_GUARD_METHOD2_SELECT_1( _class_instance, _method ) create_guard_function( adapt::type>( _class_instance, _method ) ) - #define Y_GUARD_METHOD2_SELECT_2( _class_instance, _method1, _method2 ) create_guard_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ) ) - #define Y_GUARD_METHOD2_SELECT_3( _class_instance, _method1, _method2, _method3 ) create_guard_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ) ) - #define Y_GUARD_METHOD2_SELECT_4( _class_instance, _method1, _method2, _method3, _method4 ) create_guard_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ) ) - #define Y_GUARD_METHOD2_SELECT_5( _class_instance, _method1, _method2, _method3, _method4, _method5 ) create_guard_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ) ) - #define Y_GUARD_METHOD2_SELECT_6( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6 ) create_guard_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ), adapt::type>( _class_instance, _method6 ) ) - #define Y_GUARD_METHOD2_SELECT_7( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7 ) create_guard_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ), adapt::type>( _class_instance, _method6 ), adapt::type>( _class_instance, _method7 ) ) - #define Y_GUARD_METHOD2_SELECT_8( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8 ) create_guard_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ), adapt::type>( _class_instance, _method6 ), adapt::type>( _class_instance, _method7 ), adapt::type>( _class_instance, _method8 ) ) - #define Y_GUARD_METHOD2_SELECT_9( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9 ) create_guard_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ), adapt::type>( _class_instance, _method6 ), adapt::type>( _class_instance, _method7 ), adapt::type>( _class_instance, _method8 ), adapt::type>( _class_instance, _method9 ) ) - #define Y_GUARD_METHOD2_SELECT_10( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9, _method10 ) create_guard_function( adapt::type>( _class_instance, _method1 ), adapt::type>( _class_instance, _method2 ), adapt::type>( _class_instance, _method3 ), adapt::type>( _class_instance, _method4 ), adapt::type>( _class_instance, _method5 ), adapt::type>( _class_instance, _method6 ), adapt::type>( _class_instance, _method7 ), adapt::type>( _class_instance, _method8 ), adapt::type>( _class_instance, _method9 ), adapt::type>( _class_instance, _method10 ) ) + +#endif + + #define Y_BEHAVIOR_METHOD2_SELECT_1( _class_instance, _method ) create_behavior_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method ) ) + #define Y_BEHAVIOR_METHOD2_SELECT_2( _class_instance, _method1, _method2 ) create_behavior_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ) ) + #define Y_BEHAVIOR_METHOD2_SELECT_3( _class_instance, _method1, _method2, _method3 ) create_behavior_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ) ) + #define Y_BEHAVIOR_METHOD2_SELECT_4( _class_instance, _method1, _method2, _method3, _method4 ) create_behavior_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ) ) + #define Y_BEHAVIOR_METHOD2_SELECT_5( _class_instance, _method1, _method2, _method3, _method4, _method5 ) create_behavior_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ) ) + #define Y_BEHAVIOR_METHOD2_SELECT_6( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6 ) create_behavior_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method6 ) ) + #define Y_BEHAVIOR_METHOD2_SELECT_7( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7 ) create_behavior_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method6 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method7 ) ) + #define Y_BEHAVIOR_METHOD2_SELECT_8( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8 ) create_behavior_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method6 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method7 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method8 ) ) + #define Y_BEHAVIOR_METHOD2_SELECT_9( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9 ) create_behavior_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method6 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method7 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method8 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method9 ) ) + #define Y_BEHAVIOR_METHOD2_SELECT_10( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9, _method10 ) create_behavior_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method6 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method7 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method8 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method9 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method10 ) ) + + #define Y_GUARD_METHOD2_SELECT_1( _class_instance, _method ) create_guard_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method ) ) + #define Y_GUARD_METHOD2_SELECT_2( _class_instance, _method1, _method2 ) create_guard_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ) ) + #define Y_GUARD_METHOD2_SELECT_3( _class_instance, _method1, _method2, _method3 ) create_guard_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ) ) + #define Y_GUARD_METHOD2_SELECT_4( _class_instance, _method1, _method2, _method3, _method4 ) create_guard_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ) ) + #define Y_GUARD_METHOD2_SELECT_5( _class_instance, _method1, _method2, _method3, _method4, _method5 ) create_guard_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ) ) + #define Y_GUARD_METHOD2_SELECT_6( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6 ) create_guard_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method6 ) ) + #define Y_GUARD_METHOD2_SELECT_7( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7 ) create_guard_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method6 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method7 ) ) + #define Y_GUARD_METHOD2_SELECT_8( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8 ) create_guard_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method6 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method7 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method8 ) ) + #define Y_GUARD_METHOD2_SELECT_9( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9 ) create_guard_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method6 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method7 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method8 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method9 ) ) + #define Y_GUARD_METHOD2_SELECT_10( _class_instance, _method1, _method2, _method3, _method4, _method5, _method6, _method7, _method8, _method9, _method10 ) create_guard_function( adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method1 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method2 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method3 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method4 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method5 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method6 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method7 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method8 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method9 ), adapt< typename std::remove_pointer< decltype(_class_instance)>::type >( _class_instance, _method10 ) ) #define Y_BEHAVIOR_FUNCTION2_SELECT_1( _function ) create_behavior_function( adapt_function( _function ) ) #define Y_BEHAVIOR_FUNCTION2_SELECT_2( _function1, _function2 ) create_behavior_function( adapt_function( _function1 ), adapt_function( _function2 ) ) diff --git a/libyasmine/include/backward_compatibility.hpp b/libyasmine/include/backward_compatibility.hpp index 7d53980..4fc4553 100644 --- a/libyasmine/include/backward_compatibility.hpp +++ b/libyasmine/include/backward_compatibility.hpp @@ -54,6 +54,7 @@ #define Y_CPP03_BOOST SX_CPP03_BOOST #define Y_NO_STD_MAKE_UNIQUE SX_NO_STD_MAKE_UNIQUE #define Y_NO_WINDOWS_H SX_NO_WINDOWS_H +#define Y_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG namespace sxy diff --git a/libyasmine/include/caller.hpp b/libyasmine/include/caller.hpp index 0408236..4f75144 100644 --- a/libyasmine/include/caller.hpp +++ b/libyasmine/include/caller.hpp @@ -24,7 +24,7 @@ namespace sxy -{ +{ void behavior_caller( const sxy::event& _event, sxy::event_collector& _event_collector, @@ -46,8 +46,8 @@ void behavior_caller( const sxy::event& _event, sxy::event_collector& _event_col const _event_type* specialized_event = dynamic_cast< const _event_type* >( &_event ); if( specialized_event ) - { - _method( specialized_event ); + { + _method( specialized_event ); } else { @@ -75,8 +75,8 @@ void behavior_caller( const sxy::event& _event, sxy::event_collector& _event_col const _event_type* specialized_event = dynamic_cast< const _event_type* >( &_event ); if( specialized_event ) - { - _method( specialized_event, _event_collector ); + { + _method( specialized_event, _event_collector ); } else { @@ -85,11 +85,11 @@ void behavior_caller( const sxy::event& _event, sxy::event_collector& _event_col #else - + auto& specialized_event = sxy::adjust_event_type< _event_type >( _event ); - _method( specialized_event, _event_collector ); - + _method( specialized_event, _event_collector ); + #endif } @@ -157,11 +157,11 @@ void behavior_caller( const sxy::event& _event, sxy::event_collector& _event_col template< typename _event_type1, typename _event_type2, typename _event_type3 > -void behavior_caller( const sxy::event& _event, sxy::event_collector& _event_collector, +void behavior_caller( const sxy::event& _event, sxy::event_collector& _event_collector, sxe::function _method1, sxe::function _method2, sxe::function _method3 ) -{ +{ #if defined( SX_CPP03_BOOST ) || ( defined(_MSC_VER) && _MSC_VER <=1800 ) diff --git a/libyasmine/include_impl/build_number.hpp b/libyasmine/include_impl/build_number.hpp index 1b63bf6..5086f20 100644 --- a/libyasmine/include_impl/build_number.hpp +++ b/libyasmine/include_impl/build_number.hpp @@ -24,7 +24,7 @@ namespace version { -const sxe::uint16_t BUILD_NUMBER( 716 ); +const sxe::uint16_t BUILD_NUMBER( 722 ); } diff --git a/libyasmine/source/version.cpp b/libyasmine/source/version.cpp index 6629d53..af6faa5 100644 --- a/libyasmine/source/version.cpp +++ b/libyasmine/source/version.cpp @@ -28,7 +28,7 @@ namespace const sxe::uint16_t VERSION_MAJOR( 1 ); const sxe::uint16_t VERSION_MINOR( 2 ); -const sxe::uint16_t VERSION_PATCH( 1 ); +const sxe::uint16_t VERSION_PATCH( 3 ); } diff --git a/libyasmine/source/vertex_impl.cpp b/libyasmine/source/vertex_impl.cpp index a2b1391..cbcdc97 100644 --- a/libyasmine/source/vertex_impl.cpp +++ b/libyasmine/source/vertex_impl.cpp @@ -83,6 +83,7 @@ void vertex_impl::add_outgoing_transition( transition& _outgoing_transition ) } else { + // this is a iterator and not a const_iterator because the gcc 4.8.4 have no C++11 support for const_iterators raw_transitions::iterator insert_position = find_first_transition_without_guard( outgoing_transitions_ ); if( insert_position != outgoing_transitions_.end() ) { diff --git a/libygen/CMakeLists.txt b/libygen/CMakeLists.txt index dffee11..e468a4b 100644 --- a/libygen/CMakeLists.txt +++ b/libygen/CMakeLists.txt @@ -4,6 +4,18 @@ project(libygen) set(CMAKE_VERBOSE_MAKEFILE, 1) +if(SX_RAPIDJSON) + message("SX_RAPIDJSON is set by user.") +else() + message("SX_RAPIDJSON is not set by user. Setting default value.") + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(SX_RAPIDJSON "/usr/include/rapidjson") + elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + set(SX_RAPIDJSON "C:\Program Files\rapidjson") + endif() +endif() +message(STATUS ${SX_RAPIDJSON}) + file(GLOB libygen_SRC "include/*.hpp" "source/*.cpp") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) @@ -50,7 +62,7 @@ endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${extra_flags}") include_directories("./include") -include_directories("/usr/include/rapidjson") +include_directories(${SX_RAPIDJSON}) include_directories("./../libyasmine" "./../genesis" "./../yasmine_model") include_directories("./../libyasmine/include" "./../genesis/include" "./../yasmine_model/include") include_directories("./../externals/essentials/include") diff --git a/libygen/include/libygen_build_number.hpp b/libygen/include/libygen_build_number.hpp index c11e3cd..7de1b3e 100644 --- a/libygen/include/libygen_build_number.hpp +++ b/libygen/include/libygen_build_number.hpp @@ -24,7 +24,7 @@ namespace version { - const sxe::uint16_t BUILD_NUMBER( 712 ); + const sxe::uint16_t BUILD_NUMBER( 722 ); } diff --git a/libygen/source/recipe_callback_impl.cpp b/libygen/source/recipe_callback_impl.cpp index 648b21f..2b076ff 100644 --- a/libygen/source/recipe_callback_impl.cpp +++ b/libygen/source/recipe_callback_impl.cpp @@ -589,7 +589,9 @@ std::string recipe_callback_impl::get_event_property( const std::string& _proper std::string result( "" ); if( event_index_ < state_machine_model_.get_events().size() ) { - sxy::model::event_model& event = state_machine_model_.get_events()[event_index_]; + //const sxy::model::state_machine_model::events& events_ = state_machine_model_.get_events(); + //const auto ev = events_[event_index_]; + sxy::model::event_model event = state_machine_model_.get_events()[event_index_]; if( _property == VARIABLE_EVENT_ID ) { result = sxe::to_string( event.id ); diff --git a/libygen/source/state_machine_type.cpp b/libygen/source/state_machine_type.cpp index fa6c47d..c392e29 100644 --- a/libygen/source/state_machine_type.cpp +++ b/libygen/source/state_machine_type.cpp @@ -38,8 +38,7 @@ state_machine_type sm_type_from_string( const std::string& _type ) } else { - throw sxe::exception( "State machine type is '%' and it should be '%' or '%'", string_type, VARIABLE_SM_SYNC, - VARIABLE_SM_ASYNC ); + // Default value will be set as 'sync' } return( type ); diff --git a/version.txt b/version.txt index a59d400..d4b119f 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,15 @@ Versions +• yasmine 1.3.3 released 2017-08-22 + • libyasmine 1.2.3 + • essentials 1.3.1 + • hermes 1.1.2 + • genesis 0.3.1 + • yasmine_model 0.2.1 + • libygen 0.2.1 + • ygen 0.1.2 + + • yasmine 1.3.2 released 2017-08-18 • libyasmine 1.2.2 • essentials 1.3.1 diff --git a/yasmine_model/CMakeLists.txt b/yasmine_model/CMakeLists.txt index 59473dc..25dba4d 100644 --- a/yasmine_model/CMakeLists.txt +++ b/yasmine_model/CMakeLists.txt @@ -4,6 +4,18 @@ project(yasmine_model) set(CMAKE_VERBOSE_MAKEFILE, 1) +if(SX_RAPIDJSON) + message("SX_RAPIDJSON is set by user.") +else() + message("SX_RAPIDJSON is not set by user. Setting default value.") + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(SX_RAPIDJSON "/usr/include/rapidjson") + elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + set(SX_RAPIDJSON "C:\Program Files\rapidjson") + endif() +endif() +message(STATUS ${SX_RAPIDJSON}) + file(GLOB yasmine_model_SRC "include/*.hpp" "source/*.cpp") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) @@ -51,7 +63,7 @@ endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${extra_flags}") -include_directories("/usr/include/rapidjson") +include_directories(${SX_RAPIDJSON}) include_directories("./../yasmine_model/include") include_directories("./../externals/essentials/include") diff --git a/yasmine_model/include/build_number.hpp b/yasmine_model/include/build_number.hpp index 0cac6c9..b34f2a7 100644 --- a/yasmine_model/include/build_number.hpp +++ b/yasmine_model/include/build_number.hpp @@ -24,7 +24,7 @@ namespace version { - const sxe::uint16_t BUILD_NUMBER( 712 ); + const sxe::uint16_t BUILD_NUMBER( 722 ); } diff --git a/yasmine_model/source/json_reader.cpp b/yasmine_model/source/json_reader.cpp index eedad03..996949b 100644 --- a/yasmine_model/source/json_reader.cpp +++ b/yasmine_model/source/json_reader.cpp @@ -68,7 +68,7 @@ model::state_machine_model_ptr json_reader::get_model_ptr() void json_reader::read_json_file( const std::string& _file ) { - + #ifndef SX_CPP03_BOOST std::ifstream infile( _file, std::ios::in ); #else diff --git a/yasmine_model/source/json_writer.cpp b/yasmine_model/source/json_writer.cpp index 8b7d05f..26a3f31 100644 --- a/yasmine_model/source/json_writer.cpp +++ b/yasmine_model/source/json_writer.cpp @@ -50,7 +50,7 @@ void json_writer::write_json_to_file( const std::string& _json_file, const model rapidjson::Document doc; doc.SetObject(); add_version( doc, doc.GetAllocator() ); - rapidjson::Value json_state_machine( rapidjson::kObjectType ); + rapidjson::Value json_state_machine( rapidjson::kObjectType ); rapidjson::Value json_events( rapidjson::kArrayType ); add_events_from_model( _state_machine_model, json_events, doc.GetAllocator() ); diff --git a/ygen/include/ygen_build_number.hpp b/ygen/include/ygen_build_number.hpp index 245d59a..5da7ba7 100644 --- a/ygen/include/ygen_build_number.hpp +++ b/ygen/include/ygen_build_number.hpp @@ -20,7 +20,7 @@ namespace version { - const sxe::uint16_t BUILD_NUMBER( 712 ); + const sxe::uint16_t BUILD_NUMBER( 722 ); }