-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrange_in_file.hh
51 lines (43 loc) · 1.19 KB
/
range_in_file.hh
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Copyright (C) 2019 SUSE Software Solutions Germany GmbH
*
* This file is part of klp-ccp.
*
* klp-ccp is free software: you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* klp-ccp is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with klp-ccp. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef RANGE_IN_FILE_HH
#define RANGE_IN_FILE_HH
#include <ios>
#include <limits>
namespace klp
{
namespace ccp
{
struct range_in_file
{
typedef std::streamoff loc_type;
range_in_file() noexcept
: begin(std::numeric_limits<loc_type>::max()), end(0)
{}
range_in_file(const loc_type _begin, const loc_type _end) noexcept
: begin(_begin), end(_end)
{}
range_in_file(const loc_type loc) noexcept
: range_in_file(loc, loc)
{}
loc_type begin;
loc_type end;
};
}
}
#endif