Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/cogadb/include/persistence/row_page.hpp
Go to the documentation of this file.
00001 #pragma once
00002 #include <core/global_definitions.hpp>
00003 #include <persistence/buffer_object.hpp>
00004 
00005 namespace CoGaDB
00006 {       
00008 class RowPage
00009 {       
00010         private:
00012         char* _rows     ;               
00014                 std::vector<unsigned short> _row_offsets;
00016                 unsigned short _col_count;
00018                 unsigned short _row_count;
00020                 bool _is_full;
00022                 unsigned short _current_data_size;
00024                 char* getValueFromPage(BufferObject*, int, unsigned short&);            
00026                 char* getStringFromPage(BufferObject*, int, unsigned short&);           
00027         public:
00028             RowPage(unsigned short);
00029                 RowPage(const RowPage&);
00030                 RowPage& operator=(const RowPage&);
00031             bool isFull() const;
00032                 bool fillPage(std::vector<BufferObject*>, int);
00033                 void print(const TableSchema&) const;   
00034         unsigned short getMaxDataSize() const;          
00035                 unsigned short getDataSize() const;             
00036                 unsigned short count() const;           
00037                 char* createRow(std::vector<BufferObject*>, int, unsigned short&, unsigned short&);             
00038                 char* getValue(unsigned int, unsigned int, unsigned short&) const;
00039                 char* getData() const;
00040 };
00041 
00042 typedef shared_pointer_namespace::shared_ptr<RowPage> RowPagePtr;
00043 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines