GemaLuaCoreLib
The GeMA Lua Core library
gmLuaNodeSet.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_NODE_SET_H_
25 #define _GEMALUA_NODE_SET_H_
26 
27 #include "gmLuaObject.h"
28 
29 class GmNodeSet;
30 
32 class GML_API_EXPORT GmLuaNodeSet : public GmLuaObject
33 {
34 public:
35  GmLuaNodeSet(GmNodeSet* nodeSet, const GmLogCategory& logger);
36 
37  virtual ~GmLuaNodeSet();
38 
39  // See comments on the base class
40  virtual const char* typeName() const { return "nodeSet"; }
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  GmNodeSet* nodeSet() const { return _nodeSet; }
51 
52 private:
53  int id (lua_State* L);
54  int mesh (lua_State* L);
55  int numNodes (lua_State* L);
56  int node (lua_State* L);
57  int setNodeData(lua_State* L);
58 
60 };
61 
62 #endif
virtual const char * typeName() const
Returns the object type as will be stored in the object metatable.
Definition: gmLuaNodeSet.h:40
Declaration of the GmLuaObject class.
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
GmNodeSet * nodeSet() const
Returns the wrapped cell boundary object.
Definition: gmLuaNodeSet.h:50
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: gmLuaNodeSet.h:47
GmNodeSet * _nodeSet
The node set 'wrapped' by this proxy object.
Definition: gmLuaNodeSet.h:59
A proxy class to export GmNodeSet methods to the Lua environment.
Definition: gmLuaNodeSet.h:32