Store snapping status into memory.
More...
#include <tmsnappingmemory.h>
|
int | FindSnappingItem (const long &lid) |
| Search for specified layer ID in memory array.
|
|
Store snapping status into memory.
Snapping is stored in
- The database
- The memory. Snapping is also stored in memory for faster direct access to them during editing. When layers are added or removed, they are stored directly into the database but the snapping status is only stored when project is closed.
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 21 January 2009
◆ tmSnappingMemory()
tmSnappingMemory::tmSnappingMemory |
( |
| ) |
|
Constructor.
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 21 January 2009
◆ ~tmSnappingMemory()
tmSnappingMemory::~tmSnappingMemory |
( |
| ) |
|
Destructor.
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 21 January 2009
◆ AddSnappingMemory()
void tmSnappingMemory::AddSnappingMemory |
( |
long |
lid, |
|
|
int |
snapstatus |
|
) |
| |
Add snapping to memory.
Store in an array the passed values
- Parameters
-
lid | ID value of the layer (see TOC_ID in the prj_snapping table) |
snapstatus | snap status : one of the following :
- 0 : No snapping
- 1: Snapping vertex
- 2: Snapping BeginEnd
- 3: Snapping both = snapping vertex
|
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 21 January 2009
◆ ClearSnappingStatus()
void tmSnappingMemory::ClearSnappingStatus |
( |
| ) |
|
Set all snapping status to tmSNAPPING_OFF.
This function doesn't remove layers from the memory
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 22 January 2009
◆ DeleteSnappingMemory()
bool tmSnappingMemory::DeleteSnappingMemory |
( |
const long & |
lid | ) |
|
Delete a layer from the memory array.
- Parameters
-
- Returns
- true if the item was deleted from memory (if the item was found in memory). False otherwise
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 21 January 2009
◆ FindSnappingItem()
int tmSnappingMemory::FindSnappingItem |
( |
const long & |
lid | ) |
|
|
protected |
Search for specified layer ID in memory array.
- Parameters
-
lid | layer ID (see TOC_ID in prj_snapping table) |
- Returns
- the zero based index of the found item or wxNOT_FOUND otherwise
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 21 January 2009
◆ GetSnappingInfo()
bool tmSnappingMemory::GetSnappingInfo |
( |
unsigned int |
iIndex, |
|
|
long & |
lid, |
|
|
int & |
snapstatus |
|
) |
| |
Get snapping info by index.
- Parameters
-
iIndex | the zero based index of the snapping info we want back |
lid | the layer id |
snapstatus | the snapping status |
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 21 January 2009
◆ GetSnappingMemoryStatus()
int tmSnappingMemory::GetSnappingMemoryStatus |
( |
const long & |
lid | ) |
|
Get the snapping status for specified layer.
- Parameters
-
lid | the layer id (as stored into database) |
- Returns
- one of the snapping status. If the layer dosen't exist into the snapping array stored in memory, it will return 0
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 21 January 2009
◆ IsSnappingEnabled()
bool tmSnappingMemory::IsSnappingEnabled |
( |
| ) |
|
Checks if snapping is enabled.
This function checks if at least one layer contain a defined snapping and if the space key isn't pressed. If space key is pressed, snapping is totally disabled
- Returns
- true if at least one layer has snapping enabled
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 26 January 2009
◆ SetSnappingMemoryStatus()
bool tmSnappingMemory::SetSnappingMemoryStatus |
( |
const long & |
lid, |
|
|
int |
snapstatus |
|
) |
| |
Change, or set snapping to existing layer.
- Parameters
-
lid | layer ID to modify |
snapstatus | the new snapping status |
- Returns
- true if the layer ID exists, false otherwise
- Author
- Lucien Schreiber (c) CREALP 2009
- Date
- 21 January 2009
The documentation for this class was generated from the following files:
- /github/workspace/src/core/tmsnappingmemory.h
- /github/workspace/src/core/tmsnappingmemory.cpp