-
Notifications
You must be signed in to change notification settings - Fork 3
/
ooString.h
46 lines (34 loc) · 1.06 KB
/
ooString.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* oostring.h
*
* Created on: Aug 1, 2014
* Author: fcuri
*/
#ifndef OOSTRING_H_
#define OOSTRING_H_
#include <string.h>
#include <stdarg.h>
#include "ooSimple.h"
#define ooStringC(_st) (char*)(_st)->st
//Use error handling
ooExcepUse();
// Redefine the stringable implementation to use the ooString class.
#undef ooImpStringable
#define ooImpStringable(_class) ooString *ooMethodDeclare(_class, ToString, ooString *st)
ooClass(ooString)
char *st;
int len;
ooImpTypeable(ooString);
ooImpComparable(ooString);
ooPropertyGetDeclare(ooString, ooBoolean, IsEmpty);
ooPropertyGetDeclare(ooString, int, Len);
ooString *ooMethodDeclare(ooString, Cat, char *st);
ooString *ooMethodDeclare(ooString, Catf, const char *format, ...);
ooString *ooMethodDeclare(ooString, CatBuffer, char *buf, int len);
ooString *ooMethodDeclare(ooString, Copy, char *st);
ooString *ooMethodDeclare(ooString, Clean);
ooBoolean ooMethodDeclare(ooString, Equal, char *st);
ooClassEnd(ooString)
ooCtor(ooString, char *st);
ooDtor(ooString);
#endif /* OOSTRING_H_ */