Account
| Beamlib 3.3.4 This is the Beam C++ class library. |
Loading...
Searching...
No Matches
BRefData Class Reference
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 | |
| BRefData * | addRef () |
| Increment the reference counter. | |
| int | deleteRef () |
| Decrement the reference counter. | |
| char * | data () |
| Return the raw data pointer. | |
| int | len () |
| Return the length in bytes. | |
| BRefData & | operator= (const BRefData &refData) |
| void | setLen (int len) |
| Set the length in bytes. Note should only be used if orefCount = 1. | |
Detailed Description
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.
Constructor & Destructor Documentation
◆ BRefData() [1/3]
| BRefData::BRefData | ( | ) |
◆ BRefData() [2/3]
| BRefData::BRefData | ( | int | len | ) |
◆ BRefData() [3/3]
| BRefData::BRefData | ( | const BRefData & | refData | ) |
◆ ~BRefData()
| BRefData::~BRefData | ( | ) |
Member Function Documentation
◆ copy()
| BRefData * BRefData::copy | ( | ) |
Create a copy of this reference for writing, if necessary
◆ addRef()
| BRefData * BRefData::addRef | ( | ) |
Increment the reference counter.
◆ deleteRef()
| int BRefData::deleteRef | ( | ) |
Decrement the reference counter.
◆ data()
| inline |
Return the raw data pointer.
◆ len()
| inline |
Return the length in bytes.
◆ operator=()
◆ setLen()
| void BRefData::setLen | ( | int | len | ) |
Set the length in bytes. Note should only be used if orefCount = 1.
The documentation for this class was generated from the following files:
Generated by
