James Turner wrote:

> So, I actively *want* the base class. It allows replacing various  
> 'type-testing' code with a single unified enum, which cleans up  
> various other places - right now there's code that is looking at  
> FGNavRecord's type directly (which is a integer code from Robin's DB),  
> we have a string type on airport, plus a 'fg_nav_type' on the  
> navrecords and yet another GPSWaypointType in the KLN-89b.
I don't find this use of type enums in a base class to be clean at all. I have 
nothing against having a type field in a base, but with an enum approach the 
base has to have knowledge of all the derived classes, and any time you add a 
new one the base has to be modified. I'd prefer to see here a singleton type 
object defined in each derived class that compared to in order to find the type.

Also, your search member functions don't seem to belong to "FGPositioned," but 
to the index that stores these things.

Finally, in my own code I've been using the simgear and flightgear namespaces 
instead of the SG and FG prefixes, but I won't force anyone else to do that :)

Tim

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to