libfaster API Documentation  Development Version
Super fast distributted computing
fddBase.h
1 #ifndef LIBFASTER_FDDBASE_H
2 #define LIBFASTER_FDDBASE_H
3 
4 
5 #include "definitions.h"
6 
7 namespace faster{
8  class fddBase{
9  protected:
10  fddType _kType;
11  fddType _tType;
12  unsigned long int id;
13  unsigned long int totalBlocks;
14  unsigned long int size;
15  std::vector<size_t> dataAlloc;
16  bool cached;
17  public:
18  fddBase(): size(0){ }
19  virtual ~fddBase() {}
20 
21  void setSize(size_t &s){ size = s; } // TODO Should be protected?
22 
24  size_t getSize(){ return size; }
25 
27  int getId(){return id;}
28 
30  const std::vector<size_t> & getAlloc(){ return dataAlloc; }
31 
32  fddType tType(){ return _tType; }
33  fddType kType(){ return _kType; }
34 
36  bool isCached(){ return cached; }
37 
38  virtual void discard() = 0;
39  virtual bool isGroupedByKey() = 0;
40  virtual void setGroupedByKey(bool gbk) = 0;
41 
42  //virtual void * _collect() = 0;
43  };
44 }
45 
46 #endif
bool isCached()
Returns true if the dataset is cached.
Definition: fddBase.h:36
int getId()
Returns the identification number of the dataset.
Definition: fddBase.h:27
size_t getSize()
Returns the size of the dataset.
Definition: fddBase.h:24
libfaster main namespace
Definition: _workerFdd.h:11
unsigned int fddType
Dataset type.
Definition: definitions.h:16
const std::vector< size_t > & getAlloc()
Returns the allocation identification number of the dataset.
Definition: fddBase.h:30