Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
thierry wrote on Sun, 10 September 2006 19:39

No no you have missed it Wink

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 #5231 is a reply to message #5227] Mon, 11 September 2006 01:51 Go to previous messageGo to next message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
don't want to interfere, just plugin here...

- add package to project
- include <...lua/lua.hpp>

please, our guru, review it, if its ok. it works in my appz both in win, lin Smile

PS: I will do something with c++ port to include it in; gimme some time. Diluculum needs boost library, so I'll choose something else...
  • Attachment: lua.zip
    (Size: 133.60KB, Downloaded 1837 times)

[Updated on: Mon, 11 September 2006 01:55]

Report message to a moderator

Re: What about LUA plugin? [message #5236 is a reply to message #5231] Mon, 11 September 2006 08:59 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Some simple example to test with?

Mirek
Re: What about LUA plugin? [message #5247 is a reply to message #5236] Mon, 11 September 2006 11:38 Go to previous messageGo to next message
qwerty is currently offline  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

Re: What about LUA plugin? [message #5381 is a reply to message #4805] Sun, 17 September 2006 17:46 Go to previous messageGo to next message
lindquist is currently offline  lindquist
Messages: 33
Registered: March 2006
Location: Denmark
Member
Glad to see this here. I am going to use Lua as scripting language in my app, so this will save me a little time.

Thanx
Re: What about LUA plugin? [message #5772 is a reply to message #5381] Sun, 15 October 2006 09:48 Go to previous message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
if u will be in need of help there, feel free to ask Wink
Previous Topic: C strings
Next Topic: A new way how to create "plugin"
Goto Forum:
  


Current Time: Sat Apr 27 22:42:43 CEST 2024

Total time taken to generate the page: 0.05591 seconds