rids.h
Go to the documentation of this file.
1 // $Id$
2 // Copyright (c) 2003-2016 the Regents of the University of California
3 // Author: John Wu <John.Wu at acm.org>
4 // Lawrence Berkeley National Laboratory
5 #ifndef IBIS_RIDS_H
6 #define IBIS_RIDS_H
7 #include "utilidor.h" // ibis::RIDSet
11 
12 namespace ibis {
13  class ridHandler;
14 }
15 
18  public:
19  ridHandler(const char* dbName, const char* pref="ibis");
20  ~ridHandler();
21 
22  // Read a set of rids from a file.
23  int read(RIDSet& rids, const char* source);
24  // Write a set of rids to a file.
25  int write(const RIDSet& rids, const char* destination,
26  const char* dbName=0);
27  // Append a set of rids to an existing rid file.
28  int append(const RIDSet& rids, const char* destination) const;
29 
30  protected:
31  // member variables
32  char* _dbName; // name of the rid set
33  char* _prefix; // prefix in the names of the parameters
34  mutable pthread_mutex_t mutex; // a mutex lock
35 
36  // class variables used as internal parameters
37  static const char *const version; // Internal version number.
38 
39  int readDBName(std::istream& _from);
40  int matchDBName(std::istream& _from) const;
41  int readVersion(std::istream& _from) const;
42  int readRidCount(std::istream& _from, int& ic) const;
43 
44 private:
45  ridHandler(const ridHandler&);
46  ridHandler& operator=(const ridHandler&);
47 };
48 #endif
FastBit sorting functions and other utilities.
The current implementation of FastBit is code named IBIS; most data structures and functions are in t...
Definition: bord.h:16
int read(RIDSet &rids, const char *source)
This function is capable of reading a file written with one write command and multiple append command...
Definition: rids.cpp:109
int append(const RIDSet &rids, const char *destination) const
Append the rid set to the name file.
Definition: rids.cpp:73
A class for handling file IO for ibis::rid_t.
Definition: rids.h:17
static const char *const version
Implements the functions defined in ibis::ridHandler.
Definition: rids.h:37
int write(const RIDSet &rids, const char *destination, const char *dbName=0)
Write the rid set.
Definition: rids.cpp:39

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive