Skip to content

Commit

Permalink
Merge pull request #23 from SeadexGmbH/yasmine-1.4.0
Browse files Browse the repository at this point in the history
yasmine 1.4.0
  • Loading branch information
SeadexTM authored Sep 21, 2017
2 parents 537a37f + 74aa835 commit 77e7b71
Show file tree
Hide file tree
Showing 45 changed files with 5,594 additions and 524 deletions.
4 changes: 2 additions & 2 deletions build/use_boost.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<BOOST_PATH>..\..\..\..\..\3rd party\boost\Content\boost_1_60_0</BOOST_PATH>
<BOOST_LIB_PATH>..\..\..\..\..\3rd party\boost\Content\boost_1_60_0\stage\VS2015\$(Platform)\lib</BOOST_LIB_PATH>
<BOOST_PATH>..\..\..\..\..\3rd party\boost\Content\boost_1_65_1</BOOST_PATH>
<BOOST_LIB_PATH>..\..\..\..\..\3rd party\boost\Content\boost_1_65_1\stage\$(PlatformToolsetVersion)\$(Platform)\lib</BOOST_LIB_PATH>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup>
Expand Down
1 change: 1 addition & 0 deletions build/yasmine.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<WholeProgramOptimization>false</WholeProgramOptimization>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalIncludeDirectories>include;include_impl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/D "_STL_WARNING_LEVEL=3" %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link />
<Link>
Expand Down
26 changes: 26 additions & 0 deletions build/yasmine_clang.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<CLanguageStandard>c11</CLanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<ClCompile>
<CppLanguageStandard>c++1y</CppLanguageStandard>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<ExceptionHandling>Enabled</ExceptionHandling>
<MSExtensions>true</MSExtensions>
<PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel>
<DebugInformationFormat>FullDebug</DebugInformationFormat>
<AdditionalOptions />
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
371 changes: 362 additions & 9 deletions examples/classic_farmroad/classic_farmroad.vcxproj

Large diffs are not rendered by default.

500 changes: 490 additions & 10 deletions examples/event_collector_example/event_collector_example.vcxproj

Large diffs are not rendered by default.

374 changes: 365 additions & 9 deletions examples/events_with_parameters/events_with_parameters.vcxproj

Large diffs are not rendered by default.

359 changes: 350 additions & 9 deletions examples/forty_two/forty_two.vcxproj

Large diffs are not rendered by default.

369 changes: 360 additions & 9 deletions examples/generator_example/generator_example.vcxproj

Large diffs are not rendered by default.

374 changes: 365 additions & 9 deletions examples/hello_yasmine/hello_yasmine.vcxproj

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions externals/essentials/source/conversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <stdexcept>
#include <algorithm>
#include <cctype>

#ifndef SX_CPP03_BOOST
#include <string>
Expand Down Expand Up @@ -85,7 +86,7 @@ std::string to_string( const int _value )
std::string to_upper( const std::string& _value )
{
std::string value_caps = _value;
std::transform( value_caps.begin(), value_caps.end(), value_caps.begin(), ::toupper );
std::transform( value_caps.begin(), value_caps.end(), value_caps.begin(), static_cast< int( *)( int ) >( ::std::toupper ) );
return( value_caps );
}

Expand All @@ -94,7 +95,7 @@ std::string to_upper( const std::string& _value )
std::string to_lower( const std::string& _value )
{
std::string value_to_lower = _value;
std::transform( value_to_lower.begin(), value_to_lower.end(), value_to_lower.begin(), ::tolower );
std::transform( value_to_lower.begin(), value_to_lower.end(), value_to_lower.begin(), static_cast< int( *)( int ) >( ::std::tolower ) );
return( value_to_lower );
}

Expand Down
10 changes: 10 additions & 0 deletions genesis/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.


##[0.3.0] - 2017-09-21

### Added
� Support for Visual Studio 2017 builds

### Fixed
� added missing override specifier to template_block::create method


##[0.2.0] - 2017-04-24

### Added
Expand Down
462 changes: 453 additions & 9 deletions genesis/genesis.vcxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion genesis/include/template_block.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class template_block
//!\brief Create the output for a step.
//!\param _recipe_callback Generator callback
//!\param _ostream Stream to which the generator writes.
void create( recipe_callback& _recipe_callback, std::stringstream& _ostream );
virtual void create( recipe_callback& _recipe_callback, std::stringstream& _ostream ) SX_OVERRIDE;


