GemaLuaCoreLib
The GeMA Lua Core library
Loading...
Searching...
No Matches
GmLuaElement Class Reference

A proxy class to export GmElement methods to the Lua environment. More...

#include <gmLuaCell.h>

Inheritance diagram for GmLuaElement:
Collaboration diagram for GmLuaElement:

Public Member Functions

 GmLuaElement (GmElement *elem, const GmLogCategory &logger)
 Constructor. Receives the element to be wrapped.
 
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 GmLuaMesh object.
 
- Public Member Functions inherited from GmLuaCell
 GmLuaCell (GmCell *cell, const GmLogCategory &logger)
 Constructor. Receives the cell to be wrapped.
 
virtual ~GmLuaCell ()
 Destructor.
 
virtual QString toString () const
 Default method used by the __tostring metamethod to capture the result of tostring() over an object.
 
GmCellcell () const
 Returns the wrapped cell.
 
- Public Member Functions inherited from GmLuaObject
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.
 
- Public Member Functions inherited from LuaProxy::Base

Private Member Functions

int shape (lua_State *L)
 Returns the element shape.
 
int linearShape (lua_State *L)
 Returns the element linear shape.
 
int naturalCenter (lua_State *L)
 Returns a vector with the natural coordinates of the element's center.
 

Additional Inherited Members

- Protected Member Functions inherited from GmLuaCell
void parseFillMatrixParameters (lua_State *L, GmValueAccessor **nodeAc, GmValueAccessor **uAc, int *index, bool *transposed, GmCellFillMode *mode, const char *fname)
 Helper function to parse and validate parameters for the several fillXxxxMatrix() functions. By passing NULL to uAc and / or index, the caller controls the expected Lua stack parameters. If either uAc or index is NOT NULL, the mode can only be "nodes" or "vertices". In case of errors, this function does not return, calling luaL_error(). The index range (if index is not NULL) is NOT validated.
 
void parseSizeMethodParameters (lua_State *L, GmValueAccessor **nodeAc, GmLuaMatrix **XProxy, int *index, GmCellGeometryMode *mode, const char *fname)
 Helper function to parse and validate parameters for the length(), area(), volume() and characteristicXXX() functions. By passing NULL to index, the caller controls the expected Lua stack parameters. In case of errors, this function does not return, calling luaL_error(). The index range (if index is not NULL) is NOT validated.
 
- Protected Member Functions inherited from GmLuaObject
 GmLuaObject (const GmLogCategory &logger)
 Construtor protegido. Somente classes derivadas devem ser instanciadas.
 
- Protected Attributes inherited from GmLuaCell
int _cellId
 The id of the cell wrapped by this proxy object.
 
GmCellMesh_mesh
 The mesh to wich theis cell id belongs.
 
- Protected Attributes inherited from GmLuaObject
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.
 

Detailed Description

A proxy class to export GmElement methods to the Lua environment.

Member Function Documentation

◆ fillMetatable()

void GmLuaElement::fillMetatable ( lua_State * L,
int index )
virtual

Prepares the object metatable for calling methods.

Reimplemented from GmLuaCell.

Reimplemented in GmLuaHElement.

◆ getClassMetatableID()

virtual void * GmLuaElement::getClassMetatableID ( )
inlinevirtual

Returns an unique identifier to identify an user object as a GmLuaMesh object.

Reimplemented from GmLuaCell.

Reimplemented in GmLuaHElement.

◆ typeName()

virtual const char * GmLuaElement::typeName ( ) const
inlinevirtual

Returns the object type as will be stored in the object metatable.

Reimplemented from GmLuaCell.

Reimplemented in GmLuaHElement.


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