HdlFBPlug Class Reference

#include <fbplug.h>

Class Description

Handler of FBPlug object Use this handler object to gracefully take care of dangling pointer problem.

For example, you created FBCamera object and hold it's pointer address to further usage, However, this FBCamera object could be destroyed by the application internally at any moment and its pointer you currently hold is invalid. But you don't easy way to tell so. This HdlFBPlug class provide means to handle this case gracefully.

Definition at line 583 of file fbplug.h.

+ Inheritance diagram for HdlFBPlug:

Public Member Functions

 HdlFBPlug ()
 
 HdlFBPlug (const FBPlug *pFBPlug)
 
 HdlFBPlug (HdlFBPlug const &pFBPlug)
 
 ~HdlFBPlug ()
 
bool Ok () const
 
bool Is (int pTypeId)
 Is( int pTypeId ) More...
 
HdlFBPlugoperator= (const FBPlug *pFBPlug)
 
HdlFBPlugoperator= (const HdlFBPlug &pFBPlug)
 
bool operator== (const HdlFBPlug &pFBPlug) const
 
bool operator!= (const HdlFBPlug &pFBPlug) const
 
FBPlugGetPlug () const
 
FBPlugoperator() () const
 
FBPlugoperator-> () const
 
 operator FBPlug * () const
 

Protected Member Functions

void SetPlug (const FBPlug *pFBPlug)
 

Constructor & Destructor Documentation

HdlFBPlug ( )
HdlFBPlug ( const FBPlug pFBPlug)
HdlFBPlug ( HdlFBPlug const &  pFBPlug)
~HdlFBPlug ( )

Member Function Documentation

FBPlug* GetPlug ( ) const
bool Is ( int  pTypeId)

Is( int pTypeId )

Parameters
pTypeIdType Identification.
Returns
True if Plug is a Instance of pTypeId.
bool Ok ( ) const
operator FBPlug * ( ) const
inline

Definition at line 616 of file fbplug.h.

617  {
618  return (FBPlug *)GetPlug();
619  }
FBPlug * GetPlug() const
bool operator!= ( const HdlFBPlug pFBPlug) const
FBPlug* operator() ( ) const
inline

Definition at line 613 of file fbplug.h.

613 { return GetPlug(); }
FBPlug * GetPlug() const
FBPlug* operator-> ( ) const
inline

Definition at line 614 of file fbplug.h.

614 { return GetPlug(); }
FBPlug * GetPlug() const
HdlFBPlug& operator= ( const FBPlug pFBPlug)
HdlFBPlug& operator= ( const HdlFBPlug pFBPlug)
bool operator== ( const HdlFBPlug pFBPlug) const
void SetPlug ( const FBPlug pFBPlug)
protected

The documentation for this class was generated from the following file: