|      Beam-lib     2.15.1         |   
BRefData Class Reference
  #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... | |
Private Attributes | |
| BAtomicCount | orefCount | 
| The reference count, how many users.  More... | |
| int | olen | 
| The actual length of data in oData.  More... | |
| void * | odata | 
| Pointer to the data.  More... | |
Detailed Description
Referenced data storage. 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
◆ addRef()
| BRefData * BRefData::addRef | ( | ) | 
Increment the reference counter.
◆ copy()
| BRefData * BRefData::copy | ( | ) | 
Create a copy of this reference for writing, if necessary.
◆ data()
       
  |    inline | 
Return the raw data pointer.
◆ deleteRef()
| int BRefData::deleteRef | ( | ) | 
Decrement the reference counter.
◆ 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.
Member Data Documentation
◆ odata
       
  |    private | 
Pointer to the data.
◆ olen
       
  |    private | 
The actual length of data in oData.
◆ orefCount
       
  |    private | 
The reference count, how many users.
The documentation for this class was generated from the following files:
Generated by
  1.8.14  
