Home » Developing U++ » U++ Developers corner » What about LUA plugin?
Re: What about LUA plugin? [message #5230 is a reply to message #5229] |
Mon, 11 September 2006 01:49 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
thierry wrote on Sun, 10 September 2006 19:39 | No no you have missed it
void Xmlize(XmlIO xml, C& var) {
// Did C tell you were a friend? No? Back off then !
}
Defining a function overriding the template doesn't give access to C protected/private member, so you have to modify C either to make a friend void Xmlize(XmlIO xml, C& var) or to implement it as C::Xmlize(), which I then tend to prefer.
|
A valid point. Usually, you can setup the value of instance based on its methods (think std::string), but you are right that this is not a rule. Anyway, once properties are not public, there is no other means to access them than method....
Mirek
|
|
|
|
|
Re: What about LUA plugin? [message #5247 is a reply to message #5236] |
Mon, 11 September 2006 11:38 |
qwerty
Messages: 130 Registered: May 2006
|
Experienced Member |
|
|
#include <Core/Core.h>
#include <plugin/lua/lua.hpp>
CONSOLE_APP_MAIN
{
lua_State * moon = lua_open();
luaL_openlibs(moon);
luaL_dostring(moon, "print(\"hi honey\")");
lua_close(moon);
system("pause");
}
maybee, it would need to change some lines in lua.hpp...
just add 'src/' before include file name in ""
[Updated on: Mon, 11 September 2006 11:39] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Wed May 15 04:29:33 CEST 2024
Total time taken to generate the page: 0.02337 seconds
|