potion  0.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Lobby Class Reference

root namespace, the global environment and parent class of all builtins. More...

Public Member Functions

PN potion_lobby_read (Potion *P, PN cl, PN self)
 
PN potion_srand (Potion *P, PN cl, PN self, PN seed)
 
PN potion_rand (Potion *P, PN cl, PN self)
 
PN potion_lobby_isa (Potion *P, PN cl, PN self, vPN(Vtable) vtable)
 
static PN potion_lobby_self (Potion *P, PN cl, PN self)
 
PN potion_lobby_string (Potion *P, PN cl, PN self)
 
PN potion_lobby_kind (Potion *P, PN cl, PN self)
 
PN potion_lobby_can (Potion *P, PN cl, PN self, PN method)
 
PN potion_lobby_print (Potion *P, PN cl, PN self)
 
PN potion_lobby_say (Potion *P, PN cl, PN self)
 
PN potion_about (Potion *P, PN cl, PN self)
 
PN potion_exit (Potion *P, PN cl, PN self)
 
PN potion_any_cmp (Potion *P, PN cl, PN self, PN value)
 
PN potion_lobby_list (Potion *P, PN cl, PN self, PN size)
 

Detailed Description

root namespace, the global environment and parent class of all builtins.

Member Function Documentation

PN potion_lobby_read ( Potion P,
PN  cl,
PN  self 
)

global "read" method, read next line from stdin via fgets()

Returns
PNString or or PN_NIL

Definition at line 181 of file file.c.

PN potion_srand ( Potion P,
PN  cl,
PN  self,
PN  seed 
)

"srand" initialize random seed

Parameters
seedPNInteger
Returns
Lobby (usually unused)
See also
potion_rand.

Definition at line 163 of file mt19937ar.c.

PN potion_rand ( Potion P,
PN  cl,
PN  self 
)

"rand" generate random ulong number

rand #=> xxxxxx
Returns
PNDouble in [0,0xffffffff]-interval
See also
potion_num_rand for double, potion_srand.

Definition at line 173 of file mt19937ar.c.

PN potion_lobby_isa ( Potion P,
PN  cl,
PN  self,
vPN(Vtable)  vtable 
)

global "isa?" method: kind self == obj kind

Returns
returns TRUE or FALSE if the object has the same type as the class

Definition at line 534 of file objmodel.c.

static PN potion_lobby_self ( Potion P,
PN  cl,
PN  self 
)

global "self" method, object identity

Returns
self

Definition at line 571 of file objmodel.c.

PN potion_lobby_string ( Potion P,
PN  cl,
PN  self 
)

global "string" method

Returns
the name of self

Definition at line 578 of file objmodel.c.

PN potion_lobby_kind ( Potion P,
PN  cl,
PN  self 
)

global "kind" method

Returns
the PNVtable (type) of self

Definition at line 587 of file objmodel.c.

PN potion_lobby_can ( Potion P,
PN  cl,
PN  self,
PN  method 
)

"can" the object call the named method?

Returns
true or false

Definition at line 596 of file objmodel.c.

PN potion_lobby_print ( Potion P,
PN  cl,
PN  self 
)

"print" the stringification of any object

Definition at line 602 of file objmodel.c.

PN potion_lobby_say ( Potion P,
PN  cl,
PN  self 
)

"print" object and newline.

Returns
nil

Definition at line 608 of file objmodel.c.

PN potion_about ( Potion P,
PN  cl,
PN  self 
)

global "about" method

Returns
a table with various quotes

Definition at line 633 of file objmodel.c.

PN potion_exit ( Potion P,
PN  cl,
PN  self 
)

global "exit" method. exit(0)

Definition at line 658 of file objmodel.c.

PN potion_any_cmp ( Potion P,
PN  cl,
PN  self,
PN  value 
)

"cmp" method. compare given value against argument.

Parameters
valuePN
Returns
PNInteger -1 if less, 0 if equal or 1 if greater

Definition at line 26 of file primitive.c.

PN potion_lobby_list ( Potion P,
PN  cl,
PN  self,
PN  size 
)

global "list" method. return a new empty list

Parameters
sizePNInteger
Returns
PNTuple

Definition at line 817 of file table.c.


The documentation for this class was generated from the following files: