[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: tolua and namespaces
- From: pixellent@...
- Date: Thu, 19 Dec 2002 23:14:59 -0500
I read on the mailing list archives that I can use module to group code into C++
namespaces. A simple test seems to prove that at the very least, tolua will
create wrappers for a class in a namespace, and, with a slight modification,
compile the bindings.
However, to get it to fully work, I have to add a "using namespace" into the C++
file generated by tolua. Is this normal, or is there anyway around this? It
isn't too much of a hassle, but it's a hassle all the same. I think I assumed
that tolua would add the "using namespace" into the C++ bindings file it generated.
This is my tolua package file:
module Habitat
{
module Core
{
class hbBaseObject
{
public:
/** This is the base object constructor. */
hbBaseObject();
/** This is the base object destructor. */
virtual ~hbBaseObject();
};
}
}
I have to add:
using namespace Habitat::Core;
into the hbBaseObject_lua.cpp file that tolua generates.
Thanks
Mike