Top  Previous  Next

User interface > Main menu > Menu: Options > Project options > Code generation > const




The activation of this option only makes sense, if you want to produce c++-code with the professional version of the TextTransformer. In the interpreted applications of the standard version the option implies unnecessary restrictions of your programming possibilities.


If the const-option is activated, all functions (productions, token actions and interpreter functions) of the created parser become const functions.




void CCalcParser::Expression(double xd) const;


this assures, that these functions will not change the data of the parser class. This is important e.g., if you are writing a multi threaded application.


If the const-option is activated, all operations are forbidden, which will change the state of the parser class. This includes operations, which will change the position of the cursor of an mstrstr class variable (findKey, gotoNext etc.). But it is possible, to use mstrstr-references as class variables instead. Also the source and target directories and the indentation stack only can be used as according references. The frame for the class must be adapted accordingly.


This page belongs to the TextTransformer Documentation

Home  Content  German