CapsAdmin

Untitled

Jun 1st, 2011
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. //hpp
  2.  
  3. template<class T>
  4. class CEntityMetaLib
  5. {
  6.     private:
  7.         const char *name;
  8.         static int (*func)(lua_State*);
  9.         static DynArray<const char*, lua_CFunction> members;
  10.  
  11.     public:
  12.         CEntityMetaLib()
  13.         {
  14.             name = typeid(T).name();
  15.         }
  16.         /*CEntityMetaLib(const char *key, lua_CFunction int)
  17.         {
  18.             members.insert(cont char *key, func);
  19.         }*/
  20. };
  21.  
  22. #define NewMeta CEntityMetaLib
  23.  
  24. //cpp
  25.  
  26. NewMeta<IEntity> META;
  27.  
  28. META["Spawn"]()
  29. {
  30.    
  31.     return 1;
  32. }
Add Comment
Please, Sign In to add comment