Talk:FlightGear-Points of Interest

From FlightGear wiki
Jump to navigation Jump to search

well not sure about the article, while it could undoubtedly be useful, it's likely to be outdated pretty quickly - in my opinion, it would be better to patch the source code and use some form of preprocessor macro to create this info automatically (on demand), so that each executable can dump important callgraph info to the console during startup - that should be fairly straightforward actually using macros like __FILE__ and __LINE__ etc - sort of like an "annotated" startup mode that makes use of the SG_LOG macro. We could have a single "POI" macro that wraps SG_LOG and simply dumps FILE/LINE to the console.--Hooray (talk) 06:04, 16 September 2013 (UTC)

see $FG_SRC/Main/bootstrap.cxx int main(int, char**):

#define POI(note) SG_LOG(SG_DEVEL, SG_DEBUG, __FILE__ << '@' << __LINE__ << ':' << note << std::endl)

// Main entry point; catch any exceptions that have made it this far.
int main ( int argc, char **argv ) {
    POI("FlightGears main entry point");
//....
    return 0;
}