FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RefCount Class Reference

#include <fbxalloc.h>

Class Description

FbxSharedPtr class describes an object that stores a pointer to a single allocated object of type Type* that ensures that the object to which it points gets destroyed automatically when the control leaves a scope and the reference count is 0.

Definition at line 280 of file fbxalloc.h.

Public Member Functions

 RefCount ()
 
 ~RefCount ()
 
void Init ()
 
void IncRef ()
 
int DecRef ()
 

Constructor & Destructor Documentation

◆ RefCount()

RefCount ( )
inline

Definition at line 283 of file fbxalloc.h.

283 { Init(); };
void Init()
Definition: fbxalloc.h:286

◆ ~RefCount()

~RefCount ( )
inline

Definition at line 284 of file fbxalloc.h.

284 { Init(); };
void Init()
Definition: fbxalloc.h:286

Member Function Documentation

◆ Init()

void Init ( )
inline

Definition at line 286 of file fbxalloc.h.

286 { count = 0; }

◆ IncRef()

void IncRef ( )
inline

Definition at line 287 of file fbxalloc.h.

287 { count++; }

◆ DecRef()

int DecRef ( )
inline

Definition at line 288 of file fbxalloc.h.

288 { count--; if (count < 0) count = 0; return count; }

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