Search code examples
c++commentswxwidgets

c++ - Weird Comment In wxWidgets


I found a weird pattern of comment symbol in wxWidgets codes generated in code blocks and some parts of it is also being executed by the compiler.

What actually is this symbol, what it do and what it's called?

//(* ... //*)

Here is the example of how it is implemented in the app's source code:

//(*AppInitialize
bool wxsOK = true;
wxInitAllImageHandlers();
if ( wxsOK )
{
    teesrtFrame* Frame = new teesrtFrame(0);
    Frame->Show();
    SetTopWindow(Frame);
}
//*)

The word AppInitialize seems to be ignored, but all of the valid codes are compiled.

EDIT:

I hope this image can explain more about my doubt. enter image description here


Solution

  • That's wxSmith code. From its docs:

    This is a block of code that is automatically generated by wxSmith. Every block starts with a //(BlockName comment and ends with a //). You may find other similar blocks in both header and source files. If you change their content, all changes will be lost next time you change something in the editor. These comments and everything inside them belong to wxSmith, so don't mess with them.