#include <NVlist.h>
Inheritance diagram for NVlist:

Protected Member Functions | |
| NVlist (void) | |
| NVlist (const char *dbname, int flags=0) | |
| Record * | o2r (nvoff_t o) |
| nvoff_t | r2o (Record *r) |
| int | sis_empty (nvoff_t proot) |
| void | sprepend (nvoff_t proot, const char *data, size_t szdata) |
| void | sappend (nvoff_t proot, const char *data, size_t szdata) |
| void | sremove (nvoff_t proot) |
| void | sclear (nvoff_t proot) |
| void | sprint (nvoff_t proot, std::ostream &os) |
Definition at line 14 of file NVlist.h.
|
|
Definition at line 16 of file NVlist.h.
00016 :NVcontainer() { 00017 } NVlist(const char *dbname, int flags = |
|
||||||||||||
|
Definition at line 17 of file NVlist.h.
00018 :NVcontainer(dbname, flags) { 00019 } |
|
|
Definition at line 28 of file NVlist.h. References nvoff_t. Referenced by NVActiveDB_Iter::_skip_nulls(), NVListIter::attach(), NVListIter::first(), NVHashIter::first(), NVActiveDB::get(), NVActiveDB::hasgroup(), NVListIter::next(), NVHashIter::next(), sappend(), sprepend(), sprint(), sremove(), and NVActiveDB::sset().
00028 {
00029 return (Record *) (o ? mem_p + o : NULL);
00030 }
|
|
|
Definition at line 31 of file NVlist.h. References nvoff_t. Referenced by NVListIter::data(), NVHashIter::data(), NVActiveDB_Iter::get(), sappend(), sprepend(), sprint(), and sremove().
00031 {
00032 return r ? (char *) r - mem_p : 0;
00033 }
|
|
||||||||||||||||
|
Definition at line 28 of file NVlist.cc. References NVlist::Record::datap(), NVlist::Record::next, NVcontainer::nvalloc(), nvoff_t, o2r(), r2o(), and NVlist::Record::szdata. Referenced by NVList::append().
00029 {
00030 Record *tail;
00031 Record *nr;
00032 nr = o2r(nvalloc(szdata + sizeof(Record)));
00033 tail = o2r(*(nvoff_t *) (mem_p + proot));
00034
00035 nr->szdata = szdata;
00036 memcpy(nr->datap(), data, szdata);
00037 if (tail) {
00038 nr->next = tail->next;
00039 *(nvoff_t *) (mem_p + proot) = tail->next = r2o(nr);
00040 } else {
00041 *(nvoff_t *) (mem_p + proot) = nr->next = r2o(nr);
00042 }
00043 }
|
|
|
Definition at line 58 of file NVlist.cc. References nvoff_t, and sremove(). Referenced by NVList::clear(), and NVHash::sclear().
|
|
|
Definition at line 35 of file NVlist.h. References nvoff_t. Referenced by NVList::is_empty().
|
|
||||||||||||||||
|
Definition at line 11 of file NVlist.cc. References NVlist::Record::datap(), NVlist::Record::next, NVcontainer::nvalloc(), nvoff_t, o2r(), r2o(), and NVlist::Record::szdata. Referenced by NVList::prepend(), and NVHash::sadd().
00012 {
00013 Record *tail;
00014 Record *nr;
00015 nr = o2r(nvalloc(szdata + sizeof(Record)));
00016 tail = o2r(*(nvoff_t *) (mem_p + proot));
00017
00018 nr->szdata = szdata;
00019 memcpy(nr->datap(), data, szdata);
00020 if (tail) {
00021 nr->next = tail->next;
00022 tail->next = r2o(nr);
00023 } else {
00024 *(nvoff_t *) (mem_p + proot) = nr->next = r2o(nr);
00025 }
00026 }
|
|
||||||||||||
|
Definition at line 64 of file NVlist.cc. References NVlist::Record::datap(), NVlist::Record::next, nvoff_t, o2r(), and r2o(). Referenced by NVList::print(), and NVHash::sprint().
|
|
|
Definition at line 45 of file NVlist.cc. References NVlist::Record::next, NVcontainer::nvfree(), nvoff_t, o2r(), and r2o(). Referenced by NVList::remove(), and sclear().
|
1.3.6-20040222