agerlach
28th June 2010, 21:52
I have the following class:
class siStore
{
public:
siStore();
~siStore();
QVector<float> *si;
float siSum;
float si2Sum;
int length;
int siWidth;
}
(http://doc.trolltech.com/latest/class%20sistore%3Cbr%20/%3E%0A%7B%3Cbr%20/%3E%0Apublic:%3Cbr%20/%3E%0A%20%20%20sistore%28%29;%3Cbr%20/%3E%0A%20%20%20%7Esistore%28%29;%3Cbr%20/%3E%0A%3Cbr%20/%3E%0A%20%20%20qvector%3Cfloat?%20*si;%3Cbr%20/%3E%0A%20%20%20float%20sisum;%3Cbr%20/%3E%0A%20%20%20float%20si2sum;%3Cbr%20/%3E%0A%20%20%20int%20length;%3Cbr%20/%3E%0A%20%20%20int%20siwidth;%3Cbr%20/%3E%0A%7D%3Cbr%20/%3E.html)
In my program I then create a QList<siStore*> called siStack.
In practice, the application generates a "training set" called siStack based on a few training parameters and an input 3D surface mesh. Each surface mesh may require multiple "training sets" using differing parameters.
I envision my database to look like this: Table1 =name[ modelID modelName], Table 2 = parameters[ paramID modelID Param1 Param2 ...], Table 3 = trainingSet[ paramID siStack].
Is this possible, or even make sense? From what I read I need to use a BLOB type, but how do I convert my object to a BLOB and how to I later read the BLOB and convert it to a QList<siStore*>?
Thanks
class siStore
{
public:
siStore();
~siStore();
QVector<float> *si;
float siSum;
float si2Sum;
int length;
int siWidth;
}
(http://doc.trolltech.com/latest/class%20sistore%3Cbr%20/%3E%0A%7B%3Cbr%20/%3E%0Apublic:%3Cbr%20/%3E%0A%20%20%20sistore%28%29;%3Cbr%20/%3E%0A%20%20%20%7Esistore%28%29;%3Cbr%20/%3E%0A%3Cbr%20/%3E%0A%20%20%20qvector%3Cfloat?%20*si;%3Cbr%20/%3E%0A%20%20%20float%20sisum;%3Cbr%20/%3E%0A%20%20%20float%20si2sum;%3Cbr%20/%3E%0A%20%20%20int%20length;%3Cbr%20/%3E%0A%20%20%20int%20siwidth;%3Cbr%20/%3E%0A%7D%3Cbr%20/%3E.html)
In my program I then create a QList<siStore*> called siStack.
In practice, the application generates a "training set" called siStack based on a few training parameters and an input 3D surface mesh. Each surface mesh may require multiple "training sets" using differing parameters.
I envision my database to look like this: Table1 =name[ modelID modelName], Table 2 = parameters[ paramID modelID Param1 Param2 ...], Table 3 = trainingSet[ paramID siStack].
Is this possible, or even make sense? From what I read I need to use a BLOB type, but how do I convert my object to a BLOB and how to I later read the BLOB and convert it to a QList<siStore*>?
Thanks