GemaLuaCoreLib
The GeMA Lua Core library
gmLuaCellBoundary.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
24 #ifndef _GEMALUA_CELL_BOUNDARY_H_
25 #define _GEMALUA_CELL_BOUNDARY_H_
26 
27 #include "gmLuaObject.h"
28 
29 class GmCellBoundary;
30 
32 class GML_API_EXPORT GmLuaCellBoundary: public GmLuaObject
33 {
34 public:
35  GmLuaCellBoundary(GmCellBoundary* boundary, const GmLogCategory& logger);
36 
37  virtual ~GmLuaCellBoundary();
38 
39  // See comments on the base class
40  virtual const char* typeName() const { return "cellBoundary"; }
41 
42  virtual QString toString() const;
43 
44  virtual void fillMetatable(lua_State* L, int index);
45 
47  virtual void* getClassMetatableID() { static int classID = 0; return &classID; }
48 
50  GmCellBoundary* boundary() const { return _boundary; }
51 
52 private:
53  int id (lua_State* L);
54  int type (lua_State* L);
55  int mesh (lua_State* L);
56  int numCells (lua_State* L);
57  int cell (lua_State* L);
58  int cellBorder (lua_State* L);
59  int setBoundaryData(lua_State* L);
60 
62 };
63 
64 #endif
Declaration of the GmLuaObject class.
A proxy class to export GmCellBoundary methods to the Lua environment.
Definition: gmLuaCellBoundary.h:32
GmCellBoundary * _boundary
The cell boundary 'wrapped' by this proxy object.
Definition: gmLuaCellBoundary.h:61
virtual void * getClassMetatableID()
Returns an unique identifier to identify an user object as a GmLuaMesh object.
Definition: gmLuaCellBoundary.h:47
virtual const char * typeName() const
Returns the object type as will be stored in the object metatable.
Definition: gmLuaCellBoundary.h:40
GmCellBoundary * boundary() const
Returns the wrapped cell boundary object.
Definition: gmLuaCellBoundary.h:50
virtual void fillMetatable(lua_State *L, int index)=0
Function called by populateMetatable() to fill the metatable with exported methods by derived classes...
virtual QString toString() const
Default method used by the __tostring metamethod to capture the result of tostring() over an object.
Definition: gmLuaObject.h:55
A proxy class to export object methods to the Lua environment.
Definition: gmLuaObject.h:35