GEOS SDK TechDocs
|
|
2.4 Using Routine Pointers in Goc
|
3 The GEOS Object System
@optimize, @protominor
There is a small number of Goc keywords which are used only to ease the burden of maintaining header files which will be used and shared often.
The
@optimize
keyword is used to speed compilation of Goc header files. It may be placed at the top of a
.goh
file. The directive instructs Goc to generate a specially processed
.poh
file which contains all the information of the
.goh
file, but is somewhat faster to compile. This
.poh
file is automatically regenerated if the corresponding
.goh
file has been changed since the last compilation. Its syntax is simple:
@optimize
The
@protominor
keyword is used so that a single Goc header file may serve multiple versions of a Goc library. When creating a new version of an existing library, use the
@protominor
keyword to declare new messages and variable data fields for a class. Suppose your original class declaration looked like so:
@class MyClass, SuperClass; @message void MSG_M_DO_THIS(void); @vardata void TEMP_M_DONE_FLAG; @endc
Having released this version of your class, you wished to release another version in which this class handled another message. You wanted to specify that this new message would only work with this new version of the library. This would be set up like so:
@class MyClass, SuperClass; @message void MSG_M_DO_THIS(void); @vardata void TEMP_M_DONE_FLAG; @protominor MyVersion20 @message void MSG_M_DO_THAT(void); @endc
This keyword has the syntax:
@protominor <name>
incminor
entry in the geode's .gp file.
To do the equivalent version control with routines, use the
incminor
.gp file directive.
GEOS SDK TechDocs
|
|
2.4 Using Routine Pointers in Goc
|
3 The GEOS Object System