Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Python Debugger

<< < (4/15) > >>

oBFusCATed:
a) sounds like the way to go.
b) is not possible, because typedefs can't be forward declared, too.
c) won't be discussed at all, because it will make the code harder to maintain and will probably cause lots of memory leaks.

dmoore:

--- Quote from: oBFusCATed on July 31, 2012, 04:04:17 pm ---a) sounds like the way to go.
b) is not possible, because typedefs can't be forward declared, too.

--- End quote ---

I had no problems with (b):


--- Code: ---#include <cbplugin.h>

typedef cb::shared_ptr<cbWatch> cbWatchPtr; // <-- This compiles fine
typedef cbWatch::Pointer cbWatchPtr2; // <--- This is an error

--- End code ---

oBFusCATed:
The thing is that if we want to put typedef at the correct place (debuggermanager.h), we can't because forwarding typedefs doesn't work.

dmoore:

--- Quote from: oBFusCATed on July 31, 2012, 05:49:25 pm ---The thing is that if we want to put typedef at the correct place (debuggermanager.h), we can't because forwarding typedefs doesn't work.

--- End quote ---

Well you could do this


--- Code: ---//debugger_pointers.h
class cbWatch;
typedef cb::shared_ptr<cbWatch> cbWatchPtr;
class cbBreakpoint;
typedef cb::shared_ptr<cbBreakpoint> cbBreakpointPtr;
...

//debuggermanager.h
#include "debugger_pointers.h"

//cbplugin.h
#include "debugger_pointers.h"

--- End code ---

 ;)

oBFusCATed:
Yes, of course, if you have time and desire you can do it, too :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version