kb_item Struct Reference

Knowledge base item (defined by name, type (int/char*) and value). Implemented as a singly linked list. More...

`#include <kb.h>`

## Data Fields

enum kb_item_type | type
union { |
char * v_str |
int v_int |
}; |
size_t | len
struct kb_item * | next
size_t | namelen
char | name []

## Detailed Description

Knowledge base item (defined by name, type (int/char*) and value). Implemented as a singly linked list.

## Field Documentation

## [union]

union { ... } kb_item

Value of this knowledge base item.

## len

size_t kb_item::len

Length of string.

## name

char kb_item::name[]

Name of this knowledge base item.

## namelen

size_t kb_item::namelen

Name length (including final NULL byte).

## next

struct kb_item* kb_item::next

Next item in list.

## type

enum kb_item_type kb_item::type

One of KB_TYPE_INT or KB_TYPE_STR.

## v_int

int kb_item::v_int

Hold an int value for this kb item.

## v_str

char* kb_item::v_str

Hold an str value for this kb item.

The documentation for this struct was generated from the following file:

- util/kb.h