9#ifndef __YTLIB__ARRAY_H 
   10#define __YTLIB__ARRAY_H 
   15#include "lang/ytObject.h" 
   17#define ytArray_ERROR_VALUE ((size_t) -1) 
   25typedef struct ytArray_t {
 
   34#define ytArray_new() ytArray_newm(__FILE__,__LINE__) 
   35ytArray * ytArray_newm(
const char * file, 
int line);
 
   39void ytArray_delete(
ytArray * 
this);
 
   40void ytArray_deletev(
void * 
this);
 
   41void ytArray_deleteAll(
ytArray * 
this);
 
   42void ytArray_deleteAllv(
void * 
this);
 
   45ytArray * ytArray_arrayNew(
size_t size);
 
   46void ytArray_arrayDelete(
ytArray * 
this, 
size_t size);
 
   47void ytArray_dump(
const ytArray * 
this, FILE * fp);
 
   48void ytArray_dumpv(
const ytObject * 
this, FILE * fp);
 
   49size_t ytArray_size(
const ytArray * 
this);
 
   50size_t ytArray_buffSize(
const ytArray * 
this);
 
   51size_t ytArray_memSize(
const ytArray * 
this);
 
   52size_t ytArray_arrayMemSize(
const ytArray * 
this, 
size_t n);
 
   53void ytArray_clear(
ytArray * 
this);
 
   58void ytArray_setSize(
ytArray * 
this, 
size_t size);
 
   62void ytArray_copyArray(
ytArray * 
this, 
size_t index, 
const ytObject * * array, 
size_t size);
 
   66void ytArray_sort(
ytArray * 
this);
 
   68void ytArray_print(
const ytArray * 
this, FILE * fp, 
char * delim);
 
   69int ytArray_sprint(
const ytArray * 
this, 
char * buff, 
size_t size, 
char * delim);
 
   74size_t ytArray_memorySize(
const ytArray * 
this);
 
   75size_t ytArray_memorySizeI(
const ytObject * 
this);
 
   76ytByte * ytArray_serializeI(
const ytObject * obj, ytByte ** pptr);
 
   77ytByte * ytArray_serialize(
const ytArray * 
this, ytByte ** pptr);
 
   78ytArray * ytArray_deserialize(ytByte ** 
const pptr);
 
   79ytObject * ytArray_deserializeI(ytByte ** 
const ptr);
 
   82void ytArray_MPI_Bcast(
ytArray ** pObj, 
int root, MPI_Comm comm);
 
   83void ytArray_MPI_BcastI(
ytObject ** pObject, 
int root, MPI_Comm comm);