All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GU_DetailHandleAutoReadLock Class Reference

#include <GU_DetailHandle.h>

+ Inheritance diagram for GU_DetailHandleAutoReadLock:

Public Member Functions

 GU_DetailHandleAutoReadLock (const GU_ConstDetailHandle &handle)
 GU_DetailHandleAutoReadLock (const GU_DetailHandle &handle)
 ~GU_DetailHandleAutoReadLock ()
bool isValid () const
const GU_DetailgetGdp () const
const GU_ConstDetailHandlehandle () const
const GU_Detailoperator-> () const
const GU_Detailoperator* () const
SYS_SAFE_BOOL operator bool () const
 Safe-bool operator to return whether the handle is valid. More...

Additional Inherited Members

- Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable
 UT_NonCopyable ()=default
 ~UT_NonCopyable ()=default
 UT_NonCopyable (const UT_NonCopyable &)=delete
UT_NonCopyableoperator= (const UT_NonCopyable &)=delete

Detailed Description

GU_DetalHandleAutoFOOLock is a utility class to allow the easy extraction of const GU_Detail * from GU_DetailHandles. It uses the C++ scoping mechanism to make the locking & unlocking transparent to the caller. One can thus do: GU_DetailHandleAutoFOOLock gdl(sop->getCookedGeo()) const GU_Detail *gdp = gdl.getGdp(); The FOO = Read returns const GU_Details and does a read lock. The FOO = Write returns non-const GU_Details and does a write lock.

field3d/ROP_Field3D.C, GUI/GUI_PrimVolumeVelField.C, packedsphere/GU_PackedSphere.C, SIM/SIM_SolverHair.C, SIM/SNOW_Solver.C, tetprim/GR_PrimTetra.C, and tetprim/GT_PrimTetra.C.

Definition at line 265 of file GU_DetailHandle.h.

Constructor & Destructor Documentation

GU_DetailHandleAutoReadLock::GU_DetailHandleAutoReadLock ( const GU_ConstDetailHandle handle)

Definition at line 269 of file GU_DetailHandle.h.

GU_DetailHandleAutoReadLock::GU_DetailHandleAutoReadLock ( const GU_DetailHandle handle)

Definition at line 274 of file GU_DetailHandle.h.

GU_DetailHandleAutoReadLock::~GU_DetailHandleAutoReadLock ( )

Definition at line 279 of file GU_DetailHandle.h.

Member Function Documentation

const GU_Detail* GU_DetailHandleAutoReadLock::getGdp ( ) const

Definition at line 285 of file GU_DetailHandle.h.

const GU_ConstDetailHandle& GU_DetailHandleAutoReadLock::handle ( ) const

Definition at line 286 of file GU_DetailHandle.h.

bool GU_DetailHandleAutoReadLock::isValid ( void  ) const

Definition at line 284 of file GU_DetailHandle.h.

SYS_SAFE_BOOL GU_DetailHandleAutoReadLock::operator bool ( ) const

Safe-bool operator to return whether the handle is valid.

Definition at line 291 of file GU_DetailHandle.h.

const GU_Detail& GU_DetailHandleAutoReadLock::operator* ( void  ) const

Definition at line 288 of file GU_DetailHandle.h.

const GU_Detail* GU_DetailHandleAutoReadLock::operator-> ( void  ) const

Definition at line 287 of file GU_DetailHandle.h.

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