9#ifndef __YTLIB_KEY_VALUES_H
10#define __YTLIB_KEY_VALUES_H
12#include "ytStrArray.h"
14#include "ytIntArray.h"
15#include "ytDoubleArray.h"
41#define ytKeyValues_ERROR_VALUE
43#define ytKeyValues_ERROR_VALUE ((size_t) -1)
51ytKeyValues * ytKeyValues_newm(
const char * file,
int line);
52void ytKeyValues_deletem(
ytKeyValues *
this,
const char * file,
int line);
53#define ytKeyValues_new() ytKeyValues_newm(__FILE__,__LINE__)
54#define ytKeyValues_delete(this) ytKeyValues_deletem(this,__FILE__,__LINE__)
61void ytKeyValues_deleteAllv(
void *
this);
68void ytKeyValues_dump(
ytKeyValues *
this, FILE * fp);
75 const char * key,
int value);
77 const char * key,
const char * value);
85int ytKeyValues_getInt(
const ytKeyValues *
this,
const char * key,
int def);
86double ytKeyValues_getDouble(
const ytKeyValues *
this,
const char * key,
double def);
87char * ytKeyValues_getString(
const ytKeyValues *
this,
const char * key);
92const char * ytKeyValues_getKey(
const ytKeyValues *
this,
size_t index);
94int ytKeyValues_getKeyIndex(
const ytKeyValues *
this,
const char * key);
97void ytKeyValues_print(
const ytKeyValues *
this, FILE * fp);
98void ytKeyValues_printI(
const ytObject *
this, FILE * fp);
99size_t ytKeyValues_memorySize(
const ytKeyValues *
this);
100ytByte * ytKeyValues_serialize(
const ytKeyValues *
this, ytByte ** pptr);
101ytKeyValues * ytKeyValues_deserialize(ytByte **
const pptr);
102ytByte * ytKeyValues_serializeI(
const ytObject * obj, ytByte ** pptr);
103ytObject * ytKeyValues_deserializeI(ytByte **
const pptr);
106#define ytKV(str) ytKeyValues_parse(str)
108int ytKeyValues_test(
int argc,
char * argv[]);
112void ytKeyValues_MPI_Bcast(
ytKeyValues ** pObject,
int root, MPI_Comm comm);
int * ytKeyValues_DEFAULT_VALUE_OFF
Value representing OFF.
Definition ytKeyValues.h:36
char * ytKeyValues_DEFAULT_KEY
Value representing the default key, that is, the key used for values without keys.
Definition ytKeyValues.h:24
int * ytKeyValues_DEFAULT_VALUE_ON
Value representing ON.
Definition ytKeyValues.h:32
char * ytKeyValues_ERROR_KEY
Value representing error key.
Definition ytKeyValues.h:28
char * ytKeyValues_DEFAULT_VALUE
Value used as a default value for no argument keys.
Definition ytKeyValues.h:19