GemaLuaCoreLib
The GeMA Lua Core library
gmLuaPropertySet.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_PROPERTYSET_H_
25 #define _GEMALUA_PROPERTYSET_H_
26 
27 #include "gmLuaObject.h"
28 
29 #include <gmPropertySet.h>
30 
31 class GmPropertySet;
32 
34 class GML_API_EXPORT GmLuaPropertySet: public GmLuaObject
35 {
36 public:
37  GmLuaPropertySet(GmPropertySet* ps, const GmLogCategory& logger);
38 
39  virtual ~GmLuaPropertySet();
40 
41  // See comments on the base class
42  virtual const char* typeName() const { return "propertySet"; }
43 
44  virtual void fillMetatable(lua_State* L, int index);
45 
47  virtual void* getClassMetatableID() { static int classID = 0; return &classID; }
48 
49 private:
50  int id (lua_State* L);
51  int numProperties (lua_State* L);
52  int numValues (lua_State* L);
53  int propertyIds (lua_State* L);
54  int valueIds (lua_State* L);
55  int propertyInfo (lua_State* L);
56  int propertyAccessor(lua_State* L);
57  int valueIndex (lua_State* L);
58  int addValues (lua_State* L);
59 
60 protected:
62 };
63 
64 
65 #endif
Declaration of the GmLuaObject class.
virtual void * getClassMetatableID()
Returns an unique identifier to identify an user object as a GmLuaPropertySet object.
Definition: gmLuaPropertySet.h:47
GmPropertySet * _ps
The property set 'wrapped' by this proxy object.
Definition: gmLuaPropertySet.h:61
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 GmPropertySet methods to the Lua environment.
Definition: gmLuaPropertySet.h:34
A proxy class to export object methods to the Lua environment.
Definition: gmLuaObject.h:35
virtual const char * typeName() const
Returns the object type as will be stored in the object metatable.
Definition: gmLuaPropertySet.h:42