union Slot

Slot class - a smart pointer to Data which provides for copy-on-write of the Data it manages More...

Definition#include <Slot.hh>
Inherited bytSlot
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members

Protected Members


Detailed Description

Slot class - a smart pointer to Data which provides for copy-on-write of the Data it manages

Additionally, Slot makes use of pointer alignment to encode additional forms into a pointer: encoded Integers (31 bit integer values) and one additional form which will be used for `immediate' values such as Promise and Future.

Note: can't make arrays of Slot - no default constructor

void init ()
[protected]

initialize Slot to NULL

Data * mkInteger ()
[protected const]

convert an encoded integer into an instance of Integer

inline bool isEncInt ()
[const]

predicate: is Slot an encoded Integer?

Slot (Data *d = NULL)

default constructor - construct NULL Slot

Slot (const Data *d)

construct from const Data*

Slot (int l)

Integer constructor - construct Slot from integer

Slot (Data &d)

reference constructor - construct Slot from Data

Slot (const char *str)

construct Slot from a string

Parameters:
strstring to assign to this

Slot (const Slot& f)

copy constructor - dups reference

Parameters:
fconst Slot& to which to assign this

Slot (Slot &s)

copy constructor - dups reference

Parameters:
sSlot& to which to assign this

Slot& operator= (const Slot& f)

assignment operator. Initializes Slot

Parameters:
fSlot& to which to assign this

Slot& operator= (Data *d)

assignment operator. Initializes Slot

Parameters:
dData* to which to assign this

Slot& operator= (int i)

assignment operator. Initializes Slot

Parameters:
iinteger to which to assign this

>
Data * operator-> ()
[const]

dereference smartpointer

operator Data* ()
[const]

dereference smartpointer

operator Data& ()
[const]

dereference smartpointer

Slot operator [] (int index)
[const]

dereference smartpointer as sequence

Slot operator [] (const Slot &)
[const]

dereference smartpointer accessing underlying sequence

operator String * ()
[const]

dereference smartpointer as String*

operator UString * ()
[const]

dereference smartpointer as UString*

operator List * ()
[const]

dereference smartpointer as List*

operator NList * ()
[const]

dereference smartpointer as List*

operator Tuple * ()
[const]

dereference smartpointer as Tuple*

operator Dict * ()
[const]

dereference smartpointer as Dict*

operator DictIt * ()
[const]

dereference smartpointer as DictIt*

operator Symbol * ()
[const]

dereference smartpointer as Symbol*

operator Namespace * ()
[const]

dereference smartpointer as Namespace*

operator Error * ()
[const]

dereference smartpointer as Error*

operator Builtin * ()
[const]

dereference smartpointer as Builtin*

operator Integer * ()
[const]

dereference smartpointer as Integer*

operator BigInt * ()
[const]

dereference smartpointer as BigInt*

operator Real * ()
[const]

dereference smartpointer as Real*

operator int ()
[const]

dereference smartpointer as int

operator char* ()
[const]

dereference smartpointer as char*

const char * typeId ()
[const]

return the type pointed to

inline operator bool ()
[const]

non-NULL predicate: convert Slot to a bool

int order (const Slot& d)
[const]

Data ordering over Slot

bool equal (const Slot &d)
[const]

possible reduction in strength for ==

void check (const Slot *from, size_t len = 1)
[static]

consistency check on underlying Data array

int cmp (const Slot *l, const Slot *r)
[static]

compare two Slots used by @see Vector::qsort and @see Vector::bsearch

int findNull (const Slot *from)
[static]

find offset of leftmost NULL element in range

Slot * move (Slot *to, const Slot *from, size_t range)
[static]

move a range of Slots without touching them

Slot * dup (Slot *to, const Slot *from, size_t range)
[static]

duplicate a range of Slots perform necessary reference counting

void destroy (Slot *from, size_t range)
[static]

destroy the elements of the Slot range

void init (Slot *from, size_t range)
[static]

initialise default elements in Slot range

void segFill (Slot *from, const Slot &, int)
[static]

fill a segment of slots with a slot

Slot * find (Slot *from, const Slot &_c, size_t range)
[static]

find a single matching T

Slot * search (Slot *from, const Slot *needle, size_t len, size_t range)
[static]

find needle in haystack O(n^2)

int order (const Slot& d1, const Slot& d2)
[static]

Data ordering over Slot

ostream & Dump (ostream& out)
[const]

dump this Slot to a stream


Generated by: colin@sharedtech.dhis.org on Sat Nov 6 11:59:24 199.