$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [boost-users][StateChart] event creation/destruction
From: Ivan Kharin (korsar.akvis_at_[hidden])
Date: 2009-02-25 07:41:49
> volatile long eventCount;
> template<class MostDerived> struct EvBase : sc::event<MostDerived>
> {
>  EvBase()
>  {
>   long c = InterlockedIncrement(&eventCount);
>   somelog << c << std::endl;
>  }
>  ~EvBase()
>  {
>   long c = InterlockedDecrement(&eventCount);
>   somelog << c << std::endl;
>  }
> };
add copy constructor:
EvBase( const EvBase& rhs ) : sc::event<MostDerived>( rhs )
{
   long c = InterlockedIncrement(&eventCount);
   somelog << c << std::endl;
}
-- Ivan Kharin