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

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

#include <gmLuaModelData.h>

Inheritance diagram for GmLuaModelData:
Collaboration diagram for GmLuaModelData:

Public Member Functions

 GmLuaModelData (GmSimulationData *simData, const GmLogCategory &logger)
 Constructor. Receives the ModelData to be wrapped.
 
virtual ~GmLuaModelData ()
 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 GmLuaModelData object.
 
- 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 mesh (lua_State *L)
 Returns a mesh identified by its id given in the Lua Stack. Returns the mesh object or nil.
 
int boundaryCondition (lua_State *L)
 Returns a b.c. identified by its id given in the Lua Stack. Returns the bc object or nil.
 
int contactBoundaryCondition (lua_State *L)
 Returns a contact b.c. identified by its id given in the Lua Stack. Returns the contact bc object or nil.
 
int propertySet (lua_State *L)
 Returns a property set identified by its id given in the Lua Stack. Returns the prop set object or nil.
 
int spatialIndex (lua_State *L)
 Returns the spatial index identified by its id given in the Lua Stack. Returns the index object or nil.
 
int discontinuitySet (lua_State *L)
 Returns the discontinuity set identified by its id given in the Lua Stack. Returns the index object or nil.
 
int addNewEmptyMesh (lua_State *L)
 Adds a new, empty mesh to the model. Nodes and cells should be added later by calls to the appropriate node and cell adding functions. Gets as parameters the new mesh name (must be unique), the coordinate dimension and unit. A table with additional attributes to the mesh is optional. The plugin type is also optional. If not given, a standard GeMA element mesh will be used. Returns the added mesh object or nil on errors.
 
int addNewEmptyDiscSet (lua_State *L)
 Adds a new, empty discontinuitySet to the model. Properties/Attributes and Geometry should be set later on by calling 'GmLuaDiscontinuitySet::setDiscontinuityData'.
 

Private Attributes

GmSimulationData_simData
 The simulation data object that owns the model data.
 
GmModelData_data
 The ModelData 'wrapped' by this proxy object.
 

Additional Inherited Members

- Protected Member Functions inherited from GmLuaObject
 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.
 
- 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 GmModelData methods to the Lua environment.

Member Function Documentation

◆ fillMetatable()

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

Prepares the object metatable for calling methods.

Implements GmLuaObject.

◆ getClassMetatableID()

virtual void * GmLuaModelData::getClassMetatableID ( )
inlinevirtual

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

Implements LuaProxy::Base.

◆ typeName()

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

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

Implements GmLuaObject.


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