Free Electron
Public Member Functions | Private Attributes | Related Functions | List of all members
fe::Instance Class Reference

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, int *pRefCnt)
 
 Instance (const Instance &other)
 
Instanceoperator= (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< BaseTypetype (void) const
 
void * data (void) const
 
void set (void *instance, const sp< BaseType > &rspBT, 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< BaseTypem_spType
 
void * m_pData
 
int * m_pRefCnt
 

Related Functions

(Note that these are not member functions.)

String print (const Instance &a_instance)
 Instance print. More...
 

Detailed Description

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.

Friends And Related Function Documentation

◆ print()

String print ( const Instance a_instance)
related

Instance print.


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