private:
Expand Down
4 changes: 2 additions & 2 deletions libyasmine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif()

SET_TARGET_PROPERTIES ( libyasmine PROPERTIES
VERSION 1.2.3
SOVERSION 1.2 )
VERSION 1.3.0
SOVERSION 1.3 )

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


##[1.3.0] - 2017-09-21

### Changed
� get_name is now a public method of the state_machine class

### Added
� Support for Visual Studio 2017 builds
� complex states (root state of the state machine, simple states and composite states) now have a method called add_deferred_event.
This method adds an event ID to the list of the deferred events IDs. This method is not thread-safe a must only be used before
starting the state machine.

### Fixed
� On start of the state machine, the root state becomes active and on stop it becomes inactive.
� bug with ::std::toupper and ::std::tolower (reported for VS2017 compiler, version 15.3.4)


##[1.2.3] - 2017-08-22

### Changed
Expand Down
1 change: 1 addition & 0 deletions libyasmine/include/complex_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class complex_state:

SX_NO_COPY(complex_state)
virtual void accept_complex_state_visitor( complex_state_visitor& _visitor ) const = 0;
virtual void add_deferred_event( const event_id& _event_id ) = 0;
};


Expand Down
5 changes: 3 additions & 2 deletions libyasmine/include/complex_state_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ class complex_state_impl:
public virtual complex_state, public state_impl
{
public:
explicit complex_state_impl( const std::string& _name, behavior_uptr _entry_behavior,
explicit complex_state_impl( const std::string& _name, behavior_uptr _entry_behavior,
behavior_uptr _exit_behavior, const event_ids& _deferred_events = event_ids() );
virtual ~complex_state_impl() SX_NOEXCEPT SX_OVERRIDE;
SX_NO_COPY(complex_state_impl)
SX_NO_COPY(complex_state_impl)
virtual behavior * get_entry_behavior() const SX_OVERRIDE;
virtual behavior * get_exit_behavior() const SX_OVERRIDE;
virtual bool is_event_deferred( const event_id& _event_id ) const SX_OVERRIDE;
virtual void add_deferred_event( const event_id& _event_id ) SX_OVERRIDE;


protected:
Expand Down
1 change: 1 addition & 0 deletions libyasmine/include/state_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class state_impl:
void collect_ancestors_as_regions( raw_regions& _ancestors_as_regions ) const;

bool was_active_;
bool is_active_;
region* parent_;

#ifdef Y_OPTIMIZE_4_SPEED
Expand Down
8 changes: 6 additions & 2 deletions libyasmine/include/state_machine_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,12 @@ namespace sxy
//!\param _behavior
virtual void set_behavior_of_unhandled_event_handler( const behavior_function& _behavior );

//!\brief Get the name of the state machine.
//!\return name of the state machine
virtual std::string get_name() const;

protected:
std::string get_name() const;

protected:
//!\brief Starts the state machine.
//!\param _async_event_handler Pointer to an asynchronous event handler. It's used by
//!the asynchronous state machine if it has to process asynchronous errors that occur in the
Expand All @@ -209,7 +211,9 @@ namespace sxy

private:
virtual const events& get_deferred_events() const SX_OVERRIDE;
public:
virtual raw_const_states get_active_state_configuration() const SX_OVERRIDE;
private:
void get_active_states_from_region( raw_const_states& _active_state_configuration, const region& _region ) const;
void check_regions_for_active_states( raw_const_states& _active_state_configuration, const state& _state ) const;
void add_deferred_event( const event_sptr& _event_id );
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( 722 );
const sxe::uint16_t BUILD_NUMBER( 751 );


}
Expand Down
2 changes: 1 addition & 1 deletion libyasmine/include_impl/composite_state_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class composite_state_impl SX_FINAL:
public virtual composite_state, public complex_state_impl
{
public:
explicit composite_state_impl( const std::string& _name, behavior_uptr _entry_action = behavior_uptr(),
explicit composite_state_impl( const std::string& _name, behavior_uptr _entry_action = behavior_uptr(),
behavior_uptr _exit_action = behavior_uptr(), const event_ids& _deferred_events = event_ids() );
virtual ~composite_state_impl() SX_NOEXCEPT SX_OVERRIDE;
SX_NO_COPY(composite_state_impl)
Expand Down
Loading

0 comments on commit 77e7b71

Please sign in to comment.