News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

what does the macro STANDALONE in parser.cpp used for?

Started by ollydbg, May 12, 2010, 03:01:41 PM

Previous topic - Next topic

ollydbg

I have blame the parser.cpp, and find that the macro usage like:

#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.

MortenMacFly

Quote from: ollydbg on May 12, 2010, 03:01:41 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mandrav

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...

ollydbg

Quote from: mandrav 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.
Thanks for your reply!!!

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.