CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
objstdif.cxh
1// Standard interfaces that have special meaning within the framework
2
3interface Sortable {
4 intptr cmp(object other, uint32 flags);
5}
6
7interface Hashable {
8 uint32 hash(uint32 flags);
9}
10
11interface Convertible {
12 // NOTE: While this is used by stConvert, the object interface is a higher level interface.
13 // The normal convention of blindly overwriting the destination does not apply here. For
14 // example, when called to convert to a string, the destination should be properly reused
15 // or destroyed first.
16 // The layer between stConvert and Convertible takes care of making sure the destination is
17 // always initialized.
18 bool convert(stype st, stgeneric *dest, uint32 flags);
19}
20
21interface IteratorIf {
22 bool valid();
23 bool next();
24 bool get(stvar *out);
25}
26
27abstract class Iterator implements IteratorIf {
28}
29
30interface Iterable {
31 Iterator *iter(); // Caller owns the iterator and must release it with objRelease
32}