36#ifndef __YTLIB_KEY_VALUES_H
37#define __YTLIB_KEY_VALUES_H
39#include "ytStrArray.h"
41#include "ytIntArray.h"
42#include "ytDoubleArray.h"
68#define ytKeyValues_ERROR_VALUE
70#define ytKeyValues_ERROR_VALUE ((size_t) -1)
78ytKeyValues * ytKeyValues_newm(
const char * file,
int line);
79void ytKeyValues_deletem(
ytKeyValues *
this,
const char * file,
int line);
80#define ytKeyValues_new() ytKeyValues_newm(__FILE__,__LINE__)
81#define ytKeyValues_delete(this) ytKeyValues_deletem(this,__FILE__,__LINE__)
88void ytKeyValues_deleteAllv(
void *
this);
95void ytKeyValues_dump(
ytKeyValues *
this, FILE * fp);
102 const char * key,
int value);
104 const char * key,
const char * value);
112int ytKeyValues_getInt(
const ytKeyValues *
this,
const char * key,
int def);
113double ytKeyValues_getDouble(
const ytKeyValues *
this,
const char * key,
double def);
114char * ytKeyValues_getString(
const ytKeyValues *
this,
const char * key);
119const char * ytKeyValues_getKey(
const ytKeyValues *
this,
size_t index);
121int ytKeyValues_getKeyIndex(
const ytKeyValues *
this,
const char * key);
124void ytKeyValues_print(
const ytKeyValues *
this, FILE * fp);
125void ytKeyValues_printI(
const ytObject *
this, FILE * fp);
126size_t ytKeyValues_memorySize(
const ytKeyValues *
this);
127ytByte * ytKeyValues_serialize(
const ytKeyValues *
this, ytByte ** pptr);
128ytKeyValues * ytKeyValues_deserialize(ytByte **
const pptr);
129ytByte * ytKeyValues_serializeI(
const ytObject * obj, ytByte ** pptr);
130ytObject * ytKeyValues_deserializeI(ytByte **
const pptr);
133#define ytKV(str) ytKeyValues_parse(str)
135int ytKeyValues_test(
int argc,
char * argv[]);
139void ytKeyValues_MPI_Bcast(
ytKeyValues ** pObject,
int root, MPI_Comm comm);
int * ytKeyValues_DEFAULT_VALUE_OFF
Value representing OFF.
Definition ytKeyValues.h:63
char * ytKeyValues_DEFAULT_KEY
Value representing the default key, that is, the key used for values without keys.
Definition ytKeyValues.h:51
int * ytKeyValues_DEFAULT_VALUE_ON
Value representing ON.
Definition ytKeyValues.h:59
char * ytKeyValues_ERROR_KEY
Value representing error key.
Definition ytKeyValues.h:55
char * ytKeyValues_DEFAULT_VALUE
Value used as a default value for no argument keys.
Definition ytKeyValues.h:46