bbtkPimpl.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define BBTK_DECLARE_PIMPL(CLASS)
 Macro defining the members used to hide a class implementation details using the pimpl idom /// See http://c2.com/cgi/wiki?PimplIdiom NOTE :
  • Defines the struct Pimpl to be implemented in cpp file
  • Declares a private member called p
  • Declares the methods PimplConstruct/PimplCopyConstruct/PimplDestruct.

#define BBTK_IMPL_PIMPL(CLASS)
 Macro implementing the PimplConstruct/PimplCopyConstruct/PimplDestruct method declared by BBTK_DECLARE_PIMPL: to be put in cpp.


Define Documentation

#define BBTK_DECLARE_PIMPL ( CLASS   ) 

Value:

private:                                                              \
  /* The Pimpl struct forward definition */                           \
  class Pimpl;                                                        \
  /* The Pimpl pointer */                                             \
  Pimpl* p;                                                           \
  /* Constructs the Pimpl (to be called in all Ctors) */              \
  void PimplConstruct();                                              \
  /* Copy constructs the Pimpl (to be called in copy Ctor) */         \
  void PimplCopyConstruct(const CLASS&);                              \
  /* Destructs the Pimpl (to be called in Dtor) */                    \
  void PimplDestruct();
Macro defining the members used to hide a class implementation details using the pimpl idom /// See http://c2.com/cgi/wiki?PimplIdiom NOTE :
  • Defines the struct Pimpl to be implemented in cpp file
  • Declares a private member called p
  • Declares the methods PimplConstruct/PimplCopyConstruct/PimplDestruct.

Definition at line 42 of file bbtkPimpl.h.

#define BBTK_IMPL_PIMPL ( CLASS   ) 

Value:

void CLASS::PimplConstruct()                                            \
  {                                                                     \
    p = new Pimpl;                                                      \
  }                                                                     \
  void CLASS::PimplCopyConstruct(const CLASS& o)                        \
  {                                                                     \
    p = new Pimpl(*(o.p));                                              \
  }                                                                     \
  void CLASS::PimplDestruct()                                           \
  {                                                                     \
    delete p;                                                           \
  }
Macro implementing the PimplConstruct/PimplCopyConstruct/PimplDestruct method declared by BBTK_DECLARE_PIMPL: to be put in cpp.

Definition at line 58 of file bbtkPimpl.h.


Generated on Thu May 31 14:12:50 2012 for BBTK by  doxygen 1.5.7.1