Skip to content

Commit

Permalink
Merge pull request #22 from SeadexGmbH/yasmine-1.3.3
Browse files Browse the repository at this point in the history
yasmine 1.3.3
  • Loading branch information
SeadexTM authored Aug 22, 2017
2 parents 8bca3a8 + ce128ba commit 537a37f
Show file tree
Hide file tree
Showing 25 changed files with 263 additions and 56 deletions.
1 change: 0 additions & 1 deletion build/use_genesis.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\genesis\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat>
</ClCompile>
<Lib />
<Link>
Expand Down
2 changes: 1 addition & 1 deletion externals/essentials/include/essentials/sxprintf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 >
Expand Down
4 changes: 2 additions & 2 deletions externals/essentials/source/essentials_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );


}
Expand Down
2 changes: 1 addition & 1 deletion genesis/source/loop_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_ );
Expand Down
2 changes: 1 addition & 1 deletion genesis/source/template_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
{
Expand Down
2 changes: 1 addition & 1 deletion genesis/source/variable_step.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_ );
Expand Down
4 changes: 2 additions & 2 deletions genesis/source/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );


}
Expand Down
14 changes: 13 additions & 1 deletion libyasmine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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" )
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions libyasmine/changelog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
197 changes: 173 additions & 24 deletions libyasmine/include/assembly.hpp

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions libyasmine/include/backward_compatibility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions libyasmine/include/caller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


namespace sxy
{
{


void behavior_caller( const sxy::event& _event, sxy::event_collector& _event_collector,
Expand All @@ -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
{
Expand Down Expand Up @@ -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
{
Expand All @@ -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
}
Expand Down Expand Up @@ -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<void( const _event_type1&, sxy::event_collector& )> _method1,
sxe::function<void( const _event_type2&, sxy::event_collector& )> _method2,
sxe::function<void( const _event_type3&, sxy::event_collector& )> _method3 )
{
{
#if defined( SX_CPP03_BOOST ) || ( defined(_MSC_VER) && _MSC_VER <=1800 )


Expand Down
2 changes: 1 addition & 1 deletion libyasmine/include_impl/build_number.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace version
{


const sxe::uint16_t BUILD_NUMBER( 716 );
const sxe::uint16_t BUILD_NUMBER( 722 );


}
Expand Down
2 changes: 1 addition & 1 deletion libyasmine/source/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );


}
Expand Down
1 change: 1 addition & 0 deletions libyasmine/source/vertex_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
{
Expand Down
14 changes: 13 additions & 1 deletion libygen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion libygen/include/libygen_build_number.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace version
{


const sxe::uint16_t BUILD_NUMBER( 712 );
const sxe::uint16_t BUILD_NUMBER( 722 );


}
Expand Down
4 changes: 3 additions & 1 deletion libygen/source/recipe_callback_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
3 changes: 1 addition & 2 deletions libygen/source/state_machine_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
10 changes: 10 additions & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 13 additions & 1 deletion yasmine_model/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion yasmine_model/include/build_number.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace version
{


const sxe::uint16_t BUILD_NUMBER( 712 );
const sxe::uint16_t BUILD_NUMBER( 722 );


}
Expand Down
2 changes: 1 addition & 1 deletion yasmine_model/source/json_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion yasmine_model/source/json_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down
2 changes: 1 addition & 1 deletion ygen/include/ygen_build_number.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace version
{


const sxe::uint16_t BUILD_NUMBER( 712 );
const sxe::uint16_t BUILD_NUMBER( 722 );


}
Expand Down

0 comments on commit 537a37f

Please sign in to comment.