potion  0.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PNObject Struct Reference

standard objects act like C structs the fields are defined by the type and it's a fixed size, not volatile. More...

#include <potion.h>

Public Member Functions

PN potion_object_string (Potion *P, PN cl, vPN(Object) self)
 
PN potion_object_forward (Potion *P, PN cl, PN self, PN method)
 
PN potion_object_send (Potion *P, PN cl, PN self, PN method)
 
PN potion_object_size (Potion *P, PN cl, PN self)
 
PN potion_object_subclass (Potion *P, PN cl, PN self, vPN(Vtable) vtable)
 

Data Fields

 PN_OBJECT_HEADER
 PNType vt; PNUniq uniq. More...
 
PN ivars []
 

Detailed Description

standard objects act like C structs the fields are defined by the type and it's a fixed size, not volatile.

Definition at line 295 of file potion.h.

Member Function Documentation

PN potion_object_string ( Potion P,
PN  cl,
vPN(Object)  self 
)

"string" method

Returns
PNString representation of self: <name ptr> if named or <object>

Definition at line 484 of file objmodel.c.

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

"forward" method. Does nothing for the base object

Returns
PN_NIL and prints "\<#object>"

Definition at line 498 of file objmodel.c.

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

"send" method, call a method on self by name

Parameters
self
method
Returns
the result of the method call

Definition at line 508 of file objmodel.c.

PN potion_object_size ( Potion P,
PN  cl,
PN  self 
)
Returns
potion object size in bytes for the gc

Definition at line 527 of file objmodel.c.

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

"subclass?" method (only single inheritence yet) TODO: http://www.eecs.berkeley.edu/~jrb/pve/ (fast subclass test via Packed Vector Encoding)

Returns
returns TRUE or FALSE if the object derives from the class

Definition at line 546 of file objmodel.c.

Field Documentation

PNObject::PN_OBJECT_HEADER

PNType vt; PNUniq uniq.

Definition at line 296 of file potion.h.

PN PNObject::ivars[]

Definition at line 297 of file potion.h.


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