Author Topic: what does the macro STANDALONE in parser.cpp used for?  (Read 7566 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
what does the macro STANDALONE in parser.cpp used for?
« on: May 12, 2010, 03:01:41 pm »
I have blame the parser.cpp, and find that the macro usage like:

Code
#ifndef STANDALONE
    #include <configmanager.h>
    #include <logmanager.h>
    #include <editormanager.h>
    #include <manager.h>
    #include <globals.h>
    #include <infowindow.h>
#endif // STANDALONE

In the parser.cpp is came from the "revision 5" when the parser.cpp was initially added to the trunk.

So, my question is: what does these preprocessor directive used for ?
It seems when we defined this macro, I still can't build a stand alone program. (The same effort is the parserTest project were have created in this ParserTester for codecompletion plugin

In the ParserTester project, we only include the "parserthread" class, so the Parser.cpp is not included.

So, my suggestion is: Can these preprocessor directive removed? I can't find any reason we should keep it there.

Thanks.

Maybe, the boss mandrav can ask this question.  :D Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: what does the macro STANDALONE in parser.cpp used for?
« Reply #1 on: May 12, 2010, 03:29:17 pm »
Maybe, the boss mandrav can ask this question.  :D Thanks.
Probably it's better to ask RickG22. IIRC there used to be a stand-alone (UI based) version of the CC "plugin". Not sure where it went to, but it' most likely incomplete / not working now.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: what does the macro STANDALONE in parser.cpp used for?
« Reply #2 on: May 13, 2010, 09:58:28 am »
At that point, it was possible to compile the CC plugin files (with an additional main.cpp file) as a standalone executable for easier testing of the parser.
I doubt this can be done nowadays so feel free to ignore it or even remove it.
Be patient!
This bug will be fixed soon...

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: what does the macro STANDALONE in parser.cpp used for?
« Reply #3 on: May 13, 2010, 10:04:51 am »
At that point, it was possible to compile the CC plugin files (with an additional main.cpp file) as a standalone executable for easier testing of the parser.
I doubt this can be done nowadays so feel free to ignore it or even remove it.
Thanks for your reply!!!

Code
I doubt this can be done nowadays
Ha, the parserTest project can just do this.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.