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

#include <GU_DetailHandle.h>

Public Member Functions

 GU_ConstDetailHandle ()
 GU_ConstDetailHandle (const GU_DetailHandle &handle)
const GU_ConstDetailHandleoperator= (const GU_DetailHandle &handle)
bool operator== (const GU_ConstDetailHandle &handle) const
bool operator!= (const GU_ConstDetailHandle &handle) const
uint hash () const
void clear ()
GU_DetailHandle castAwayConst () const
GU_DetailHandle getWriteableCopy () const
 Create a writeable copy of the detail. More...
const GU_Detailgdp () const
 Unlocked readable pointers. More...
const GU_DetailreadLock ()
void unlock (const GU_Detail *gdp)
bool isNull () const
bool isValid () const
 Check if this is a valid handle. More...
SYS_SAFE_BOOL operator bool () const
 Safe-bool operator to return whether the handle is valid. More...
int getRefCount () const
 Returns the number of references made to the base handle. More...
int getLockCount () const
 Returns the number of locks made to the base handle for debugging. More...
void addPreserveRequest ()
void removePreserveRequest ()
int getPreserveRequest () const
int64 getMemoryUsage (bool inclusive) const

Detailed Description

A GU_ConstDetailHandle uses a GU_DetailHandle to provide const-only access to a GU_Detail. It uses a GU_DetailHandle member variable to do all the actual work, and simply hides any functionality that is unsafe or inappropriate for a const GU_Detail.

packedsphere/GU_PackedSphere.C, packedsphere/GU_PackedSphere.h, SIM/SNOW_Solver.C, SIM/SNOW_Solver.h, and tetprim/GT_PrimTetra.C.

Definition at line 164 of file GU_DetailHandle.h.

Constructor & Destructor Documentation

GU_ConstDetailHandle::GU_ConstDetailHandle ( )

Definition at line 167 of file GU_DetailHandle.h.

GU_ConstDetailHandle::GU_ConstDetailHandle ( const GU_DetailHandle handle)

Definition at line 169 of file GU_DetailHandle.h.

Member Function Documentation

void GU_ConstDetailHandle::addPreserveRequest ( )

Preserve Requests: A preserve request is a request that people create a new GU_DetailHandle rather than editting the current one. It is used by SOPs to determine if it is safe to do an in place cook.

Definition at line 238 of file GU_DetailHandle.h.

GU_DetailHandle GU_ConstDetailHandle::castAwayConst ( ) const

This method casts from a GU_ConstDetailHandle to a GU_DetailHandle. Use it carefully. Calling getWriteableCopy() is preferred.

Definition at line 190 of file GU_DetailHandle.h.

void GU_ConstDetailHandle::clear ( void  )

Definition at line 185 of file GU_DetailHandle.h.

const GU_Detail* GU_ConstDetailHandle::gdp ( ) const

Unlocked readable pointers.

Definition at line 198 of file GU_DetailHandle.h.

int GU_ConstDetailHandle::getLockCount ( ) const

Returns the number of locks made to the base handle for debugging.

Definition at line 230 of file GU_DetailHandle.h.

int64 GU_ConstDetailHandle::getMemoryUsage ( bool  inclusive) const

Return the amount of memory owned by the GU_DetailHandle itself, NOT the detail. This will count the memory of the GU_DetailHandleRef, which could be shared, so only the definitive "original" handle should be counted, e.g. the one on SOP_Node.

Definition at line 249 of file GU_DetailHandle.h.

int GU_ConstDetailHandle::getPreserveRequest ( ) const

Definition at line 242 of file GU_DetailHandle.h.

int GU_ConstDetailHandle::getRefCount ( ) const

Returns the number of references made to the base handle.

Definition at line 226 of file GU_DetailHandle.h.

GU_DetailHandle GU_ConstDetailHandle::getWriteableCopy ( ) const

Create a writeable copy of the detail.

Definition at line 194 of file GU_DetailHandle.h.

uint GU_ConstDetailHandle::hash ( ) const

Definition at line 183 of file GU_DetailHandle.h.

bool GU_ConstDetailHandle::isNull ( ) const

Determine if this is a null handle. This means it points to a null handle, or the handle's gdp is null.

SIM/SIM_SolverHair.C, and SIM/SNOW_Solver.C.

Definition at line 216 of file GU_DetailHandle.h.

bool GU_ConstDetailHandle::isValid ( void  ) const

Check if this is a valid handle.

Definition at line 219 of file GU_DetailHandle.h.

SYS_SAFE_BOOL GU_ConstDetailHandle::operator bool ( ) const

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

Definition at line 223 of file GU_DetailHandle.h.

Definition at line 180 of file GU_DetailHandle.h.

const GU_ConstDetailHandle& GU_ConstDetailHandle::operator= ( const GU_DetailHandle handle)

Definition at line 172 of file GU_DetailHandle.h.

bool GU_ConstDetailHandle::operator== ( const GU_ConstDetailHandle handle) const

Definition at line 178 of file GU_DetailHandle.h.

const GU_Detail* GU_ConstDetailHandle::readLock ( )

This will acquire a read lock on the GU_Detail. The result is 0 if no lock can be acquired, or no underlying detail exists. The returned detail should be passed to unlock(). (Technically, no locking occurs on error, but unlock is a no-op with a 0 gdp)

Definition at line 204 of file GU_DetailHandle.h.

void GU_ConstDetailHandle::removePreserveRequest ( )

Definition at line 240 of file GU_DetailHandle.h.

void GU_ConstDetailHandle::unlock ( const GU_Detail gdp)

This will unlock one layer of locking. If the passed in gdp is null, no unlocking occurs. Otherwise, the passed in gdp is asserted to match the one which myHandle points to.

Definition at line 211 of file GU_DetailHandle.h.

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