1 #ifndef BOOST_STATECHART_EVENT_HPP_INCLUDED
2 #define BOOST_STATECHART_EVENT_HPP_INCLUDED
11 #include <boost/statechart/event_base.hpp>
12 #include <boost/statechart/detail/rtti_policy.hpp>
13 #include <boost/statechart/detail/memory.hpp>
15 #include <boost/polymorphic_cast.hpp>
29 template<
class MostDerived,
class Allocator = std::allocator< none > >
30 class event :
public detail::rtti_policy::rtti_derived_type<
31 MostDerived, event_base >
38 void *
operator new( std::size_t size )
40 return detail::allocate< MostDerived, Allocator >( size );
43 void *
operator new( std::size_t,
void * p )
48 void operator delete(
void * pEvent )
50 detail::deallocate< MostDerived, Allocator >( pEvent );
53 void operator delete(
void * pEvent,
void * p )
64 virtual intrusive_ptr< const event_base > clone()
const
66 return intrusive_ptr< const event_base >(
new MostDerived(
67 *polymorphic_downcast< const MostDerived * >(
this ) ) );