36#ifndef __YTLIB_STR_ARRAY_H
37#define __YTLIB_STR_ARRAY_H
42#include "lang/ytObject.h"
44#define ytStrArray_ERROR_VALUE ((size_t) -1)
52typedef struct ytStrArray_t {
61#define ytStrArray_new() ytStrArray_newm(__FILE__,__LINE__)
62ytStrArray * ytStrArray_newm(
const char * file,
int line);
67void ytStrArray_deletev(
void *
this);
69void ytStrArray_deleteAllv(
void *
this);
73void ytStrArray_arrayDelete(
ytStrArray *
this,
size_t size);
74void ytStrArray_dump(
const ytStrArray *
this, FILE * fp);
75void ytStrArray_dumpv(
const ytObject *
this, FILE * fp);
76size_t ytStrArray_size(
const ytStrArray *
this);
77size_t ytStrArray_buffSize(
const ytStrArray *
this);
78size_t ytStrArray_memSize(
const ytStrArray *
this);
79size_t ytStrArray_arrayMemSize(
const ytStrArray *
this,
size_t n);
82void ytStrArray_add(
ytStrArray *
this,
char * value);
84void ytStrArray_set(
ytStrArray *
this,
size_t index,
char * value);
85void ytStrArray_setSize(
ytStrArray *
this,
size_t size);
86void ytStrArray_insert(
ytStrArray *
this,
size_t index,
char * value);
87char * ytStrArray_remove(
ytStrArray *
this,
size_t index);
89void ytStrArray_copyArray(
ytStrArray *
this,
size_t index,
const char * * array,
size_t size);
90char * ytStrArray_get(
const ytStrArray *
this,
size_t index);
94size_t ytStrArray_find(
const ytStrArray *
this,
const char * v);
95void ytStrArray_print(
const ytStrArray *
this, FILE * fp,
char * delim);
96int ytStrArray_sprint(
const ytStrArray *
this,
char * buff,
size_t size,
char * delim);
101size_t ytStrArray_memorySize(
const ytStrArray *
this);
102size_t ytStrArray_memorySizeI(
const ytObject *
this);
103ytByte * ytStrArray_serializeI(
const ytObject * obj, ytByte ** pptr);
104ytByte * ytStrArray_serialize(
const ytStrArray *
this, ytByte ** pptr);
105ytStrArray * ytStrArray_deserialize(ytByte **
const pptr);
106ytObject * ytStrArray_deserializeI(ytByte **
const ptr);
109void ytStrArray_MPI_Bcast(
ytStrArray ** pObj,
int root, MPI_Comm comm);
110void ytStrArray_MPI_BcastI(
ytObject ** pObject,
int root, MPI_Comm comm);