GemaLuaCoreLib
The GeMA Lua Core library
gmLuaCellGroupSet.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_GROUP_SET_H_
25 #define _GEMALUA_CELL_GROUP_SET_H_
26 
27 #include "gmLuaObject.h"
28 
29 class GmCellMesh;
30 class GmCellGroupSet;
31 
33 class GML_API_EXPORT GmLuaCellGroupSet : public GmLuaObject
34 {
35 public:
36  GmLuaCellGroupSet(GmCellMesh* mesh, const QList<int>& groupIds, bool disjoint, const GmLogCategory& logger);
37 
38  virtual ~GmLuaCellGroupSet();
39 
40  // See comments on the base class
41  virtual const char* typeName() const { return "cellGroupSet"; }
42 
43  virtual QString toString() const;
44 
45  virtual void fillMetatable(lua_State* L, int index);
46 
48  virtual void* getClassMetatableID() { static int classID = 0; return &classID; }
49 
51  GmCellGroupSet* cellGroupSet() const { return _gs; }
52 
53 private:
54  int numCells (lua_State* L);
55  int cell (lua_State* L);
56  int numNodes (lua_State* L);
57  int node (lua_State* L);
58  int cellGroups(lua_State* L);
59  int mesh (lua_State* L);
60 
61 protected:
63 };
64 
65 
66 #endif
Declaration of the GmLuaObject class.
virtual const char * typeName() const
Returns the object type as will be stored in the object metatable.
Definition: gmLuaCellGroupSet.h:41
GmCellGroupSet * cellGroupSet() const
Returns the wrapped cell.
Definition: gmLuaCellGroupSet.h:51
virtual void fillMetatable(lua_State *L, int index)=0
Function called by populateMetatable() to fill the metatable with exported methods by derived classes...
A proxy class to export GmCellGroupSet methods to the Lua environment.
Definition: gmLuaCellGroupSet.h:33
GmCellGroupSet * _gs
The cell group set 'wrapped' by this proxy object.
Definition: gmLuaCellGroupSet.h:62
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
virtual void * getClassMetatableID()
Returns an unique identifier to identify an user object as a GmLuaMesh object.
Definition: gmLuaCellGroupSet.h:48