#include <GU_DetailHandle.h>
Public Member Functions | |
| GU_DetailHandle () | |
| GU_DetailHandle (const GU_DetailHandle &handle) | |
| ~GU_DetailHandle () | |
| void | clear () |
| const GU_DetailHandle & | operator= (const GU_DetailHandle &handle) |
| bool | operator== (const GU_DetailHandle &handle) const |
| bool | operator!= (const GU_DetailHandle &handle) const |
| const GU_Detail * | peekDetail () const |
| const GU_Detail * | readLock () |
| GU_Detail * | writeLock () |
| void | unlock (const GU_Detail *gdp) |
| GU_Detail * | setGdp (GU_Detail *gdp) |
| void | allocateAndSet (GU_Detail *gdp, bool own=true) |
| bool | deleteGdp () |
| bool | hasActiveLock () const |
| Determines if anyone has a lock on this handle. | |
| bool | isNull () const |
| int | getRefCount () const |
| Returns the number of references made to the base handle. | |
| void | addPreserveRequest () |
| void | removePreserveRequest () |
| int | getPreserveRequest () const |
field3d/ROP_Field3D.C, SIM/SIM_ForceOrbit.C, SIM/SIM_ForceOrbit.h, SIM/SIM_SolverHair.C, SIM/SNOW_Solver.C, and SIM/SNOW_Solver.h.
Definition at line 39 of file GU_DetailHandle.h.
| GU_DetailHandle::GU_DetailHandle | ( | ) |
| GU_DetailHandle::GU_DetailHandle | ( | const GU_DetailHandle & | handle | ) |
| GU_DetailHandle::~GU_DetailHandle | ( | ) |
| void GU_DetailHandle::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.
| void GU_DetailHandle::allocateAndSet | ( | GU_Detail * | gdp, | |
| bool | own = true | |||
| ) |
Create a new underlying reference & set it to point to the given gdp. The own flag determines if the GU_Detail will be deleted by the handle system when the underlying reference is deleted.
| void GU_DetailHandle::clear | ( | ) |
| bool GU_DetailHandle::deleteGdp | ( | ) |
Deletes the underlying gdp and sets the gdp pointer to be null. It returns true if the gdp was successfully deleted, false if not. Failure likely results from a lock being present.
| int GU_DetailHandle::getPreserveRequest | ( | ) | const |
| int GU_DetailHandle::getRefCount | ( | ) | const |
Returns the number of references made to the base handle.
| bool GU_DetailHandle::hasActiveLock | ( | ) | const |
Determines if anyone has a lock on this handle.
| bool GU_DetailHandle::isNull | ( | ) | const |
Determine if this is a null handle. This means it points to a null handle, or the handle's gdp is null.
| bool GU_DetailHandle::operator!= | ( | const GU_DetailHandle & | handle | ) | const |
| const GU_DetailHandle& GU_DetailHandle::operator= | ( | const GU_DetailHandle & | handle | ) |
| bool GU_DetailHandle::operator== | ( | const GU_DetailHandle & | handle | ) | const |
| const GU_Detail* GU_DetailHandle::peekDetail | ( | ) | const |
peekDetail does no locking. Thus, it should be avoided unless the goal is just to test if the GU_Detail is present. This is largely provided for supporting old code in hackish situations.
| const GU_Detail* GU_DetailHandle::readLock | ( | ) |
| void GU_DetailHandle::removePreserveRequest | ( | ) |
This changes the underlying gdp of the handle. The old gdp is returned. It is asserted that no locks are active. If there is an active lock, the passed in gdp is returned.
| void GU_DetailHandle::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.
| GU_Detail* GU_DetailHandle::writeLock | ( | ) |
This will acquire a write lock on the GU_Detail. The result is 0 if no lock can be acquired, or no underlying detail is present. The returned detail should be passed to unlock() when finished. There can only be one active write lock at a time. Do not destroy or modify the pointer itself and expect the unlock to update the GU_Detail *. Instead, use one of the delete or change functions. No readlocks or write locks can be active for this to work.
1.5.9