33 template<
typename KEYTYPE,
typename VALUETYPE>
56 VALUETYPE*&
at(KEYTYPE* ky){
return reinterpret_cast<VALUETYPE*&
>(
FXHash::at(ky)); }
59 VALUETYPE *
const&
at(KEYTYPE* ky)
const {
return reinterpret_cast<VALUETYPE *const&
>(
FXHash::at(ky)); }
65 VALUETYPE *
const&
operator[](KEYTYPE* ky)
const {
return reinterpret_cast<VALUETYPE *const&
>(
FXHash::at(ky)); }
68 VALUETYPE*
insert(KEYTYPE* ky,VALUETYPE* ptr=
nullptr){
return reinterpret_cast<VALUETYPE*
>(
FXHash::insert(ky,ptr)); }
71 VALUETYPE*
remove(KEYTYPE* ky){
return reinterpret_cast<VALUETYPE*
>(
FXHash::remove(ky)); }
77 KEYTYPE*
key(FXival pos)
const {
return reinterpret_cast<KEYTYPE*
>(
FXHash::key(pos)); }
80 VALUETYPE*&
data(FXival pos){
return reinterpret_cast<VALUETYPE*&
>(
FXHash::data(pos)); }
83 VALUETYPE *
const&
data(FXival pos)
const {
return reinterpret_cast<VALUETYPE *const&
>(
FXHash::data(pos)); }
VALUETYPE *const & data(FXival pos) const
Return constant reference to slot at position pos.
Definition: FXHashOf.h:83
FXHashOf()
Default constructor.
Definition: FXHashOf.h:38
VALUETYPE *& operator[](KEYTYPE *ky)
Return reference to slot assocated with given key.
Definition: FXHashOf.h:62
VALUETYPE * insert(KEYTYPE *ky, VALUETYPE *ptr=nullptr)
Insert association with given key; return old value, if any.
Definition: FXHashOf.h:68
VALUETYPE *const & at(KEYTYPE *ky) const
Return constant reference to slot assocated with given key.
Definition: FXHashOf.h:59
KEYTYPE * key(FXival pos) const
Return key at position pos.
Definition: FXHashOf.h:77
VALUETYPE *& at(KEYTYPE *ky)
Return reference to slot assocated with given key.
Definition: FXHashOf.h:56
VALUETYPE * erase(FXival pos)
Erase data at pos in the table; return old value, if any.
Definition: FXHashOf.h:74
FXival find(KEYTYPE *ky) const
Find position of given key, returning -1 if not found.
Definition: FXHashOf.h:50
FXHashOf< KEYTYPE, VALUETYPE > & operator=(const FXHashOf< KEYTYPE, VALUETYPE > &other)
Assignment operator.
Definition: FXHashOf.h:44
A hash table for mapping pointers to pointers.
Definition: FXHash.h:33
void * erase(FXival pos)
Erase entry from table at pos, returning old value.
FXHash & operator=(const FXHash &other)
Assign from another table.
FXHash & adopt(FXHash &other)
Adopt table from another; the other table becomes empty.
FXbool has(KEYTYPE *ky) const
Check if key is mapped.
Definition: FXHashOf.h:53
Definition: FX4Splitter.h:28
void * remove(const void *ky)
Remove key from the table.
VALUETYPE *& data(FXival pos)
Return reference to slot at position pos.
Definition: FXHashOf.h:80
FXival find(const void *ky) const
Find position of given key, returning -1 if not found.
FXHashOf(const FXHashOf< KEYTYPE, VALUETYPE > &other)
Copy constructor.
Definition: FXHashOf.h:41
A hash table mapping pointers to KEYTYPE to pointers of VALUETYPE.
Definition: FXHashOf.h:34
VALUETYPE *const & operator[](KEYTYPE *ky) const
Return constant reference to slot assocated with given key.
Definition: FXHashOf.h:65
const void * key(FXival pos) const
Return key at position pos.
Definition: FXHash.h:150
void * insert(const void *ky, void *ptr=nullptr)
Replace key in table, overwriting the old value if the given key already exists.
Definition: FXHash.h:130
FXbool has(const void *ky) const
Check if key is mapped.
Definition: FXHash.h:104
void *& data(FXival pos)
Return reference to data pointer at position pos.
Definition: FXHash.h:155
void *& at(const void *ky)
Return reference to slot assocated with given key.
FXHashOf< KEYTYPE, VALUETYPE > & adopt(FXHashOf< KEYTYPE, VALUETYPE > &other)
Adopt objects from orig, leaving orig empty.
Definition: FXHashOf.h:47