Beamlib 3.1.2
This is the Beam C++ class library.
|
A pointer to a variable sized data area with reference counting so the data areas can be shared. More...
#include <BRefData.h>
Public Member Functions | |
BRefData () | |
BRefData (int len) | |
BRefData (const BRefData &refData) | |
~BRefData () | |
BRefData * | copy () |
Create a copy of this reference for writing, if necessary More... | |
BRefData * | addRef () |
Increment the reference counter. More... | |
int | deleteRef () |
Decrement the reference counter. More... | |
char * | data () |
Return the raw data pointer. More... | |
int | len () |
Return the length in bytes. More... | |
BRefData & | operator= (const BRefData &refData) |
void | setLen (int len) |
Set the length in bytes. Note should only be used if orefCount = 1. More... | |
A pointer to a variable sized data area with reference counting so the data areas can be shared.
This is Thread safe to a degree. The reference counting is protected. However, setLen() is not and should be protected at a higher level.
BRefData::BRefData | ( | ) |
BRefData::BRefData | ( | int | len | ) |
BRefData::BRefData | ( | const BRefData & | refData | ) |
BRefData::~BRefData | ( | ) |
BRefData * BRefData::copy | ( | ) |
Create a copy of this reference for writing, if necessary
BRefData * BRefData::addRef | ( | ) |
Increment the reference counter.
int BRefData::deleteRef | ( | ) |
Decrement the reference counter.
|
inline |
Return the raw data pointer.
|
inline |
Return the length in bytes.
void BRefData::setLen | ( | int | len | ) |
Set the length in bytes. Note should only be used if orefCount = 1.