9#ifndef __YTLIB_STR_ARRAY_H
10#define __YTLIB_STR_ARRAY_H
15#include "lang/ytObject.h"
17#define ytStrArray_ERROR_VALUE ((size_t) -1)
25typedef struct ytStrArray_t {
34#define ytStrArray_new() ytStrArray_newm(__FILE__,__LINE__)
35ytStrArray * ytStrArray_newm(
const char * file,
int line);
40void ytStrArray_deletev(
void *
this);
42void ytStrArray_deleteAllv(
void *
this);
46void ytStrArray_arrayDelete(
ytStrArray *
this,
size_t size);
47void ytStrArray_dump(
const ytStrArray *
this, FILE * fp);
48void ytStrArray_dumpv(
const ytObject *
this, FILE * fp);
49size_t ytStrArray_size(
const ytStrArray *
this);
50size_t ytStrArray_buffSize(
const ytStrArray *
this);
51size_t ytStrArray_memSize(
const ytStrArray *
this);
52size_t ytStrArray_arrayMemSize(
const ytStrArray *
this,
size_t n);
55void ytStrArray_add(
ytStrArray *
this,
char * value);
57void ytStrArray_set(
ytStrArray *
this,
size_t index,
char * value);
58void ytStrArray_setSize(
ytStrArray *
this,
size_t size);
59void ytStrArray_insert(
ytStrArray *
this,
size_t index,
char * value);
60char * ytStrArray_remove(
ytStrArray *
this,
size_t index);
62void ytStrArray_copyArray(
ytStrArray *
this,
size_t index,
const char * * array,
size_t size);
63char * ytStrArray_get(
const ytStrArray *
this,
size_t index);
67size_t ytStrArray_find(
const ytStrArray *
this,
const char * v);
68void ytStrArray_print(
const ytStrArray *
this, FILE * fp,
char * delim);
69int ytStrArray_sprint(
const ytStrArray *
this,
char * buff,
size_t size,
char * delim);
74size_t ytStrArray_memorySize(
const ytStrArray *
this);
75size_t ytStrArray_memorySizeI(
const ytObject *
this);
76ytByte * ytStrArray_serializeI(
const ytObject * obj, ytByte ** pptr);
77ytByte * ytStrArray_serialize(
const ytStrArray *
this, ytByte ** pptr);
78ytStrArray * ytStrArray_deserialize(ytByte **
const pptr);
79ytObject * ytStrArray_deserializeI(ytByte **
const ptr);
82void ytStrArray_MPI_Bcast(
ytStrArray ** pObj,
int root, MPI_Comm comm);
83void ytStrArray_MPI_BcastI(
ytObject ** pObject,
int root, MPI_Comm comm);