libmoost
/home/mhx/git/github/libmoost/include/moost/kvds/kvds_mem.hpp File Reference
#include <cstdlib>
#include <cstring>
#include <stdexcept>
#include <fstream>
#include <vector>
#include <map>
#include <boost/type_traits.hpp>
#include <boost/static_assert.hpp>
#include <boost/cast.hpp>
#include "ikvds.hpp"
Include dependency graph for kvds_mem.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  moost::kvds::KvdsMem< T >
 *** This class is NOT thread safe *** More...

Namespaces

namespace  moost
 

Creates a unique temporary directory; removed on scope exit.


namespace  moost::kvds

Typedefs

typedef KvdsMem< std::map
< byte_array_t, byte_array_t > > 
moost::kvds::KvdsMemMap
 This is defined for convenience but feel free to use your own container!

Detailed Description

Copyright © 2008-2013 Last.fm Limited

This file is part of libmoost.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Memory bound key/value store provides a ikvds interface for a simple key/value store memory bound container. The backing container is specified as a template parameter but MUST model the same interface as a STL [multi]map and the key and value types MUST be of type kvds::byte_array_t as they're used as a byte buffer for storage. To ensure this is the case the types are statically asserted. Unfortunately, we can't use a template template type because this would be far to restrictive as different container types have different template signatures! The backing container must be default constructable but can be configured post contruction.

Definition in file kvds_mem.hpp.