Prev | Next | recorder |
recorder<Base> rec
recorder<Base> rec
creates an empty operation sequence.
void rec.Erase()
erases the operation sequence store in
rec
(the operation sequence is empty after this operation).
The buffers used to store the tape information are returned
to the system (so as to conserve on memory).
op
and
i
have prototypes
OpCode op
size_t i
The syntax
i = rec.PutOp(op)
sets the code for the next operation in the sequence.
The return value
i
is the index of the first variable
corresponding to the result of this operation.
The number of variables
n
corresponding to the operation is given by
n = NumVar(op)
where
n
is a size_t
object.
With each call to PutOp
,
the return index increases by the number of variables corresponding
to the previous call to PutOp
.
This index starts at zero after each Erase
or default constructor.
ind_j
has prototype
size_t ind_j
for
j
equal to
0
, ... ,
5
,
The following syntax
rec.PutInd(ind_0)
rec.PutInd(ind_0, ind_1)
.
.
.
rec.PutInd(ind_0, ind_1, ..., ind_5)
places the values passed to
PutInd
at the current end of the
operation sequence index vector in the specified order, i.e.,
ind_0
comes before
ind_1
e.t.c.
The proper number of indices
n
corresponding to the operation
op
is given by
n = NumVar(op)
where
n
is a size_t
object and
op
is an OpCode
object.
The end of the operation sequence index vector starts at zero
and increases by the number of indices placed in the vector
by each call to PutInd
.
The end of the vector starts at zero after each Erase
or default constructor.
p
and
i
have prototypes
const Base &p
size_t i
The syntax
i = rec.PutPar(p)
places the value
p
in the
operation sequence parameter vector
and returns its index in the vector
i
.
This value is not necessarily placed at the end of the vector
(because values that are identically equal can be reused).
i
and
iv
have prototypes
size_t i
size_t iv
the syntax
i = rec.PutVecInd(iv)
places the value
iv
at the current end of the
operation sequence vec_ind vector
and returns its index in this vector.
This index starts at zero after each Erase
or default constructor
and increments by one for each call to this function.
n
has prototype
size_t n
the syntax
n = rec.TotNumVar()
sets
n
to the number of variables that are in the
operation sequence.
n
has prototype
size_t n
the syntax
n = rec.Memory()
sets
n
to the number of memory units (sizeof
)
required to store the current operation sequence in
rec
.