Next: Function and Method Declarations
Up: xctocc Syntax
Previous: General Syntax
- @ func-def -- starts a function or method declaration. See section
3.3 for more information.
- @BOOLEAN type -- specifies the C++ type used to implement boolean
values.
- @CLASSBASE C++-name "Scheme-name" [ : "parent-class-name"] -- starts
a class description. Scheme-name will be appended with the
class name suffix, if one is defined with @CLASSSUFFIX.
- @CLASSID C++-value -- within a class, specifies a value of the
dynamic type member (set with @IDFIELD) for this class. This value
is compared to the dynamic type member value using ==.
- @CLASSSUFFIX "suffix" -- sets the suffix to be appended onto all
Scheme class names. This is usually set to ``%'' (by convention).
- @CONSTANT "Scheme-name" : type value -- defines a Scheme
global to mirror the C++ constant value. type must be one
of the xctocc types. See section 3.5.
- @CREATOR param-def -- specifies a function prototype for a
constructor in the class. If no @CREATOR statement is present
in a class, instances of the class cannot be directly created in Scheme.
See section 3.3 for more information.
- @DEFINE name = var-expr -- outputs a #define statement where
name is defined to the expression var-expr. If var-expr
contains <x>, then it is replaced with the value of the
xctocc internal variable named x. See also @SET.
#define@#define
- @END -- indicates the end of a class definition or set of globals.
All glue code for the class/globals is output to the ``.cc'' file at
the location of the @END command. All commands for a single
class (or global function set) must appear between the
@CLASSBASE (or @GLOBAL) and
@END statements.
- @HEADER -- specifies where to insert #include #include@#include
statements for header files that are needed/generated by the glue code.
This command should appear once, before any class or global definitions.
- @IDFIELD C++-member-name -- specifies a C++ class member which stores
dynamic class information. This is used with @CLASSID.
- @IFDEFINE name = test-var : true-var-expr : false-var-expr -- is
like @DEFINE, but the expression which is used depends on the
value of the xctocc internal variable named test-var. If
test-var is not ``'' or 0, then true-var-expr is used,
otherwise false-var-expr is used. #define@#define
- @INCLUDE filename -- includes the specified script file, inserting
the contents of the file in place of the @INCLUDE
statement. Include file names use the suffix ``.xci'' by
convention.
- @IVAR ivar-def -- starts an instance variable declaration. See
section 3.4 for more information.
- @MACRO name = macro-definition -- defines a macro, for use in function
declarations. See section 3.6 for more information.
- @SET var = value -- sets an xctocc internal variable value. This
is useful with @DEFINE and @IFDEFINE.
- @SETMARK mark-char = other-mark-char -- defines the mark character
mark-char to be an alias for other-mark-char. Mark characters
are used in function/method definitions. If other-mark-char
is omitted, then mark-char is mapped to nothing. Mark mappings
are not composed; e.g., if 'a' is mapped to 'b' and 'b' is mapped
to 'c', a is not effectively mapped to 'c'.
- @STOP -- terminates interpretation of statements; the rest of
the script file will be copy directly to the output C++ file.
- @VAR C++-expression -- declares an additional instance variable
in a glue object. This can be useful for keeping additional information
with an object to implement complex data type translations.
Next: Function and Method Declarations
Up: xctocc Syntax
Previous: General Syntax
PLT