Objectively
Ultra-lightweight object oriented framework for GNU C.
Loading...
Searching...
No Matches
NumberFormatter.h File Reference

Number formatting and parsing. More...

Go to the source code of this file.

Data Structures

struct  NumberFormatter
 Number formatting and parsing. More...
 

Macros

#define NUMBERFORMAT_CURRENCY   "%'.2lf"
 Currency format.
 
#define NUMBERFORMAT_DECIMAL   "%lf"
 Decimal format.
 
#define NUMBERFORMAT_INTEGER   "%ld"
 Integer format.
 

Functions

OBJECTIVELY_EXPORT Class_NumberFormatter (void)
 

Detailed Description

Number formatting and parsing.

Definition in file NumberFormatter.h.

Macro Definition Documentation

◆ NUMBERFORMAT_CURRENCY

#define NUMBERFORMAT_CURRENCY   "%'.2lf"

Currency format.

Definition at line 37 of file NumberFormatter.h.

◆ NUMBERFORMAT_DECIMAL

#define NUMBERFORMAT_DECIMAL   "%lf"

Decimal format.

Definition at line 42 of file NumberFormatter.h.

◆ NUMBERFORMAT_INTEGER

#define NUMBERFORMAT_INTEGER   "%ld"

Integer format.

Definition at line 47 of file NumberFormatter.h.

Function Documentation

◆ _NumberFormatter()

OBJECTIVELY_EXPORT Class * _NumberFormatter ( void  )

Definition at line 91 of file NumberFormatter.c.

91 {
92 static Class *clazz;
93 static Once once;
94
95 do_once(&once, {
96 clazz = _initialize(&(const ClassDef) {
97 .name = "NumberFormatter",
98 .superclass = _Object(),
99 .instanceSize = sizeof(NumberFormatter),
100 .interfaceOffset = offsetof(NumberFormatter, interface),
101 .interfaceSize = sizeof(NumberFormatterInterface),
103 });
104 });
105
106 return clazz;
107}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition Class.c:86
static void initialize(Class *clazz)
Class * _Object(void)
Definition Object.c:136
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
Number formatting and parsing.