36#ifndef __YTLIB__ARRAY_H 
   37#define __YTLIB__ARRAY_H 
   42#include "lang/ytObject.h" 
   44#define ytArray_ERROR_VALUE ((size_t) -1) 
   52typedef struct ytArray_t {
 
   61#define ytArray_new() ytArray_newm(__FILE__,__LINE__) 
   62ytArray * ytArray_newm(
const char * file, 
int line);
 
   66void ytArray_delete(
ytArray * 
this);
 
   67void ytArray_deletev(
void * 
this);
 
   68void ytArray_deleteAll(
ytArray * 
this);
 
   69void ytArray_deleteAllv(
void * 
this);
 
   72ytArray * ytArray_arrayNew(
size_t size);
 
   73void ytArray_arrayDelete(
ytArray * 
this, 
size_t size);
 
   74void ytArray_dump(
const ytArray * 
this, FILE * fp);
 
   75void ytArray_dumpv(
const ytObject * 
this, FILE * fp);
 
   76size_t ytArray_size(
const ytArray * 
this);
 
   77size_t ytArray_buffSize(
const ytArray * 
this);
 
   78size_t ytArray_memSize(
const ytArray * 
this);
 
   79size_t ytArray_arrayMemSize(
const ytArray * 
this, 
size_t n);
 
   80void ytArray_clear(
ytArray * 
this);
 
   85void ytArray_setSize(
ytArray * 
this, 
size_t size);
 
   89void ytArray_copyArray(
ytArray * 
this, 
size_t index, 
const ytObject * * array, 
size_t size);
 
   93void ytArray_sort(
ytArray * 
this);
 
   95void ytArray_print(
const ytArray * 
this, FILE * fp, 
char * delim);
 
   96int ytArray_sprint(
const ytArray * 
this, 
char * buff, 
size_t size, 
char * delim);
 
  101size_t ytArray_memorySize(
const ytArray * 
this);
 
  102size_t ytArray_memorySizeI(
const ytObject * 
this);
 
  103ytByte * ytArray_serializeI(
const ytObject * obj, ytByte ** pptr);
 
  104ytByte * ytArray_serialize(
const ytArray * 
this, ytByte ** pptr);
 
  105ytArray * ytArray_deserialize(ytByte ** 
const pptr);
 
  106ytObject * ytArray_deserializeI(ytByte ** 
const ptr);
 
  109void ytArray_MPI_Bcast(
ytArray ** pObj, 
int root, MPI_Comm comm);
 
  110void ytArray_MPI_BcastI(
ytObject ** pObject, 
int root, MPI_Comm comm);