![]() |
GemaLuaCoreLib
The GeMA Lua Core library
|
A proxy class to export GmSpatialIndex methods to the Lua environment. More...
#include <gmLuaSpatialIndex.h>
Public Member Functions | |
GmLuaSpatialIndex (GmSpatialIndex *si, bool newIndex, const GmLogCategory &logger) | |
Constructor. Receives the spatial index to be wrapped. If newIndex is true, the proxy takes ownership of the supplied index. | |
virtual | ~GmLuaSpatialIndex () |
Destructor. | |
virtual const char * | typeName () const |
Returns the object type as will be stored in the object metatable. | |
virtual void | fillMetatable (lua_State *L, int index) |
Prepares the object metatable for calling methods. | |
virtual void * | getClassMetatableID () |
Returns an unique identifier to identify an user object as a GmLuaSpatialIndex object. | |
GmSpatialIndex * | index () const |
Returns the wrapped spatial index. | |
![]() | |
virtual | ~GmLuaObject () |
Destrutor. | |
virtual void | populateMetatable (lua_State *L, int index) |
Fills the object metatable to allow for the proxy to export its methods. | |
QVariant | ptrToVariant () |
Constructs a QVariant storing a POINTER to the current object. | |
void | ref () |
Increments the object reference count. Use with care. | |
Protected Attributes | |
GmSpatialIndex * | _si |
The spatial index 'wrapped' by this proxy object. | |
bool | _newIndex |
Is thos a new spatial index whose ownership belongs to the proxy? | |
![]() | |
const GmLogCategory & | _logger |
A logger used by the proxy when needed. | |
QAtomicInteger< int > | _refCount |
Lua objects are reference counted to enable sharing them among different states. This is needed to allow for passing objects as parameters in a parallel call. The garbage collection method releases memory only for the last reference. | |
Private Member Functions | |
int | id (lua_State *L) |
Returns the property set id. | |
int | hasCapability (lua_State *L) |
Returns true or false indicating whether the index supports the requested capability (a string) or not. | |
int | closestNode (lua_State *L) |
The closestNode (old mm.getClosestNode() process) implementation. | |
int | closestNodes (lua_State *L) |
The closestNodes (old mm.getClosestNodes() process) implementation. | |
int | closestNodesInRadius (lua_State *L) |
The closestNodesInRadius (old mm.getClosestNodes() process) implementation. | |
int | containingCell (lua_State *L) |
The containingCell (old mm.getContainingCell() process) implementation. | |
int | closestGaussPoint (lua_State *L) |
The closestGaussPoint (old mm.getClosestGaussPoint() process) implementation. | |
int | closestGaussPoints (lua_State *L) |
The closestGaussPoints (old mm.getClosestGaussPoints() process) implementation. | |
int | closestGaussPointsInRadius (lua_State *L) |
The closestGaussPointsInRadius (old mm.getClosestGaussPoints() process) implementation. | |
Additional Inherited Members | |
![]() | |
GmLuaObject (const GmLogCategory &logger) | |
Construtor protegido. Somente classes derivadas devem ser instanciadas. | |
virtual QString | toString () const |
Default method used by the __tostring metamethod to capture the result of tostring() over an object. | |
A proxy class to export GmSpatialIndex methods to the Lua environment.