2017-03-07 22:52:11 +00:00
|
|
|
#ifndef STRBUILDER_H
|
|
|
|
#define STRBUILDER_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
2017-03-11 17:00:23 +00:00
|
|
|
#include "../oop.h"
|
2017-03-07 22:52:11 +00:00
|
|
|
|
2017-04-14 22:12:54 +00:00
|
|
|
//#define Strbuilder construct(Strbuilder)
|
2017-03-11 02:36:07 +00:00
|
|
|
extern class(Strbuilder, Object_class, NO_INTERFACES, true) {
|
2017-03-11 01:00:02 +00:00
|
|
|
extends(Object_t);
|
2017-04-14 22:12:54 +00:00
|
|
|
def_hashcode();
|
2017-03-09 15:24:26 +00:00
|
|
|
|
|
|
|
char* string;
|
|
|
|
char** strings;
|
|
|
|
int nrstrings;
|
|
|
|
|
2017-03-11 01:00:02 +00:00
|
|
|
void (*destruct)(defclass Strbuilder*);
|
|
|
|
void (*add)(defclass Strbuilder*, const char*);
|
|
|
|
void (*build)(defclass Strbuilder*);
|
|
|
|
const char* (*get)(defclass Strbuilder*);
|
|
|
|
void (*clear)(defclass Strbuilder*);
|
|
|
|
size_t (*length)(defclass Strbuilder*);
|
|
|
|
} Strbuilder_t;
|
2017-03-07 22:52:11 +00:00
|
|
|
|
2017-03-11 01:00:02 +00:00
|
|
|
Strbuilder_t* method(Strbuilder, construct)(const char*);
|
|
|
|
void method(Strbuilder, populate)(Strbuilder_t*, class_t);
|
2017-03-07 22:52:11 +00:00
|
|
|
|
|
|
|
#endif
|