Next: Macros
Up: xctocc Syntax
Previous: Instance Variable Declarations
These basic types are as in C++:
- int int
- short short
- long long
- unsigned unsigned
- float float
- double double
These type as similar to C++ types, with extended Scheme meaning:
- char char -- a character in Scheme
- byte byte -- like a C++ char, but a number in Scheme
- Long Long -- forced to be an integer from Scheme
(i.e. the parameter cannot be an inexact number)
- Double Double -- forced to be a floating-point number from Scheme
(i.e. the parameter cannot be an exact integer)
- string string -- a null-terminated string; char * in C++
- nstring nstring -- a null-terminated string or NULL; char *
in C++
- cstring cstring -- a constant string; const char * in C++
- ncstring ncstring -- a constant string or NULL; const char *
in C++
- ustring ustring -- a null-terminated string; unsigned char * in C++
- nustring nustring -- a null-terminated string or NULL; unsigned char *
in C++
- custring custring -- a constant string; const unsigned char * in C++
- ncustring ncustring -- a constant string or NULL; const unsigned char *
in C++
- bool bool -- a boolean in Scheme; the C++ representation must
be specified with @BOOLEAN
When a type is followed by * *, then the type is interepreted
as a modifiable (single) indirect value.
When a type is followed by ? ?, then the type is interepreted
as a modifiable indirect value or a NULL pointer.
When a type is followed by & &, then the type is interpreted
as call-by-reference (or return-by-reference).
When a type is followed by [] [], then the type is interpreted
as an array; the value must be manually bundled and unbundled
with macros.
A class name can be used, followed by either !, , or
% %. ! indicates a pointer to an object, indicates
a possibly NULL pointer, and % indicates a object passed
by reference.
Any other valid C++ type can be used, but the value must be manually
bundled and unbundled with macros.
An xctocc type is translated appropriately in the C++ glue
code. For example, Long? becomes
long * and MyClass% becomes MyClass&.
Next: Macros
Up: xctocc Syntax
Previous: Instance Variable Declarations
PLT