[vtkusers] Cross Delegation with vtkSQLDatabase
Matthew Green
babygguy at gmail.com
Mon Nov 15 10:27:55 EST 2010
Hi guys,
I'm wanting to do something similar to this. I'm guessing part of the
reason why I can't is because vtkSQLiteDatabase, vtkMySQLDatabase etc
etc don't virtually inherit vtkSQLDatabase?
----------
#include "vtkSQLDatabase.h"
#include "vtkSQLiteDatabase.h"
#include "vtkMySQLDatabase.h"
class mySQLDatabase : public virtual vtkSQLDatabase
{
bool foo()
{
//do foo
return true;
}
};
class mySQLiteDatabase : public vtkSQLiteDatabase, public mySQLDatabase
{
};
class myMySQLDatabase : public vtkMySQLDatabase, public mySQLDatabase
{
};
int main()
{
mySQLiteDatabase database();
database.foo();
}
----------
Is this something VTK should try to accommodate? Or is there already a
way of doing this?
More information about the vtkusers
mailing list