srecord: input/filter/interval/maximum.h Source File

srecord 1.65.0

Loading...
Searching...
No Matches
maximum.h
Go to the documentation of this file.
1//
2// srecord - Manipulate EPROM load files
3// Copyright (C) 2008-2011 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_INPUT_FILTER_INTERVAL_MAXIMUM_H
21#define SRECORD_INPUT_FILTER_INTERVAL_MAXIMUM_H
22
23#include <srecord/input/filter/interval.h>
24
25namespace srecord
26{
27
28/**
29 * The srecord::input_filter_interval_maximum class is used to represent a
30 * filter which injects the maximum address (last used address + 1) of
31 * the data into the data.
32 */
33 class input_filter_interval_maximum:
34 public input_filter_interval
35{
36public:
37 /**
38 * The destructor.
39 */
40 virtual ~input_filter_interval_maximum();
41
42private:
43 /**
44 * The constructor.
45 *
46 * @param deeper
47 * The input source to be filtered.
48 * @param address
49 * The address at which to place the maximum address.
50 * @param length
51 * The number of bytes of the maximum address to be inserted.
52 * @param end
53 * The byte order.
54 * @param inclusive
55 * true if the output location is included in the address
56 * range, false if not
57 */
58 input_filter_interval_maximum(const input::pointer &deeper, long address,
59 int length, endian_t end, bool inclusive);
60
61public:
62 /**
63 * The constructor.
64 *
65 * @param deeper
66 * The input source to be filtered.
67 * @param address
68 * The address at which to place the maximum address.
69 * @param length
70 * The number of bytes of the maximum address to be inserted.
71 * @param end
72 * The byte order.
73 * @param inclusive
74 * true if the output location is included in the address
75 * range, false if not
76 */
77 static pointer create(const input::pointer &deeper, long address,
78 int length, endian_t end, bool inclusive);
79
80protected:
81 // See base class for documentation.
82 long calculate_result() const;
83
84private:
85 /**
86 * The default constructor. Do not use.
87 */
88 input_filter_interval_maximum();
89
90 /**
91 * The copy constructor. Do not use.
92 */
93 input_filter_interval_maximum(const input_filter_interval_maximum &);
94
95 /**
96 * The assignment operator. Do not use.
97 */
98 input_filter_interval_maximum &operator=(
99 const input_filter_interval_maximum &);
100};
101
102};
103
104// vim: set ts=8 sw=4 et :
105#endif // SRECORD_INPUT_FILTER_INTERVAL_MAXIMUM_H
srecord::input_filter_interval_maximum::~input_filter_interval_maximum
virtual ~input_filter_interval_maximum()
The destructor.
srecord::input_filter_interval_maximum::calculate_result
long calculate_result() const
The calculate_result method is used to calculate the final value to be placed into the output.
srecord::input_filter_interval_maximum::create
static pointer create(const input::pointer &deeper, long address, int length, endian_t end, bool inclusive)
The constructor.
srecord::input_filter_interval::input_filter_interval
input_filter_interval(const input::pointer &deeper, long address, int length, endian_t end, bool inclusive)
The constructor.
srecord::input::pointer
std::shared_ptr< input > pointer
Definition input.h:41
interval.h
srecord
Definition adler16.h:25
srecord::endian_t
endian_t
Definition endian.h:27