Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

VMemMap.h

00001 /*****************************************************************************
00002  * Author:   Valient Gough <vgough@pobox.com>
00003  *
00004  *****************************************************************************
00005  * Copyright (c) 2000, Valient Gough
00006  *
00007  * This library is free software; you can distribute it and/or modify it under
00008  * the terms of the GNU Lesser General Public License (LGPL), as published by
00009  * the Free Software Foundation; either version 2.1 of the License, or (at your
00010  * option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  * FITNESS FOR A PARTICULAR PURPOSE.  See the LGPL in the file COPYING for more
00015  * details.
00016  *
00017  */
00018                                                                                
00019 #ifndef _VMemMap_incl_
00020 #define _VMemMap_incl_
00021 
00022 
00023 #include <rel/VMap.h>
00024 
00025 namespace rel
00026 {
00027 
00031     class VMemMap : public VMap
00032     {
00033     public:
00034 
00035         VMemMap();
00036         virtual ~VMemMap();
00037 
00038         // search for subdirectory
00039         virtual VMapPtr createDirectory(const string &name);
00040 
00041         // ---------------------- find
00042         virtual OpaqueValue find(const string &name);
00043 
00044         // ---------------------- iterate
00045         virtual VMapIterator begin();
00046         virtual VMapIterator end();
00047         virtual VMapIterator at(const string &name);
00048 
00049 
00050         // ---------------------- insert
00051         virtual ErrorCode insert(const string &name, const OpaqueValue &value);
00052 
00053         // ----------------------- assign
00054         virtual ErrorCode assign(const string &name, const OpaqueValue &value);
00055 
00056         // ----------------------- remove
00057         virtual ErrorCode erase(const string &name);
00058 
00062         virtual ErrorCode clear();
00063 
00064 
00065     protected:
00066         virtual void advanceIterator(const OpaqueValue &) const;
00067         virtual bool equalIteratorData(const OpaqueValue &, 
00068                 const OpaqueValue &) const;
00069         virtual void assignIteratorData(const OpaqueValue &, 
00070                 const OpaqueValue &) const;
00071         virtual void getKeyValue(const OpaqueValue &,
00072                 std::pair<std::string,OpaqueValue> *result);
00073 
00074     private:
00075         struct VMapData *data;
00076     };
00077 
00078 
00079 } // namespace rel
00080 
00081 
00082 #endif
00083 

Generated at Sat Sep 22 02:20:00 2001 for librel by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001