union Slot
|
Slot class - a smart pointer to Data
which provides for copy-on-write of the Data it manages
More... |
|
|
Public Members
- inline bool isEncInt () const
- Slot (Data *d = NULL)
- Slot (const Data *d)
- Slot (int l)
- Slot (Data &d)
- Slot (const char *str)
- Slot (const Slot& f)
- Slot (Slot &s)
- Slot& operator= (const Slot& f)
- Slot& operator= (Data *d)
- Slot& operator= (int i)
- ~Slot ()
- Data * operator-> () const
- operator Data* () const
- operator Data& () const
- Slot operator [] (int index) const
- Slot operator [] (const Slot &) const
- operator String * () const
- operator UString * () const
- operator List * () const
- operator NList * () const
- operator Tuple * () const
- operator Dict * () const
- operator DictIt * () const
- operator Symbol * () const
- operator Namespace * () const
- operator Error * () const
- operator Builtin * () const
- operator Integer * () const
- operator BigInt * () const
- operator Real * () const
- operator int () const
- operator long () const
- operator char* () const
- const char * typeId () const
- inline operator bool () const
- int order (const Slot& d) const
- bool equal (const Slot &d) const
- bool isNumeric () const
- bool isList () const
- bool isString () const
- inline bool operator== (const Slot &d) const
- inline bool operator!= (const Slot &d) const
- inline bool operator>= (const Slot &d) const
- inline bool operator> (const Slot &d) const
- inline bool operator<= (const Slot &d) const
- inline bool operator< (const Slot &d) const
- static void check (const Slot *from, size_t len = 1)
- static int cmp (const Slot *l, const Slot *r)
- static int findNull (const Slot *from)
- static Slot * move (Slot *to, const Slot *from, size_t range)
- static Slot * dup (Slot *to, const Slot *from, size_t range)
- static void destroy (Slot *from, size_t range)
- static void init (Slot *from, size_t range)
- static void segFill (Slot *from, const Slot &, int)
- static Slot * find (Slot *from, const Slot &_c, size_t range)
- static Slot * search (Slot *from, const Slot *needle, size_t len, size_t range)
- static int order (const Slot& d1, const Slot& d2)
- ostream & Dump (ostream& out) const
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
[protected] initialize Slot to NULL
[protected const] convert an encoded integer into an instance of Integer
[const] predicate: is Slot an encoded Integer?
default constructor - construct NULL Slot
construct from const Data*
Integer constructor - construct Slot from integer
reference constructor - construct Slot from Data
construct Slot from a string
Parameters:
str | string to assign to this
|
copy constructor - dups reference
Parameters:
f | const Slot& to which to assign this
|
copy constructor - dups reference
Parameters:
s | Slot& to which to assign this
|
assignment operator. Initializes Slot
Parameters:
f | Slot& to which to assign this
|
assignment operator. Initializes Slot
Parameters:
d | Data* to which to assign this
|
assignment operator. Initializes Slot
Parameters:
i | integer to which to assign this
|
> [const] dereference smartpointer
[const] dereference smartpointer
[const] dereference smartpointer
Slot operator [] (int index)
|
[const] dereference smartpointer as sequence
[const] dereference smartpointer accessing underlying sequence
[const] dereference smartpointer as String*
[const] dereference smartpointer as UString*
[const] dereference smartpointer as List*
[const] dereference smartpointer as List*
[const] dereference smartpointer as Tuple*
[const] dereference smartpointer as Dict*
[const] dereference smartpointer as DictIt*
[const] dereference smartpointer as Symbol*
[const] dereference smartpointer as Namespace*
[const] dereference smartpointer as Error*
[const] dereference smartpointer as Builtin*
[const] dereference smartpointer as Integer*
[const] dereference smartpointer as BigInt*
[const] dereference smartpointer as Real*
[const] dereference smartpointer as int
[const] dereference smartpointer as char*
[const] return the type pointed to
[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
[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
[static] move a range of Slots without touching them
[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
[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
[const] dump this Slot to a stream
Generated by: colin@sharedtech.dhis.org on Sat Nov 6 11:59:24 199. |