src/capi/impl/capi_flex_enum_list.cpp
/** Extract an element at a specific index.
 *
 */
Extract an element at a specific index.
Extract an element at a specific index .
EXPORT tc_ft_type_enum tc_flex_enum_list_extract_element(
    const tc_flex_enum_list* fl, uint64_t index, tc_error **error) {
  ERROR_HANDLE_START();
  if(fl == NULL) {
    set_error(error, "tc_flex_enum_list instance null.");
    return FT_TYPE_UNDEFINED;
  }
  if(index >= fl->value.size()) {
    set_error(error, "tc_flex_enum_list index out of bounds.");
    return FT_TYPE_UNDEFINED;
  }
  return static_cast<tc_ft_type_enum>(fl->value[index]);
  ERROR_HANDLE_END(error, FT_TYPE_UNDEFINED);
}
EXPORT tc_ft_type_enum tc_flex_enum_list_extract_element ( const tc_flex_enum_list * fl , uint64_t index , tc_error * * error ) { ERROR_HANDLE_START ( ) ; if ( fl == NULL ) { set_error ( error , " " ) ; return FT_TYPE_UNDEFINED ; } if ( index >= fl -> value . size ( ) ) { set_error ( error , " " ) ; return FT_TYPE_UNDEFINED ; } return static_cast < tc_ft_type_enum > ( fl -> value [ index ] ) ; ERROR_HANDLE_END ( error , FT_TYPE_UNDEFINED ) ; }
Extract an element at a specific index.
Extract an element at a specific index .