$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Moore, Dave (dmoore_at_[hidden])
Date: 2002-08-06 15:40:50
> To truly solve this [and other similar problems], you'd need a rather
> simple mechanism of pre-destructors [base class: call join(); in this
> case] and post-constructors [base class: call "start()"; to avoid two
> phase construction, sort of]. ;-)
Can't your suggestion be solved with something like:
class pre_post_hooks<typename myclass> : public myclass
{
public:
pre_post_hooks() : myclass()
{ start();}
virtual ~pre_post_hooks()
{ join(); }
};
modify as necessary for passing args to constructor....
Dave
>