Norman Vine writes: > Actually I was thinking about writing self documenting code > ie something like > > // virtual base class > class FGProperty : public SGPropertyNode { > FGProperty () = 0 ; > } > > // type specific derived classes for each property 'type' > class FGInt : public FGProperty { > } > > class FGBool public FGProperty; > class FGDouble public FGProperty; > class FGString public FGProperty; > etc.. > > then > class SomeSystem : public FGSubsystem > { > ..... > private: > FGBool* _serviceable; > FGDouble* _rpm; > FGDouble* _pressure; > FGDouble* _suction; > };
Sure -- that sounds relatively harmless, and adds the advantage of a bit of extra compile-time type checking. All the best, David -- David Megginson, [EMAIL PROTECTED], http://www.megginson.com/ _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel