Free Electron
|
Smart pointer used with types represented by BaseType. More...
#include <Instance.h>
Inherited by fe::RecordCookbook::Ingredient.
Public Member Functions | |
Instance (void *instance, const sp< BaseType > &rspBT, std::atomic< int > *pRefCnt) | |
Instance (const Instance &other) | |
Instance & | operator= (const Instance &other) |
bool | operator== (const Instance &other) |
void | acquire (void) const |
void | release (void) |
void | assign (const Instance &rvalue) |
template<class T > | |
T & | cast (void) const |
template<class T > | |
bool | is (void) const |
sp< BaseType > | type (void) const |
void * | data (void) const |
void | set (void *instance, const sp< BaseType > &rspBT, std::atomic< int > *pRefCnt) |
template<class T > | |
T & | set (sp< TypeMaster > spTM, T &a_t) |
template<class T > | |
T & | create (sp< TypeMaster > spTM) |
void | create (sp< BaseType > spBT) |
BWORD | unique (void) const |
Private Attributes | |
sp< BaseType > | m_spType |
void * | m_pData |
std::atomic< int > * | m_pRefCnt |
Related Functions | |
(Note that these are not member functions.) | |
String | print (const Instance &a_instance) |
Instance print. More... | |
Smart pointer used with types represented by BaseType.
This highly specialized smart pointer is designed to deal with instances with types represented by BaseType. In particular, intended for record attribute instances with respect to the script binding.
Whenever dealing directly with Instances be very careful about reference count management. Instance cannot deal with reference counting unless it is explicitly given a pointer to the count itself (via set() or construction). So be sure to manage the memory properly if this cannot be done.