#include <Access.h>
Collaboration diagram for Access:Public Member Functions | |
| Access (Volume *volume) | |
| ~Access () | |
| void | setPriority (int priority) |
| void | select (const vmanSelection *selection) |
| void | lock (int mode) |
| bool | tryLock (int mode) |
| void | unlock () |
| const void * | readVoxelLayer (int x, int y, int z, int layer) const |
| void * | readWriteVoxelLayer (int x, int y, int z, int layer) const |
Access objects provide r/w access to the volume.
They precache chunks as soon as a valid selection has been set.
Initially the selection will be invalid and all r/w operations will fail.
Definition at line 13 of file Access.cpp.
| ~Access | ( | ) |
Deleting a locked access object will cause an error!
Definition at line 23 of file Access.cpp.
Here is the call graph for this function:| void setPriority | ( | int | priority | ) |
Sets the priority value used for sorting io jobs, caused by this access object.
Definition at line 29 of file Access.cpp.
| void select | ( | const vmanSelection * | selection | ) |
Updates the selection.
At this point the affected chunks will be precached and preloaded. Setting the selection to NULL renders it invalid and will prevent any r/w operations.
Definition at line 34 of file Access.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void lock | ( | int | mode | ) |
Locks access to the specified selection.
May block when intersecting chunks are already locked by other access objects. May also block while affected chunks are loaded from disk. Multiple access objects may read simultaneously from the same chunk. Will generate an error if its already locked!
| mode,: | Access mode bitmask. |
Definition at line 71 of file Access.cpp.
| bool tryLock | ( | int | mode | ) |
Behaves like lock(), except that it returns false if the selection is already locked.
Returns true on success.
Definition at line 84 of file Access.cpp.
| void unlock | ( | ) |
Unlocks access.
Will generate an error if its not locked!
Definition at line 106 of file Access.cpp.
| const void * readVoxelLayer | ( | int | x, |
| int | y, | ||
| int | z, | ||
| int | layer | ||
| ) | const |
Definition at line 131 of file Access.cpp.
Here is the call graph for this function:| void * readWriteVoxelLayer | ( | int | x, |
| int | y, | ||
| int | z, | ||
| int | layer | ||
| ) | const |
Definition at line 137 of file Access.cpp.
Here is the call graph for this function: