flx::rtl::_ref_ Struct Reference

#include <flx_rtl.hpp>

List of all members.

Public Member Functions

 _ref_ ()
 NULL reference.
 _ref_ (void *f, void *d)
 init from interior pointer d of a collectable frame f
 _ref_ (void *f, std::ptrdiff_t d)
 init from collectable frame f and offset d
 _ref_ (_ref_ const &r)
 copy constructor
void operator= (_ref_ const &r)
 assignment operator
void * get_data () const
 get interior pointer
void set_data (void *p)
 set interior pointer into same frame
void set (void *f, void *p)
 set from frame f and interior pointer

Public Attributes

void * frame
 Heap frame pointer.
std::ptrdiff_t offset
 Client Data offset.


Detailed Description

REFERENCE. Felix pointer type note: non-polymorphic, so ctor can be inline This type is used to represent pointers to variables. It has two components: a frame pointer and offset. A whole frame is refered to by setting the offset to 0. A non-collectable pointer is refered to by setting the frame to 0 References are first class values: they can copied, assigned, and default constructed. Holding a reference in a location known to the gc ensures the target variable is not collected: Such references cannot dangle. The frame/offset representation was chosen since it fits well with a copying collector: the price is that finding the interior pointer requires adding the offset to the frame pointer. Note that 'frame' points to the CLIENTDATA address of a frame where user data starts: this is not the lowest machine address of the frame's allocated memory or FRAME address, despite the name.


The documentation for this struct was generated from the following file:
Generated on Mon Dec 11 14:48:23 2006 for Felix by  doxygen 1.5.1