[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How to do casting lua ?
- From: Supratik Champati <champati@...>
- Date: Sun, 14 Feb 1999 12:52:28 -0500
How do I achieve the equivalent of the infamous casting pointers ?
suppose I have
class A
{
A();
virtual ~A();
};
class B : public A
{
B();
void only_defined_in_B();
};
static A* seed() { return new B; }
If I do the following in lua
lseed = seed()
lseed:only_defined_in_B() -- causes error
Now I know that lseed is a class B object - but I cannot
access only_defined_in_B() routines of object lseed.
Is there a way by which I can acomplish the above even if that
involves violating every coding ethic.
Any help would be greatly appreciated.
Thanx.
--Supratik