function_list.c File Reference
`#include "opj_includes.h"`

## Macros

#define | OPJ_VALIDATION_SIZE 10
| Default size of the validation list, if not sufficient, data will be reallocated with a double size.

## Functions

opj_procedure_list_t * | opj_procedure_list_create ()
| Creates a validation list.
void | opj_procedure_list_destroy (opj_procedure_list_t *p_list)
| Destroys a validation list.
OPJ_BOOL | opj_procedure_list_add_procedure (opj_procedure_list_t *p_validation_list, opj_procedure p_procedure, opj_event_mgr_t *p_manager)
| Adds a new validation procedure.
OPJ_UINT32 | opj_procedure_list_get_nb_procedures (opj_procedure_list_t *p_validation_list)
| Gets the number of validation procedures.
opj_procedure * | opj_procedure_list_get_first_procedure (opj_procedure_list_t *p_validation_list)
| Gets the pointer on the first validation procedure.
void | opj_procedure_list_clear (opj_procedure_list_t *p_validation_list)
| Clears the list of validation procedures.

## Macro Definition Documentation

## OPJ_VALIDATION_SIZE

#define OPJ_VALIDATION_SIZE 10

Default size of the validation list, if not sufficient, data will be reallocated with a double size.

## Function Documentation

## opj_procedure_list_add_procedure()

OPJ_BOOL opj_procedure_list_add_procedure | ( | opj_procedure_list_t * | p_validation_list,
|  | opj_procedure | p_procedure,
|  | opj_event_mgr_t * | p_manager
| ) |  |

Adds a new validation procedure.

Parameters

  p_validation_list | the list of procedure to modify.
  p_procedure | the procedure to add.
  p_manager | the user event manager.

Returns
  OPJ_TRUE if the procedure could be added.

References EVT_ERROR, opj_procedure_list::m_nb_max_procedures, opj_procedure_list::m_nb_procedures, opj_procedure_list::m_procedures, opj_event_msg(), OPJ_FALSE, opj_free(), opj_realloc(), OPJ_TRUE, and OPJ_VALIDATION_SIZE.

Referenced by opj_j2k_setup_decoding(), opj_j2k_setup_decoding_tile(), opj_j2k_setup_decoding_validation(), opj_j2k_setup_encoding_validation(), opj_j2k_setup_end_compress(), opj_j2k_setup_header_reading(), opj_j2k_setup_header_writing(), opj_jp2_setup_encoding_validation(), opj_jp2_setup_end_header_reading(), opj_jp2_setup_end_header_writing(), opj_jp2_setup_header_reading(), and opj_jp2_setup_header_writing().

## opj_procedure_list_clear()

void opj_procedure_list_clear | ( | opj_procedure_list_t * | p_validation_list | ) |

Clears the list of validation procedures.

Parameters

  p_validation_list | the list of procedure to clear.

References opj_procedure_list::m_nb_procedures.

Referenced by opj_j2k_exec(), and opj_jp2_exec().

## opj_procedure_list_create()

opj_procedure_list_t * opj_procedure_list_create | ( | void |  | ) |

Creates a validation list.

Returns
  the newly created validation list.

References opj_procedure_list::m_nb_max_procedures, opj_procedure_list::m_procedures, opj_calloc(), opj_free(), and OPJ_VALIDATION_SIZE.

Referenced by opj_j2k_create_compress(), opj_j2k_create_decompress(), and opj_jp2_create().

## opj_procedure_list_destroy()

void opj_procedure_list_destroy | ( | opj_procedure_list_t * | p_list | ) |

Destroys a validation list.

Parameters

  p_list | the list to destroy.

References opj_procedure_list::m_procedures, and opj_free().

Referenced by opj_j2k_destroy(), and opj_jp2_destroy().

## opj_procedure_list_get_first_procedure()

opj_procedure * opj_procedure_list_get_first_procedure | ( | opj_procedure_list_t * | p_validation_list | ) |

Gets the pointer on the first validation procedure.

This function is similar to the C++ iterator class to iterate through all the procedures inside the validation list. the caller does not take ownership of the pointer.

Parameters

  p_validation_list | the list of procedure to get the first procedure from.

Returns
  a pointer to the first procedure.

References opj_procedure_list::m_procedures.

Referenced by opj_j2k_exec(), and opj_jp2_exec().

## opj_procedure_list_get_nb_procedures()

OPJ_UINT32 opj_procedure_list_get_nb_procedures | ( | opj_procedure_list_t * | p_validation_list | ) |

Gets the number of validation procedures.

Parameters

  p_validation_list | the list of procedure to modify.

Returns
  the number of validation procedures.

References opj_procedure_list::m_nb_procedures.

Referenced by opj_j2k_exec(), and opj_jp2_exec().