IBR-DTNSuite
0.12
Main Page
Namespaces
Classes
Files
File List
File Members
ObservedFile.h
Go to the documentation of this file.
1
/*
2
* ObservedFile.h
3
*
4
* Copyright (C) 2013 IBR, TU Braunschweig
5
*
6
* Written-by: David Goltzsche <goltzsch@ibr.cs.tu-bs.de>
7
* Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de>
8
*
9
* Licensed under the Apache License, Version 2.0 (the "License");
10
* you may not use this file except in compliance with the License.
11
* You may obtain a copy of the License at
12
*
13
* http://www.apache.org/licenses/LICENSE-2.0
14
*
15
* Unless required by applicable law or agreed to in writing, software
16
* distributed under the License is distributed on an "AS IS" BASIS,
17
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
* See the License for the specific language governing permissions and
19
* limitations under the License.
20
*
21
* Created on: Sep 23, 2013
22
*/
23
24
#include "
io/FileHash.h
"
25
#include <
ibrcommon/data/File.h
>
26
#include <
ibrcommon/refcnt_ptr.h
>
27
#include <vector>
28
#include <set>
29
#include <string>
30
31
#ifndef OBSERVEDFILE_H_
32
#define OBSERVEDFILE_H_
33
34
namespace
io
35
{
36
class
ObservedFile
37
{
38
public
:
39
ObservedFile
(
const
ibrcommon::File
&file);
40
virtual
~ObservedFile
();
41
42
bool
operator==
(
const
ObservedFile
&other)
const
;
43
bool
operator<
(
const
ObservedFile
&other)
const
;
44
48
void
update
();
49
53
size_t
getStableCounter
()
const
;
54
58
const
ibrcommon::File
&
getFile
()
const
;
59
63
void
findFiles
(std::set<ObservedFile> &files)
const
;
64
68
const
io::FileHash
&
getHash
()
const
;
69
70
private
:
71
io::FileHash
__hash()
const
;
72
73
static
ibrcommon::File
* __copy(
const
ibrcommon::File
&file);
74
75
refcnt_ptr<ibrcommon::File>
_file;
76
77
size_t
_stable_counter;
78
io::FileHash
_last_hash;
79
};
80
}
81
82
#endif
/* OBSERVEDFILE_H_ */
tools
src
io
ObservedFile.h
Generated on Thu Mar 27 2014 09:26:21 for IBR-DTNSuite by
1.8.4