Sequence

## Sequence Sequence — Ordered sequence of items. |

## Functions

raptor_sequence * | raptor_new_sequence ()
raptor_sequence * | raptor_new_sequence_with_context ()
void | raptor_free_sequence ()
void * | raptor_sequence_delete_at ()
void * | raptor_sequence_get_at ()
int | raptor_sequence_join ()
int | raptor_sequence_next_permutation ()
void * | raptor_sequence_pop ()
int | raptor_sequence_print ()
int | raptor_sequence_push ()
int | raptor_sequence_reverse ()
int | raptor_sequence_set_at ()
int | raptor_sequence_shift ()
int | raptor_sequence_size ()
void | raptor_sequence_sort ()
void | raptor_sequence_sort_r ()
int | raptor_sequence_swap ()
void * | raptor_sequence_unshift ()

## Types and Values

typedef | raptor_sequence

## Description

A utility class that provides access to small sequence of items that grow at the end and require quick ordered and indexed access. Can be used as a queue/FIFO but less efficiently than a stack where the items are added and removed from the end.

## Functions

### raptor_new_sequence ()

    raptor_sequence *
    raptor_new_sequence (raptor_data_free_handler free_handler,
                         raptor_data_print_handler print_handler);

#### Returns

### raptor_new_sequence_with_context ()

    raptor_sequence *
    raptor_new_sequence_with_context (raptor_data_context_free_handler free_handler,
                                      raptor_data_context_print_handler print_handler,
                                      void *handler_context);

#### Returns

### raptor_free_sequence ()

    void
    raptor_free_sequence (raptor_sequence *seq);

### raptor_sequence_delete_at ()

    void *
    raptor_sequence_delete_at (raptor_sequence *seq,
                               int idx);

#### Returns

### raptor_sequence_get_at ()

    void *
    raptor_sequence_get_at (raptor_sequence *seq,
                            int idx);

#### Returns

### raptor_sequence_join ()

    int
    raptor_sequence_join (raptor_sequence *dest,
                          raptor_sequence *src);

#### Returns

### raptor_sequence_next_permutation ()

    int
    raptor_sequence_next_permutation (raptor_sequence *seq,
                                      raptor_data_compare_handler compare);

#### Returns

### raptor_sequence_pop ()

    void *
    raptor_sequence_pop (raptor_sequence *seq);

#### Returns

### raptor_sequence_print ()

    int
    raptor_sequence_print (raptor_sequence *seq,
                           FILE *fh);

#### Returns

### raptor_sequence_push ()

    int
    raptor_sequence_push (raptor_sequence *seq,
                          void *data);

#### Returns

### raptor_sequence_reverse ()

    int
    raptor_sequence_reverse (raptor_sequence *seq,
                             int start_index,
                             int length);

#### Returns

### raptor_sequence_set_at ()

    int
    raptor_sequence_set_at (raptor_sequence *seq,
                            int idx,
                            void *data);

#### Returns

### raptor_sequence_shift ()

    int
    raptor_sequence_shift (raptor_sequence *seq,
                           void *data);

#### Returns

### raptor_sequence_size ()

    int
    raptor_sequence_size (raptor_sequence *seq);

#### Returns

### raptor_sequence_sort ()

    void
    raptor_sequence_sort (raptor_sequence *seq,
                          raptor_data_compare_handler compare);

### raptor_sequence_sort_r ()

    void
    raptor_sequence_sort_r (raptor_sequence *seq,
                            raptor_data_compare_arg_handler compare,
                            void *user_data);

### raptor_sequence_swap ()

    int
    raptor_sequence_swap (raptor_sequence *seq,
                          int i,
                          int j);

#### Returns

### raptor_sequence_unshift ()

    void *
    raptor_sequence_unshift (raptor_sequence *seq);

#### Returns

## Types and Values

### raptor_sequence

    raptor_sequence* raptor_sequence;

Raptor sequence class