libmoost
|
00001 /* vim:set ts=3 sw=3 sts=3 et: */ 00028 00029 00030 #include <boost/cstdint.hpp> // uint64_t 00031 #include <boost/noncopyable.hpp> 00032 00033 #ifndef MOOST_KVDS_IKVDS_HPP__ 00034 #define MOOST_KVDS_IKVDS_HPP__ 00035 00036 namespace moost { namespace kvds { 00037 00064 00065 struct IKvds : boost::noncopyable 00066 { 00067 00069 virtual bool put( 00070 void const * pkey, size_t const ksize, 00071 void const * pval, size_t const vsize 00072 ) = 0; 00073 00085 virtual bool get( 00086 void const * pkey, size_t const ksize, 00087 void * pval, size_t & vsize 00088 ) = 0; 00089 00092 virtual bool add( 00093 void const * pkey, size_t const ksize, 00094 void const * pval, size_t const vsize 00095 ) = 0; 00096 00106 virtual bool all( 00107 void const * pkey, size_t const ksize, 00108 void * pval, size_t & vsize 00109 ) = 0; 00110 00112 virtual bool xst( 00113 void const * pkey, size_t const ksize 00114 ) = 0; 00115 00117 virtual bool del( 00118 void const * pkey, size_t const ksize 00119 ) = 0; 00120 00122 virtual bool clr() = 0; 00123 00125 virtual bool beg() = 0; 00126 00138 virtual bool nxt( 00139 void * pkey, size_t & ksize 00140 ) = 0; 00141 00144 virtual bool end() = 0; 00145 00147 virtual bool siz( 00148 void const * pkey, size_t const ksize, 00149 size_t & vsize 00150 ) = 0; 00151 00154 virtual bool cnt(boost::uint64_t & cnt) = 0; 00155 00158 virtual bool nil(bool & isnil) = 0; 00159 00160 virtual ~ IKvds() {} 00161 }; 00162 00163 }} 00164 00165 #endif /// MOOST_KVDS_IKVDS_HPP__