python-on-a-chip online compiler

Dependencies:   mbed TSI

Embed: (wiki syntax)

« Back to documentation index

seq.h File Reference

seq.h File Reference

Sequence Header. More...

Go to the source code of this file.

Data Structures

struct  PmSeqIter_s
 Sequence Iterator Object. More...

Typedefs

typedef struct PmSeqIter_s PmSeqIter_t
 Sequence Iterator Object.

Functions

int8_t seq_compare (pPmObj_t pobj1, pPmObj_t pobj2)
 Compares two sequences for equality.
PmReturn_t seq_getLength (pPmObj_t pobj, uint16_t *r_index)
 Returns the length of the sequence.
PmReturn_t seq_getSubscript (pPmObj_t pobj, int16_t index, pPmObj_t *r_pobj)
 Returns the object from sequence[index].
PmReturn_t seqiter_getNext (pPmObj_t pobj, pPmObj_t *r_pitem)
 Returns the next item from the sequence iterator object.
PmReturn_t seqiter_new (pPmObj_t pobj, pPmObj_t *r_pobj)
 Returns a new sequence iterator object.

Detailed Description

Sequence Header.

Definition in file seq.h.


Typedef Documentation

typedef struct PmSeqIter_s PmSeqIter_t

Sequence Iterator Object.

Instances of this object are created by GET_ITER and used by FOR_ITER. Stores a pointer to a sequence and an index int16_t.


Function Documentation

int8_t seq_compare ( pPmObj_t  pobj1,
pPmObj_t  pobj2 
)

Compares two sequences for equality.

Parameters:
pobj1Ptr to first sequence.
pobj2Ptr to second sequence.
Returns:
C_SAME if the seuqences are equivalent, C_DIFFER otherwise.

Definition at line 29 of file seq.c.

PmReturn_t seq_getLength ( pPmObj_t  pobj,
uint16_t *  r_index 
)

Returns the length of the sequence.

Parameters:
pobjPtr to sequence.
r_indexReturn arg, length of sequence
Returns:
Return status

Definition at line 105 of file seq.c.

PmReturn_t seq_getSubscript ( pPmObj_t  pobj,
int16_t  index,
pPmObj_t r_pobj 
)

Returns the object from sequence[index].

Parameters:
pobjPtr to sequence object to get object from
indexInt index into the sequence
r_pobjReturn arg, object from sequence
Returns:
Return status

Definition at line 145 of file seq.c.

PmReturn_t seqiter_getNext ( pPmObj_t  pobj,
pPmObj_t r_pitem 
)

Returns the next item from the sequence iterator object.

Parameters:
pobjPtr to sequence iterator.
r_pitemReturn arg, pointer to next item from sequence.
Returns:
Return status.

Definition at line 207 of file seq.c.

PmReturn_t seqiter_new ( pPmObj_t  pobj,
pPmObj_t r_pobj 
)

Returns a new sequence iterator object.

Parameters:
pobjPtr to sequence.
r_pobjReturn by reference, new sequence iterator
Returns:
Return status.

Definition at line 244 of file seq.c.