|
Boost Users : |
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net