[Greenengine-developer] new typedef convention for shared_ptr
Status: Planning
Brought to you by:
jeromiya
|
From: Jeremy B. <bel...@gm...> - 2007-04-15 00:11:09
|
I've decided to start implementing a new convention for shared_ptr that
makes things much cleaner in the code. Every class should, immediately
after its definition, define a typedef for a shared_ptr of that type,
and it should be named "[classname]Ptr". For example:
#include <boost/shared_ptr.h>
class MyClassName {
...
};
typedef boost::shared_ptr<MyClassName> MyClassNamePtr;
This greatly reduces the messiness of shared_ptr arguments in the entire
codebase. I haven't implemented it yet in the main code, but just
thought I'd pass along that convention for you guys to implement in your
own code while I'm doing that for mine.
Regards,
Jeremy
|