forked from chetvertakov/SearchServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocument.h
More file actions
25 lines (20 loc) · 695 Bytes
/
Copy pathdocument.h
File metadata and controls
25 lines (20 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include <iostream>
struct Document {
Document() = default;
explicit Document(int document_id, double document_relevance, int document_rating):
id(document_id), relevance(document_relevance), rating(document_rating){}
int id = 0;
double relevance = 0.0;
int rating = 0;
friend bool operator == (const Document &lhs, const Document &rhs);
friend bool operator != (const Document &lhs, const Document &rhs);
friend bool operator < (const Document &lhs, const Document &rhs);
friend std::ostream& operator << (std::ostream& os, const Document &rhs);
};
enum class DocumentStatus {
ACTUAL,
IRRELEVANT,
BANNED,
REMOVED
};