ucommon
7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc.. Fossies Dox: ucommon-7.0.0.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file. 25 #ifndef _UCOMMON_MAPREF_H_ 26 #define _UCOMMON_MAPREF_H_ 28 #ifndef _UCOMMON_CPR_H_ 32 #ifndef _UCOMMON_ATOMIC_H_ 36 #ifndef _UCOMMON_PROTOCOLS_H_ 40 #ifndef _UCOMMON_OBJECT_H_ 44 #ifndef _UCOMMON_TYPEREF_H_ 48 #ifndef _UCOMMON_LINKED_H_ 52 #ifndef _UCOMMON_THREAD_H_ 97 explicit
Map(
void *
addr,
size_t indexes,
size_t paging = 0);
100 return reinterpret_cast<LinkedObject **>(((
caddr_t)(
this)) +
sizeof(
Map));
103 Index *create(
size_t path);
107 void remove(
Index *index,
size_t path);
131 void assign(
MapRef& from);
150 inline operator bool() {
151 return index != NULL;
155 return index == NULL;
159 MapRef(
size_t paths,
size_t paging = 0);
165 static Map *create(
size_t paths,
size_t paging = 0);
175 void update(Index *ind,
TypeRef& value);
177 void remove(Index *ind,
size_t path = 0);
190 static size_t index(
size_t& key,
const uint8_t *
addr,
size_t len);
196 size_t path =
sizeof(T);
197 return MapRef::index(path, (
const uint8_t *)(
object()),
sizeof(T));
204 return MapRef::index(path, (
const uint8_t *)(*
object),
object.len());
210 size_t path =
object.size();
214 template<
typename K,
typename V>
219 size_t path = mapkeypath<K>(key);
223 if(
is(kv) && kv == key) {
263 assign(static_cast<MapRef&>(from));
270 inline mapref(
size_t paths = 37,
size_t paging = 0) :
MapRef(paths, paging) {};
282 size_t path = mapkeypath<K>(key);
286 if(
is(kv) && kv == key) {
301 if(
is(kv) && kv == key) {
313 size_t path = mapkeypath<K>(key);
317 if(
is(kv) && kv == key) {
367 if(
is(kv) && kv == value) {
407 assign(static_cast<MapRef&>(from));
447 while(
is(ip) && offset--) {
459 while(ip && offset--) {
size_t mapkeypath(typeref< T > &object)
linked_pointer< Index > access(size_t keyvalue=0)
void operator()(typeref< K > &key, typeref< V > &val)
size_t mapkeypath< const uint8_t * >(typeref< const uint8_t * > &object)
mapref(size_t paths=37, size_t paging=0)
listref & operator<<(T t)
typeref< V > operator()(K k)
void operator()(K k, V v)
typeref< V > take(typeref< K > &key)
typeref< V > at(typeref< K > &key)
void set(Counted *object)
static void result(const char *path, int code)
typeref< T > operator[](size_t offset)
void assign(const Instance ©)
void update(Index *ind, TypeRef &value)
instance & operator=(const instance ©)
instance & operator=(mapref &from)
mapref & operator=(const mapref ©)
linked_pointer< Index > modify(size_t keyvalue=0)
typeref< T > take(size_t offset)
typeref< T > at(size_t offset)
void add(size_t path, TypeRef &key, TypeRef &value)
listref & operator=(const listref ©)
static size_t index(size_t &key, const uint8_t *addr, size_t len)
listref(const listref ©)
listref & operator<<(typeref< T > &value)
mapref(const mapref ©)
bool erase(typeref< K > &key)
instance(const instance ©)
void value(typeref< K > &key, typeref< V > &val)
bool remove(typeref< T > &key)
size_t mapkeypath< const char * >(typeref< const char * > &object)
bool remove(typeref< K > &key)
void remove(Index *ind, size_t path=0)
instance(const instance ©)
bool erase(typeref< T > &value)
void append(TypeRef &value)
instance & operator=(listref &from)
const struct sockaddr * addr(Socket::address &address)
typeref< V > operator()(typeref< K > &key)
instance & operator=(const instance ©)