Is it possible with angelcode script to create a class that can be implicitly cast to another class?
Here is an example of usage (not written in Angelcode but you should get the idea)
class node
{
};
class anotherNode
{
public:
operator node () { return m_node; }
protected:
node m_node;
};
void needsNode ( node item ) {}
anotherNode someItem;
needsNode ( someItem ); //Here we call a function that needs a node class so someItem is implicity cast
I should also note that I am wanting to do this with references/handles not concrete objects.
Hopefully you can see what I am trying to achieve
Regards,
James Mintram