SwatDB
Loading...
Searching...
No Matches
include
searchkeyformat.h
Go to the documentation of this file.
1
/*
2
* SwatDB
3
*
4
* @authors: See Contributors.doc for code contributors
5
*
6
* Copyright (c) 2020 Swarthmore College Computer Science Department
7
* Swarthmore PA, Professors Tia Newhall, Ameet Soni
8
*/
9
10
#ifndef _SWATDB_SEARCHKEYFORMAT_H_
11
#define _SWATDB_SEARCHKEYFORMAT_H_
12
13
14
19
#include <vector>
20
#include "
swatdb_types.h
"
21
30
class
Schema
;
31
32
class
SearchKeyFormat
{
33
34
friend
class
Key
;
35
friend
class
Record
;
36
37
public
:
41
SearchKeyFormat
() =
delete
;
42
46
SearchKeyFormat
&
operator=
(
const
SearchKeyFormat
& other) =
delete
;
47
48
55
SearchKeyFormat
(std::vector<std::string>
field_list
,
Schema
*
schema
);
56
63
SearchKeyFormat
(std::vector<FieldId>
field_list
,
Schema
*
schema
);
64
68
~SearchKeyFormat
(){}
69
70
74
void
saveToFile
(std::ofstream *out_file);
75
79
void
initFromFile
(std::ifstream *in_file);
80
84
std::vector<FieldId>
getFieldList
();
85
86
private
:
90
std::vector<FieldId>
field_list
;
91
95
Schema
*
schema
;
96
97
};
98
99
#endif
Key
Definition
key.h:38
Record
Definition
record.h:34
Schema
Definition
schema.h:37
SearchKeyFormat
Definition
searchkeyformat.h:32
SearchKeyFormat::getFieldList
std::vector< FieldId > getFieldList()
returns the vector list corresponding to the field list
SearchKeyFormat::SearchKeyFormat
SearchKeyFormat(std::vector< std::string > field_list, Schema *schema)
Constructor of SearchKeyFormat.
SearchKeyFormat::field_list
std::vector< FieldId > field_list
Definition
searchkeyformat.h:90
SearchKeyFormat::saveToFile
void saveToFile(std::ofstream *out_file)
outputs fieldids in field list to out file passed in by pointer.
SearchKeyFormat::initFromFile
void initFromFile(std::ifstream *in_file)
initializes fieldids based on saved metadata
SearchKeyFormat::~SearchKeyFormat
~SearchKeyFormat()
Destructor.
Definition
searchkeyformat.h:68
SearchKeyFormat::operator=
SearchKeyFormat & operator=(const SearchKeyFormat &other)=delete
Disable copy assignment constructor.
SearchKeyFormat::SearchKeyFormat
SearchKeyFormat()=delete
Disable default Constructor.
SearchKeyFormat::schema
Schema * schema
Definition
searchkeyformat.h:95
SearchKeyFormat::SearchKeyFormat
SearchKeyFormat(std::vector< FieldId > field_list, Schema *schema)
Constructor of SearchKeyFormat.
swatdb_types.h
Generated by
1.9.8