lux/storage/luxio_array.h

00001 #ifndef LUX_STORAGE_LUXIOARRAY_H
00002 #define LUX_STORAGE_LUXIOARRAY_H
00003 
00004 #include <luxio/array.h>
00005 #include "lux/lux.h"
00006 #include "lux/util.h"
00007 #include "data_unit.h"
00008 #include <cassert>
00009 #include <string>
00010 
00011 namespace Lux {
00012 
00013   class LuxIOArray {
00014   public:
00015     LuxIOArray(void);
00016     bool open(const char *filename, db_flags_t open_flags);
00017     bool close(void);
00018     void set_index_type(IO::db_index_t index_type,
00019                         uint8_t data_size = sizeof(uint32_t));
00020     bool put(uint32_t index, LuxDataUnit &val);
00021     bool put(uint32_t index, LuxDataUnit *val);
00022     bool append(uint32_t index, LuxDataUnit &val);
00023     bool append(uint32_t index, LuxDataUnit *val);
00024     bool get(uint32_t index, LuxDataUnit &val);
00025     bool get(uint32_t index, LuxDataUnit *val);
00026     bool del(uint32_t index);
00027 
00028   protected:
00029     ~LuxIOArray(void);
00030 
00031   private:
00032     IO::Array *ary_;
00033   };
00034 }
00035 
00036 #endif

Generated on Fri Feb 5 15:50:30 2010 for Lux by  doxygen 1.4.7