BRL-CAD
#include "common.h"
#include "ged.h"
#include "./ged_private.h"
Include dependency graph for ged_util.c:

Go to the source code of this file.

Functions

int _ged_results_init (struct ged_results *results)
 
int _ged_results_add (struct ged_results *results, const char *result_string)
 
size_t ged_results_count (struct ged_results *results)
 
const char * ged_results_get (struct ged_results *results, size_t index)
 
void ged_results_clear (struct ged_results *results)
 
void ged_results_free (struct ged_results *results)
 

Detailed Description

Utility routines for common operations in libged.

Definition in file ged_util.c.

Function Documentation

int _ged_results_init ( struct ged_results results)

Definition at line 36 of file ged_util.c.

References BU_ALLOC, BU_PTBL_INIT, GED_ERROR, GED_OK, ged_results::results_tbl, and UNLIKELY.

Referenced by ged_init().

int _ged_results_add ( struct ged_results results,
const char *  result_string 
)

Definition at line 47 of file ged_util.c.

References bu_ptbl_ins(), BU_PTBL_IS_INITIALIZED, bu_strdup, GED_ERROR, GED_OK, ged_results::results_tbl, and UNLIKELY.

Referenced by ged_ls().

Here is the call graph for this function:

size_t ged_results_count ( struct ged_results results)

Definition at line 68 of file ged_util.c.

References BU_PTBL_LEN, ged_results::results_tbl, and UNLIKELY.

const char* ged_results_get ( struct ged_results results,
size_t  index 
)

Definition at line 76 of file ged_util.c.

References BU_PTBL_GET, and ged_results::results_tbl.

void ged_results_clear ( struct ged_results results)

Definition at line 82 of file ged_util.c.

References bu_free(), BU_PTBL_GET, BU_PTBL_LEN, bu_ptbl_reset(), ged_results::results_tbl, and UNLIKELY.

Referenced by ged_ls(), and ged_results_free().

Here is the call graph for this function:

void ged_results_free ( struct ged_results results)

Definition at line 98 of file ged_util.c.

References bu_free(), bu_ptbl_free(), ged_results_clear(), ged_results::results_tbl, and UNLIKELY.

Referenced by ged_free().

Here is the call graph for this function: