Flags

G-Golf class, accessors, methods and procedures to deal with C flags types.

Classes

<flags>
<gi-flags>

Procedures, Accessors and Methods

integer->flags
flags->integer
!g-type___
!g-name______
!name_____

Description

G-Golf class, accessors, methods and procedures to deal with C flags types.

Classes

Class: <flags>

The <flags> class is a subclass of <enum>. It has no direct slots.

Class: <gi-flags>

The <gi-flags> class is a subclass of <flags>. Its class-direct-slots are:

g-type

#:accessor !g-type
#:init-keyword #:g-type
#:init-value #f

g-name

#:accessor !g-name
#:init-keyword #:g-name

name

#:accessor !name

The name slot is automatically initialized.

Instances of the <gi-flags> class are immutable (to be precise, there are not meant to be mutated, see GOOPS Notes and Conventions, ’Slots are not Immutable’).

Procedures, Accessors and Methods

Method: integer->flags (inst <flags>) n

Returns a possibly empty) list of symbol(s).

Obtains and returns the list of (symbol) flags for the given <flags> instance and its integer representation n.

Method: flags->integer (inst <flags>) flags

Returns an integer.

Compute and returns the integer representation for the list of (symbol(s)) given by flags and the given <flag> instance.

Accessor: !g-type (inst <gi-flags>)
Accessor: !g-name (inst <gi-flags>)
Accessor: !name (inst <gi-flags>)

Returns the content of the g-type, g-name or name slot for inst, respectively.