p2  0.0
 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 304 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 490 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 504 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 514 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 533 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 552 of file objmodel.c.

Field Documentation

PNObject::PN_OBJECT_HEADER

PNType vt; PNUniq uniq.

Definition at line 305 of file potion.h.

PN PNObject::ivars[]

Definition at line 306 of file potion.h.


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