Skip to content

Commit

Permalink
Merge pull request #20 from SeadexGmbH/yasmine-1.3.2
Browse files Browse the repository at this point in the history
yasmine 1.3.2
  • Loading branch information
SeadexTM authored Aug 18, 2017
2 parents 3942855 + c4ad90a commit 8bca3a8
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 43 deletions.
18 changes: 18 additions & 0 deletions build/debug_info_clang.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile />
<Link>
<TargetMachine>NotSet</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ClCompile>
<DebugInformationFormat>FullDebug</DebugInformationFormat>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
2 changes: 1 addition & 1 deletion externals/hermes/include/hermes/log_and_throw.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace hermes

//!\def LOG_AND_THROW( _level, ... )
//!\brief Log a message and then throw an exception with the same message.
#define LOG_AND_THROW( _level, ... ) HEMRES_EXPAND( HERMES_VA_SELECT( LOG_AND_THROW_PARAM, _level, __VA_ARGS__ ) )
#define LOG_AND_THROW( _level, ... ) EXPAND( HERMES_VA_SELECT( LOG_AND_THROW_PARAM, _level, __VA_ARGS__ ) )


#define LOG_AND_THROW_PARAM_1( _log_level, _what ) \
Expand Down
2 changes: 1 addition & 1 deletion externals/hermes/source/hermes_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace


const sxe::uint16_t VERSION_MAJOR( 1 );
const sxe::uint16_t VERSION_MINOR( 0 );
const sxe::uint16_t VERSION_MINOR( 1 );
const sxe::uint16_t VERSION_PATCH( 2 );


Expand Down
8 changes: 5 additions & 3 deletions libyasmine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQ

if("${CPP_VERSION}" STREQUAL "03")
set(extra_flags "${extra_flags} -std=c++03 -Wall -Wpedantic -g -Wno-unknown-pragmas -D \"SX_CPP03_BOOST\" -D \"SX_NO_VARIADIC_MACRO\"")
else()
elseif("${CPP_VERSION}" STREQUAL "14")
set(extra_flags "${extra_flags} -std=c++14 -Wall -Wpedantic -g")
else()
set(extra_flags "${extra_flags} -std=c++11 -Wall -Wpedantic -g -D \"SX_NO_STD_MAKE_UNIQUE\"")
endif()

# yasmine's preprocessor definitions
Expand Down Expand Up @@ -182,8 +184,8 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif()

SET_TARGET_PROPERTIES ( libyasmine PROPERTIES
VERSION 1.1.2
SOVERSION 1.1 )
VERSION 1.2.1
SOVERSION 1.2 )

install(TARGETS libyasmine DESTINATION lib)
file(GLOB yasmine_hpp "include/*.hpp")
Expand Down
14 changes: 14 additions & 0 deletions libyasmine/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Change log
All notable changes to this project are documented in this file.

##[1.2.2] - 2017-08-18

### Fix
� changed const_iterator to iterator in methods vertex_impl::add_outgoing_transition and
vertex_impl::find_first_transition_without_guard for compilers with incomplete C++11 support
� fixed incorrect use of logging macro when compiling C++03 code


##[1.2.1] - 2017-08-14

### Changed
� CMake file improvements: Set C++-standard version (when using gcc) using CPP_VERSION with values '03' for C++03, '14' for C++14. Default is C++11.


##[1.2.0] - 2017-06-26

### Added
Expand Down
2 changes: 1 addition & 1 deletion libyasmine/include/vertex_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class vertex_impl:

