Developer documentation
Version 3.0.3-105-gd3941f44
entry.h
Go to the documentation of this file.
1
/* Copyright (c) 2008-2022 the MRtrix3 contributors.
2
*
3
* This Source Code Form is subject to the terms of the Mozilla Public
4
* License, v. 2.0. If a copy of the MPL was not distributed with this
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
*
7
* Covered Software is provided under this License on an "as is"
8
* basis, without warranty of any kind, either expressed, implied, or
9
* statutory, including, without limitation, warranties that the
10
* Covered Software is free of defects, merchantable, fit for a
11
* particular purpose or non-infringing.
12
* See the Mozilla Public License v. 2.0 for more details.
13
*
14
* For more details, see http://www.mrtrix.org/.
15
*/
16
17
#ifndef __file_entry_h__
18
#define __file_entry_h__
19
20
#include <string>
21
22
#include "types.h"
23
24
namespace
MR
25
{
26
namespace
File
27
{
28
29
class
Entry
{
NOMEMALIGN
30
public
:
31
Entry
(
const
std::string& fname, int64_t
offset
= 0) :
32
name
(fname),
start
(
offset
) { }
33
34
Entry
(
const
Entry
&) =
default
;
35
Entry
(
Entry
&&) noexcept = default;
36
Entry
& operator=(
Entry
&& E) noexcept {
37
name
= std::move (E.name);
38
start
= E.start;
39
return
*
this
;
40
}
41
42
std::string
name
;
43
int64_t
start
;
44
};
45
46
47
inline
std::ostream&
operator<<
(std::ostream& stream,
const
Entry
&
e
)
48
{
49
stream <<
"File::Entry { \""
<<
e
.name <<
"\", offset "
<<
e
.start <<
" }"
;
50
return
stream;
51
}
52
}
53
}
54
55
#endif
56
MR::File::Entry
Definition:
entry.h:29
MR::File::Entry::Entry
Entry(Entry &&) noexcept=default
MR::File::Entry::Entry
Entry(const std::string &fname, int64_t offset=0)
Definition:
entry.h:31
MR::File::Entry::name
std::string name
Definition:
entry.h:42
MR::File::Entry::start
int64_t start
Definition:
entry.h:43
MR::File::Entry::Entry
Entry(const Entry &)=default
offset
index_type offset
Definition:
loop.h:33
MR::Math::e
constexpr double e
Definition:
math.h:39
NOMEMALIGN
#define NOMEMALIGN
Definition:
memory.h:22
MR::File::operator<<
std::ostream & operator<<(std::ostream &stream, const Entry &e)
Definition:
entry.h:47
MR
Definition:
base.h:24
core
file
entry.h
Generated on Mon Jul 4 2022 08:00:06 for MRtrix by
1.9.3