srecord 1.65.0
 
Loading...
Searching...
No Matches
continuity.h
Go to the documentation of this file.
1//
2// srecord - manipulate eprom load files
3// Copyright (C) 2006-2008, 2010 Peter Miller
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation; either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU Lesser General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this program. If not, see
17// <http://www.gnu.org/licenses/>.
18//
19
20#ifndef SRECORD_MEMORY_WALKER_CONTINUITY_H
21#define SRECORD_MEMORY_WALKER_CONTINUITY_H
22
24
25namespace srecord
26{
27
28/**
29 * The srecord::memory_walker_crc16 class is used to represent the parse
30 * state of a memory walker which determines whether or not the data
31 * are continuous.
32 */
33class memory_walker_continuity:
34 public memory_walker
35{
36public:
37 typedef std::shared_ptr<memory_walker_continuity> pointer;
38
39 /**
40 * The destructror.
41 */
43
44private:
45 /**
46 * The default constructor. It is private on purpose, use the
47 * #create class method instead.
48 */
49 memory_walker_continuity();
50
51public:
52 /**
53 * The create class method is used to create new dynamically
54 * allocated instances of class.
55 */
56 static pointer create();
57
58 /**
59 * The is_continuous method is used to get the results of the
60 * calculation.
61 *
62 * @returns
63 * true if the data has no holes, false if there are holes
64 */
65 bool is_continuous() const;
66
67protected:
68 // See base class for documentation.
69 void observe(unsigned long, const void *, int);
70
71private:
72 unsigned long current_address;
73 bool data_seen;
74 int nholes;
75
76 /**
77 * The copy constructor. No not use.
78 */
79 memory_walker_continuity(const memory_walker_continuity &);
80
81 /**
82 * The assignment operator. No not use.
83 */
84 memory_walker_continuity &operator=(const memory_walker_continuity &);
85};
86
87};
88
89#endif // SRECORD_MEMORY_WALKER_CONTINUITY_H
void observe(unsigned long, const void *, int)
The observe method is used by the memory walker to provide data.
std::shared_ptr< memory_walker_continuity > pointer
Definition continuity.h:37
virtual ~memory_walker_continuity()
The destructror.
bool is_continuous() const
The is_continuous method is used to get the results of the calculation.
static pointer create()
The create class method is used to create new dynamically allocated instances of class.
memory_walker()
The default constructor.