lundi 8 août 2016

Create a dynamic datastructure from mysql in qt C++

My aim of the project is to display and perform some computations like comparing on the data from mysql database. The mysql database contains many tables and the first row in each table contains the names of the field such as id, name, PositionX, PositionY, BackgroundColor and their values in the lower row.

What I need is to create a dynamic datastructure in C++/ Qt with the name of the variables same as the name of the field. So that I can store the values based on the chosen table

So when I divide my problem into smaller steps 1. to identify the datatype based on the values. 2. to generate name of the variables same as the names in the row of the mysql table. 3. to create a dynamic struct

PS:- (I have searched some terms called reflection but could not understand as I have moved to computer science recently (2 years), I do not know if I am in the right path). Some Sample code should help me better rather than theories.





Aucun commentaire:

Enregistrer un commentaire