OK, before we reinvent the wheel here, I'm asking:
How many c++ "variant" classes are out there? Has anyone used them? (They MUST NOT use templates)
This is a basic draft of what I came up with:
union cbtypes_t {
char c;
int i;
bool b;
float f;
} cbtypes;
class cbVariant
{
public:
bool is_undefined() { return m_type=='u'; }
char QueryType();
operator==(int intval);
operator==(bool bool);
...
operator_the_last_operator_used(last_type_used blah);
private:
char m_type;
cbtypes m_v;
wxString m_s;
};
Is there anything like this on the net?