Swarm-NG  1.1
swarm::query::swarmdb Class Reference

Defines swarmdb class. More...

#include <io.hpp>

Classes

struct  index_entry
 Structure for index entry. More...
 
struct  result
 Defines query result structure. More...
 
struct  snapshots
 Defines snapshots structure. More...
 

Public Member Functions

 swarmdb (const std::string &datafile)
 swarmdb constructor More...
 
result query (sys_range_t sys, time_range_t T) const
 return a stream of events with msgid, and system sys, at time T
 

Protected Member Functions

void open (const std::string &datafile)
 Open output file.
 
void open_indexes (bool force_recreate=false)
 Open index map, recreate if not exists.
 
bool open_index (index_handle &h, const std::string &datafile, const std::string &suffix, const std::string &filetype)
 Check if data index is up-to-date. More...
 

Detailed Description

Defines swarmdb class.

Definition at line 113 of file io.hpp.

Constructor & Destructor Documentation

swarm::query::swarmdb::swarmdb ( const std::string &  datafile)

swarmdb constructor

Constructor for swarmdb.

Definition at line 450 of file io.cpp.

References open().

Member Function Documentation

bool swarm::query::swarmdb::open_index ( index_handle &  h,
const std::string &  datafile,
const std::string &  suffix,
const std::string &  filetype 
)
protected

Check if data index is up-to-date.

todo: this quick fix is only for fake memory mapping

Definition at line 509 of file io.cpp.

Referenced by open_indexes().


The documentation for this class was generated from the following files: