HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_WorkBuffer::AutoLock Class Reference

#include <UT_WorkBuffer.h>

Public Member Functions

 AutoLock (UT_WorkBuffer &buf)
 
 ~AutoLock ()
 
void release (bool recompute_length=false)
 You can manually release the buffer. More...
 
void relock ()
 If you've manually released the lock, you can relock the buffer. More...
 
char * operator* () const
 
char * string () const
 

Detailed Description

Class to handle auto-locking of the UT_WorkBuffer. This is not related to multi-threading, but to the lock/release methods above.

You should never append data to a locked buffer.

Definition at line 162 of file UT_WorkBuffer.h.

Constructor & Destructor Documentation

UT_WorkBuffer::AutoLock::AutoLock ( UT_WorkBuffer buf)
inline

Definition at line 165 of file UT_WorkBuffer.h.

UT_WorkBuffer::AutoLock::~AutoLock ( )
inline

Definition at line 170 of file UT_WorkBuffer.h.

Member Function Documentation

char* UT_WorkBuffer::AutoLock::operator* ( void  ) const
inline

Get access to the non-const buffer. This may return nullptr if the lock has been released.

Definition at line 177 of file UT_WorkBuffer.h.

void UT_WorkBuffer::AutoLock::release ( bool  recompute_length = false)
inline

You can manually release the buffer.

Definition at line 182 of file UT_WorkBuffer.h.

void UT_WorkBuffer::AutoLock::relock ( )
inline

If you've manually released the lock, you can relock the buffer.

Definition at line 191 of file UT_WorkBuffer.h.

char* UT_WorkBuffer::AutoLock::string ( ) const
inline

Get access to the non-const buffer. This may return nullptr if the lock has been released.

Definition at line 178 of file UT_WorkBuffer.h.


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