private:
void add_ancestor_uri( sxe::uri& _uri ) const SX_OVERRIDE;
raw_transitions::const_iterator find_first_transition_without_guard( const raw_transitions& _vector_of_transitions );
raw_transitions::iterator find_first_transition_without_guard( raw_transitions& _vector_of_transitions );
static bool has_no_guard( const transition* const _transition );


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( 712 );
const sxe::uint16_t BUILD_NUMBER( 716 );


}
Expand Down
2 changes: 1 addition & 1 deletion libyasmine/libyasmine.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,10 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Clang|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\build\yasmine.props" />
<Import Project="..\build\debug_info.props" />
<Import Project="..\build\yasmine_clang.props" />
<Import Project="..\build\use_essentials.props" />
<Import Project="..\build\use_hermes.props" />
<Import Project="..\build\debug_info.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Clang|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
Expand Down
28 changes: 14 additions & 14 deletions libyasmine/source/async_state_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ void async_state_machine::halt_and_join()
{
SX_LOG( hermes::log_level::LL_INFO, "Stopping and joining async state machine '%'.", get_name() );

halt();
join();
halt();
join();

SX_LOG( hermes::log_level::LL_INFO, "Stopped and joined async state machine '%'.", get_name() );
}
Expand All @@ -104,7 +104,7 @@ void async_state_machine::halt()
"Status is not 'STARTED' or 'TERMINATED' on stop!" );
status_ = state_machine_status::STOP_REQUESTED;
}
run_and_event_condition_.notify_one();
run_and_event_condition_.notify_one();

SX_LOG( hermes::log_level::LL_TRACE, "Stopped state machine '%'.", get_name() );
}
Expand All @@ -121,7 +121,7 @@ void async_state_machine::join()
}

worker_thread_->join();
worker_thread_.reset();
worker_thread_.reset();
status_ = state_machine_status::STOPPED;
state_machine_base::halt();

Expand Down Expand Up @@ -169,10 +169,10 @@ bool async_state_machine::push( const event_sptr& _event )
void async_state_machine::start_state_machine()
{
SX_ASSERT( ( state_machine_status::NEW == status_ ) || ( state_machine_status::STOPPED == status_ ),
"Status is neither 'NEW' nor 'STOPPED' on start!" );
"Status is neither 'NEW' nor 'STOPPED' on start!" );

status_ = state_machine_status::STARTED;
worker_thread_ = SX_MAKE_UNIQUE< sxe::thread >( &async_state_machine::work, this );
status_ = state_machine_status::STARTED;
worker_thread_ = SX_MAKE_UNIQUE< sxe::thread >( &async_state_machine::work, this );
}


Expand All @@ -182,16 +182,16 @@ bool async_state_machine::insert( const event_sptr& _event )

bool event_added = false;
{
sxe::lock_guard< sxe::mutex > lock( run_and_event_mutex_ );
sxe::lock_guard< sxe::mutex > lock( run_and_event_mutex_ );
if( status_ == state_machine_status::STARTED )
{
{
insert_impl( _event );
event_added = true;
}
else
{
SX_LOG( hermes::log_level::LL_WARN, "Event '%' was not inserted in the queue of events! State machine is not running.", _event->get_name() );
}
}
}
if( event_added )
{
Expand All @@ -214,7 +214,7 @@ void async_state_machine::insert_impl( const event_sptr& _event )
event_list_.push_back( _event );
}
else
{
{
std::list< event_sptr >::iterator position = event_list_.begin();
while( position != event_list_.end() )
{
Expand All @@ -225,13 +225,13 @@ void async_state_machine::insert_impl( const event_sptr& _event )
++position;
}
SX_ASSERT( position != event_list_.end(), "No element found before which to insert!" );
event_list_.insert( position, _event );
event_list_.insert( position, _event );
}
}


bool async_state_machine::wait_predicate() const
{
{
return( !( status_ == state_machine_status::STARTED ) || !event_list_.empty() );
}

Expand Down
14 changes: 7 additions & 7 deletions libyasmine/source/state_pseudostate_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ state_pseudostate_impl::state_pseudostate_impl( const std::string& _name )
#ifdef Y_OPTIMIZE_4_SPEED
ancestors_as_regions_.reserve( ANCESTORS_VECTOR_SIZE );
ancestors_.reserve( ANCESTORS_VECTOR_SIZE );
#endif
#endif
}


state_pseudostate_impl::~state_pseudostate_impl() SX_NOEXCEPT
{
// Nothing to do...
}


