Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
|
#include <Number.h>
A wrapper for placing numeric primitives into collections, etc.
Properties | |
Object | object |
The superclass. More... | |
double | value |
The backing value. More... | |
![]() | |
Class * | clazz |
Every instance of Object begins with a pointer to its Class. More... | |
Methods | |
Class * | _Number (void) |
The Number archetype. More... | |
_Bool | boolValue (const Number *self) |
char | charValue (const Number *self) |
Order | compareTo (const Number *self, const Number *other) |
Compares this Number to another. More... | |
double | doubleValue (const Number *self) |
float | floatValue (const Number *self) |
Number * | initWithValue (Number *self, double value) |
Initializes this Number with the specified value. More... | |
int | intValue (const Number *self) |
long | longValue (const Number *self) |
Number * | numberWithValue (double value) |
Returns a new Number with the given value. More... | |
short | shortValue (const Number *self) |
![]() | |
Class * | _Object (void) |
The Object archetype. More... | |
Object * | copy (const Object *self) |
Creates a shallow copy of this Object. More... | |
void | dealloc (Object *self) |
Frees all resources held by this Object. More... | |
String * | description (const Object *self) |
int | hash (const Object *self) |
Object * | init (Object *self) |
Initializes this Object. More... | |
_Bool | isEqual (const Object *self, const Object *other) |
Tests equality of the other Object. More... | |
_Bool | isKindOfClass (const Object *self, const Class *clazz) |
Tests for Class hierarchy membership. More... | |
Protected Attributes | |
NumberInterface * | interface |
The interface. More... | |
![]() | |
ObjectInterface * | interface |
The interface. More... | |
Class * _Number | ( | void | ) |
The Number archetype.
Definition at line 198 of file Number.c.
_Bool boolValue | ( | const Number * | self | ) |
char charValue | ( | const Number * | self | ) |
double doubleValue | ( | const Number * | self | ) |
float floatValue | ( | const Number * | self | ) |
int intValue | ( | const Number * | self | ) |
long longValue | ( | const Number * | self | ) |
Number * numberWithValue | ( | double | value | ) |
Returns a new Number with the given value.
value | The value. |
NULL
on error. Definition at line 159 of file Number.c.
short shortValue | ( | const Number * | self | ) |