INGOR
Loading...
Searching...
No Matches
ytObject.h
1/*
2 lang/ytObject.{h,c} : Object abstraction
3 Copyright (C) 2018, Yoshinori Tamada <tamada A T ytlab.jp>
4 All rights reserved.
5
6 See LICENSE.txt for details of the licensing agreement.
7*/
8
9#include "ytType.h"
10
11#ifndef __YTLIB_OBJECT_H
12#define __YTLIB_OBJECT_H
13
14
15#ifndef DOXY
16typedef struct ytObject_t {
17 ytType type;
18} ytObject;
19#endif
20ytType ytObject_type(const ytObject * this);
21ytObject * ytObject_new(ytType type);
22void ytObject_delete(ytObject * this);
23void ytObject_deletev(void * this);
24ytObject * ytObject_clone(const ytObject * this);
25ytObject * ytObject_parse(ytType type, const char * str);
26void ytObject_print(const ytObject * this, FILE * fp);
27int ytObject_sprint(const ytObject * this, char * buff, size_t size);
28void ytObject_printBuff(const ytObject * this, char ** buff, size_t * size);
29ytObject * ytObject_copy(const ytObject * this);
30int ytObject_compare(const ytObject * a, const ytObject * b);
31void ytObject_dump(const ytObject * this, FILE * fp);
32size_t ytObject_size(const ytObject * this);
33ytByte * ytObject_serialize(const ytObject * this, ytByte ** ptr);
34ytObject * ytObject_deserialize(ytByte ** const ptr);
35#ifdef USE_MPI
36#include <mpi.h>
37void ytObject_MPI_Bcast(ytObject ** pObject, int root, MPI_Comm comm);
38#endif /* USE_MPI */
39#endif /* __YTLIB_OBJECT_H */
The basis class.
ytType
Types supported by ytLib.
Definition ytType.h:14