const state_machine_element* state_pseudostate_impl::get_parent() const
{
Expand Down Expand Up @@ -73,7 +73,7 @@ raw_composite_states state_pseudostate_impl::get_ancestors( composite_state* con
raw_composite_states ancestors;
collect_ancestors( ancestors, _final_ancestor, _include_final_ancestor );
return( ancestors );
#endif
#endif
}


Expand All @@ -86,8 +86,8 @@ raw_regions state_pseudostate_impl::get_ancestors_as_regions() const
}
return( ancestors_as_regions_ );
#else
return( get_parent_state().get_ancestors_as_regions() );
#endif
return( get_parent_state().get_ancestors_as_regions() );
#endif
}


Expand All @@ -98,8 +98,8 @@ void state_pseudostate_impl::collect_ancestors( raw_composite_states& _ancestors
const raw_composite_states& ancestors_of_parent_state = get_parent_state().get_ancestors( _final_ancestor );
_ancestors.insert( _ancestors.end(), ancestors_of_parent_state.begin(), ancestors_of_parent_state.end() );
if( !_include_final_ancestor )
{
_ancestors.erase( _ancestors.end() );
{
_ancestors.erase( _ancestors.end() );
}
}

Expand Down
2 changes: 1 addition & 1 deletion libyasmine/source/timed_event_creator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ handle_type timed_event_creator::create_event_creation_request(
sxe::unique_lock< sxe::mutex > lock( mutex_ );
if( run_ )
{
handle = generate_handle();
handle = generate_handle();
event_creation_requests_.insert( event_creation_request( _time, _event, handle ) );
}
else
Expand Down
2 changes: 1 addition & 1 deletion libyasmine/source/transition_finder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void transition_finder::search_choice_transitions( const raw_const_choices& _cho
if( !try_to_build_compound_transition( *transition, _compound_transitions, _event, _event_collector ) )
{
LOG_AND_THROW( hermes::log_level::LL_FATAL,
"Transition following choice '%' could not be built in compound transition!", choice->get_name() );
"Transition following choice '%' could not be built in compound transition!", choice->get_name() );
}
else
{
Expand Down
17 changes: 5 additions & 12 deletions libyasmine/source/vertex_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,14 @@ void vertex_impl::add_outgoing_transition( transition& _outgoing_transition )
{
if( has_no_guard( &_outgoing_transition ) )
{
outgoing_transitions_.push_back( &_outgoing_transition );
outgoing_transitions_.push_back( &_outgoing_transition );
}
else
{
raw_transitions::const_iterator insert_position = find_first_transition_without_guard( outgoing_transitions_ );
if( insert_position != outgoing_transitions_.end() )
raw_transitions::iterator insert_position = find_first_transition_without_guard( outgoing_transitions_ );
if( insert_position != outgoing_transitions_.end() )
{
#ifdef SX_CPP03_BOOST
raw_transitions::iterator insert_position_03 =
outgoing_transitions_.begin() +
std::distance( const_cast<const raw_transitions&>(outgoing_transitions_).begin(), insert_position );
outgoing_transitions_.insert( insert_position_03, &_outgoing_transition );
#else
outgoing_transitions_.insert( insert_position, &_outgoing_transition );
#endif
}
else
{
Expand Down Expand Up @@ -244,9 +237,9 @@ void vertex_impl::add_ancestor_uri( sxe::uri& _uri ) const
}


raw_transitions::const_iterator vertex_impl::find_first_transition_without_guard( const raw_transitions& _vector_of_transitions )
raw_transitions::iterator vertex_impl::find_first_transition_without_guard( raw_transitions& _vector_of_transitions )
{
raw_transitions::const_iterator found_position = std::find_if( _vector_of_transitions.begin(), _vector_of_transitions.end(),
raw_transitions::iterator found_position = std::find_if( _vector_of_transitions.begin(), _vector_of_transitions.end(),
( sxe::bind( &vertex_impl::has_no_guard, sxe::_1 ) ) );
return( found_position );
}
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.2 released 2017-08-18
� libyasmine 1.2.2
� 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.1 released 2017-08-14
� libyasmine 1.2.1
� essentials 1.3.1
Expand Down

0 comments on commit 8bca3a8

Please sign in to comment.