81 return self->
value ? true :
false;
89 return (
char) self->
value;
122 return (
float) self->
value;
130 return (
long) self->
value;
152 return (
int) self->
value;
168 return (
short) self->
value;
171#pragma mark - Class lifecycle
206 .instanceSize =
sizeof(
Number),
207 .interfaceOffset = offsetof(
Number, interface),
208 .interfaceSize =
sizeof(NumberInterface),
Class * _initialize(const ClassDef *def)
Initializes the given Class.
#define alloc(type)
Allocate and initialize and instance of type.
#define super(type, obj, method,...)
int HashForDecimal(int hash, const double decimal)
Accumulates the hash value of decimal into hash.
Utilities for calculating hash values.
#define HASH_SEED
The hash seed value.
static void initialize(Class *clazz)
A wrapper for placing numeric primitives into collections, etc.
Order
Comparison constants.
#define do_once(once, block)
Executes the given block at most one time.
ClassDefs are passed to _initialize via an archetype to initialize a Class.
The runtime representation of a Class.
ident interface
The interface of the Class.
Condition * init(Condition *self)
Initializes this Condition.
Order compareTo(const Date *self, const Date *other)
Compares this Date to another.
A wrapper for placing numeric primitives into collections, etc.
short shortValue(const Number *self)
float floatValue(const Number *self)
Number * numberWithValue(double value)
Returns a new Number with the given value.
double value
The backing value.
Number * initWithValue(Number *self, double value)
Initializes this Number with the specified value.
_Bool boolValue(const Number *self)
char charValue(const Number *self)
long longValue(const Number *self)
double doubleValue(const Number *self)
Class * _Number(void)
The Number archetype.
int intValue(const Number *self)
Object is the root Class of The Objectively Class hierarchy.
Class * clazz
Every instance of Object begins with a pointer to its Class.
Class * _Object(void)
The Object archetype.
String * description(const Object *self)
_Bool isEqual(const Object *self, const Object *other)
Tests equality of the other Object.
int hash(const Object *self)