Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
Data Structures | Macros | Enumerations | Functions
StringReader.h File Reference

StringReaders provide convenient parsing of text based files. More...

#include <Objectively/String.h>

Go to the source code of this file.

Data Structures

struct  StringReader
 The StringReader type. More...
 

Macros

#define READER_EOF   ((Unicode) -1)
 

Enumerations

enum  StringReaderMode { StringReaderPeek , StringReaderRead }
 

Functions

OBJECTIVELY_EXPORT Class_StringReader (void)
 

Detailed Description

StringReaders provide convenient parsing of text based files.

Definition in file StringReader.h.

Macro Definition Documentation

◆ READER_EOF

#define READER_EOF   ((Unicode) -1)

Definition at line 38 of file StringReader.h.

Enumeration Type Documentation

◆ StringReaderMode

Enumerator
StringReaderPeek 
StringReaderRead 

Definition at line 33 of file StringReader.h.

33 {
StringReaderMode
Definition: StringReader.h:33
@ StringReaderRead
Definition: StringReader.h:35
@ StringReaderPeek
Definition: StringReader.h:34

Function Documentation

◆ _StringReader()

OBJECTIVELY_EXPORT Class * _StringReader ( void  )

Definition at line 192 of file StringReader.c.

192 {
193 static Class *clazz;
194 static Once once;
195
196 do_once(&once, {
197 clazz = _initialize(&(const ClassDef) {
198 .name = "StringReader",
199 .superclass = _Object(),
200 .instanceSize = sizeof(StringReader),
201 .interfaceOffset = offsetof(StringReader, interface),
202 .interfaceSize = sizeof(StringReaderInterface),
204 });
205 });
206
207 return clazz;
208}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition: Class.c:91
static void initialize(Class *clazz)
Definition: StringReader.c:174
long Once
The Once type.
Definition: Once.h:37
#define do_once(once, block)
Executes the given block at most one time.
Definition: Once.h:43
ClassDefs are passed to _initialize via an archetype to initialize a Class.
Definition: Class.h:41
The runtime representation of a Class.
Definition: Class.h:95
Class * _Object(void)
The Object archetype.
Definition: Object.c:136
The StringReader type.
Definition: StringReader.h:47