Its a good idea but changing it to enums will affect lots of project (firmwares) that are not Qt some are C codes....
The thing that i can think of is building a parser that outputs some .cpp file , in this file would be an initialized an
map <int /*errorCode*/,string/*description*/> errorMap;
map <int /*errorCode*/,string/*description*/> possibleCauseMap;
//since i have so many devices that has its own error code then this means another map
// say....
map <int /*deviceId*/,map <int /*errorCode*/,string/*description*/> > deviceMapError;
map <int /*deviceId*/,map <int /*errorCode*/,string/*description*/> > deviceMapPossibleCause;
map <int /*errorCode*/,string/*description*/> errorMap;
map <int /*errorCode*/,string/*description*/> possibleCauseMap;
//since i have so many devices that has its own error code then this means another map
// say....
map <int /*deviceId*/,map <int /*errorCode*/,string/*description*/> > deviceMapError;
map <int /*deviceId*/,map <int /*errorCode*/,string/*description*/> > deviceMapPossibleCause;
To copy to clipboard, switch view to plain text mode
parser is the only way i can think of .. but its a lot of work
what do you think?
baray98
Bookmarks