ngfd-plugin: /build/ngfd/src/ngfd-1.4.1/src/include/ngf/value.h File Reference

ngfd-plugin

Macros | Typedefs | Enumerations | Functions
value.h File Reference
`#include <glib.h>`

Go to the source code of this file.

## Macros
#define | N_VALUE_STR_STRING "(string)"
#define | N_VALUE_STR_INT "(int)"
#define | N_VALUE_STR_UINT "(uint)"
#define | N_VALUE_STR_BOOL "(bool)"
#define | N_VALUE_STR_POINTER "(pointer)"

## Typedefs
typedef struct _NValue | NValue
| Internal NValue structure.

## Enumerations
enum | NValueType { N_VALUE_TYPE_STRING = 1 , N_VALUE_TYPE_INT , N_VALUE_TYPE_UINT , N_VALUE_TYPE_BOOL , N_VALUE_TYPE_POINTER }
| NValue type enum. More...

## Functions
NValue * | n_value_new ()
| Return new NValue.
void | n_value_free (NValue *value)
| Free NValue.
void | n_value_init (NValue *value)
| Re-init NValue.
void | n_value_clean (NValue *value)
| Clean NValue.
NValue * | n_value_copy (const NValue *value)
| Copy NValue.
int | n_value_type (const NValue *value)
| Return type of contents of NValue.
gboolean | n_value_equals (const NValue *a, const NValue *b)
| Compare two NValues.
void | n_value_set_string (NValue *value, const char *in_value)
| Set string value to NValue.
const gchar * | n_value_get_string (const NValue *value)
| Get string value from NValue.
gchar * | n_value_dup_string (const NValue *value)
| Return copy of string from NValue.
void | n_value_set_int (NValue *value, const gint in_value)
| Set int value to NValue.
gint | n_value_get_int (const NValue *value)
| Get int value from NValue.
void | n_value_set_uint (NValue *value, const guint in_value)
| Set uint value to NValue.
guint | n_value_get_uint (const NValue *value)
| Get uint value from NValue.
void | n_value_set_bool (NValue *value, const gboolean in_value)
| Set boolean value to NValue.
gboolean | n_value_get_bool (const NValue *value)
| Get boolean value from NValue.
void | n_value_set_pointer (NValue *value, const gpointer in_value)
| Set pointer to NValue.
gpointer | n_value_get_pointer (const NValue *value)
| Get pointer from NValue.
gchar * | n_value_to_string (const NValue *value)
| Return string representation of contents.

## Macro Definition Documentation

## ◆ N_VALUE_STR_BOOL

#define N_VALUE_STR_BOOL "(bool)"

## ◆ N_VALUE_STR_INT

#define N_VALUE_STR_INT "(int)"

## ◆ N_VALUE_STR_POINTER

#define N_VALUE_STR_POINTER "(pointer)"

## ◆ N_VALUE_STR_STRING

#define N_VALUE_STR_STRING "(string)"

## ◆ N_VALUE_STR_UINT

#define N_VALUE_STR_UINT "(uint)"

## Typedef Documentation

## ◆ NValue

typedef struct _NValue NValue

Internal NValue structure.

## Enumeration Type Documentation

## ◆ NValueType

enum NValueType

NValue type enum.

Used in n_value_type

Enumerator
N_VALUE_TYPE_STRING |
N_VALUE_TYPE_INT |
N_VALUE_TYPE_UINT |
N_VALUE_TYPE_BOOL |
N_VALUE_TYPE_POINTER |

## Function Documentation

## ◆ n_value_clean()

void n_value_clean | ( | NValue * | value | ) |

Clean NValue.

Current contents are freed.

Parameters

  value | NValue

## ◆ n_value_copy()

NValue * n_value_copy | ( | const NValue * | value | ) |

Copy NValue.

Parameters

  value | NValue

Returns
  New NValue

## ◆ n_value_dup_string()

gchar * n_value_dup_string | ( | const NValue * | value | ) |

Return copy of string from NValue.

Parameters

  value | NValue

Returns
  Newly allocated string. Must be freed after use.

## ◆ n_value_equals()

gboolean n_value_equals | ( | const NValue * | a,
|  | const NValue * | b )

Compare two NValues.

Parameters

  a | NValue A
  b | NValue B

Returns
  TRUE if NValues are identical

## ◆ n_value_free()

void n_value_free | ( | NValue * | value | ) |

Free NValue.

Parameters

  value | NValue

## ◆ n_value_get_bool()

gboolean n_value_get_bool | ( | const NValue * | value | ) |

Get boolean value from NValue.

Parameters

  value | NValue

Returns
  Value

## ◆ n_value_get_int()

gint n_value_get_int | ( | const NValue * | value | ) |

Get int value from NValue.

Parameters

  value | NValue

Returns
  Value

## ◆ n_value_get_pointer()

gpointer n_value_get_pointer | ( | const NValue * | value | ) |

Get pointer from NValue.

Parameters

  value | NValue

Returns
  Value

## ◆ n_value_get_string()

const gchar * n_value_get_string | ( | const NValue * | value | ) |

Get string value from NValue.

Parameters

  value | NValue

Returns
  Value

## ◆ n_value_get_uint()

guint n_value_get_uint | ( | const NValue * | value | ) |

Get uint value from NValue.

Parameters

  value | NValue

Returns
  Value

## ◆ n_value_init()

void n_value_init | ( | NValue * | value | ) |

Re-init NValue.

Current contents are emptied (but not freed).

Parameters

  value | NValue

## ◆ n_value_new()

NValue * n_value_new | ( |  | ) |

Return new NValue.

Returns
  New NValue

## ◆ n_value_set_bool()

void n_value_set_bool | ( | NValue * | value,
|  | const gboolean | in_value )

Set boolean value to NValue.

Parameters

  value | NValue
  in_value | value

## ◆ n_value_set_int()

void n_value_set_int | ( | NValue * | value,
|  | const gint | in_value )

Set int value to NValue.

Parameters

  value | NValue
  in_value | value

## ◆ n_value_set_pointer()

void n_value_set_pointer | ( | NValue * | value,
|  | const gpointer | in_value )

Set pointer to NValue.

Parameters

  value | NValue
  in_value | value

## ◆ n_value_set_string()

void n_value_set_string | ( | NValue * | value,
|  | const char * | in_value )

Set string value to NValue.

Parameters

  value | NValue
  in_value | value

## ◆ n_value_set_uint()

void n_value_set_uint | ( | NValue * | value,
|  | const guint | in_value )

Set uint value to NValue.

Parameters

  value | NValue
  in_value | value

## ◆ n_value_to_string()

gchar * n_value_to_string | ( | const NValue * | value | ) |

Return string representation of contents.

Parameters

  value | NValue

Returns
  Contents as string

## ◆ n_value_type()

int n_value_type | ( | const NValue * | value | ) |

Return type of contents of NValue.

Parameters

  value | NValue

Returns
  Type as NValueType

See also
  NValueType