Yage3D.net
 

yage.core.types

Authors:
Eric Poggel

License:
LGPL v3

struct word ;
Allow for easy bit-by-bit conversion from one two-byte type to another.

Example:
 short s = word("Hi").s;   // the bits of the string "Hi" are stored in s.
 ubyte[] u = word(512).ub; // u[0] is 0 and u[1] is 1.


short s ;
ushort us ;
byte[2u] b ;
ubyte[2u] ub ;
char[2u] c ;
Get the word as one of these types.

word opCall (T)(T i);
Convert to word

struct dword ;
Allow for easy bit-by-bit conversion from one four-byte type to another

int i ;
uint ui ;
float f ;
short[2u] s ;
ushort[2u] us ;
word[2u] w ;
byte[4u] b ;
ubyte[4u] ub ;
char[4u] c ;
Get the dword as one of these types.

dword opCall (T)(T i);
Convert to dword

union qword ;
Allow for easy bit-by-bit conversion from one eight-byte type to another.

long l ;
ulong ul ;
double d ;
float[2u] f ;
int[2u] i ;
uint[2u] ui ;
dword[2u] dw ;
short[4u] s ;
ushort[4u] us ;
word[4u] w ;
byte[8u] b ;
ubyte[8u] ub ;
char[8u] c ;
Get the qword as one of these types

qword opCall (T)(T i);
Convert to qword

struct Nullable (T);
Nullable from Phobos 2, ported to D1 by Eric Poggel

Copyright:
Copyright the respective authors, 2008-

License:
.

Authors:
, , Don Clugston, Shin Fujishiro

Defines a value paired with a distinctive "null " state that denotes the absence of a valud value. If default constructed, a object starts in the null state. Assigning it renders it non-null . Calling can nullify it again.

Example:
 Nullable!int a;
 assert(a.isNull);
 a = 5;
 assert(!a.isNull);
 assert(a == 5);
Practically, Nullable !(T) stores a T and a bool.

Nullable!(T) OpCall (T value);
Nullable!(T) OpCall (Object value = null);
Constructor initializing with a value or null .

void opAssign (T value);
void opAssign (Object value);
Assigns value or null to the internally-held state.

T* get ();
Gets the value. Throws an exception if is in the null state. This function is also called for the implicit conversion to .

char[] toString ();


Yage source files are copywritten by their specified authors and available under the terms of the GNU LGPL.
Documentation generated with CandyDoc on Wed Aug 11 11:14:27 2010