srecord  1.65.0
length.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_LENGTH_H
21 #define SRECORD_INPUT_FILTER_INTERVAL_LENGTH_H
22 
24 
25 namespace srecord {
26 
27 /**
28  * The srecord::input_filter_interval_length class is used to represent a
29  * filter which injects the maximum minus minimum addresses of the data
30  * into the data.
31  */
34 {
35 public:
36  /**
37  * The destructor.
38  */
40 
41 private:
42  /**
43  * The constructor.
44  *
45  * @param deeper
46  * The input source to be filtered.
47  * @param address
48  * The address at which to place the length.
49  * @param length
50  * The number of bytes of length to be inserted.
51  * @param end
52  * The byte order.
53  * @param width
54  * The number of bytes per unit of length.
55  * @param inclusive
56  * true if the output location is included in the address
57  * range, false if not
58  */
60  long address, int length, endian_t end, int width, bool inclusive);
61 
62 public:
63  /**
64  * The create class method is used to create a new dynamically
65  * allocated instance of this class.
66  *
67  * @param deeper
68  * The input source to be filtered.
69  * @param address
70  * The address at which to place the length.
71  * @param length
72  * The number of bytes of length to be inserted.
73  * @param end
74  * The byte order.
75  * @param width
76  * The number of bytes per unit of length.
77  * @param inclusive
78  * true if the output location is included in the address
79  * range, false if not
80  */
81  static pointer create(const input::pointer &deeper, long address,
82  int length, endian_t end, int width, bool inclusive);
83 
84 protected:
85  // See base class for documentation.
86  long calculate_result() const;
87 
88 private:
89  /**
90  * The number of bytes per unit of length.
91  */
92  int width;
93 
94  /**
95  * The default constructor.
96  */
98 
99  /**
100  * The copy constructor.
101  */
103 
104  /**
105  * The assignment operator.
106  */
107  input_filter_interval_length &operator=(
109 };
110 
111 };
112 
113 // vim: set ts=8 sw=4 et :
114 #endif // SRECORD_INPUT_FILTER_INTERVAL_LENGTH_H
The srecord::input_filter_interval_length class is used to represent a filter which injects the maxim...
Definition: length.h:34
virtual ~input_filter_interval_length()
The destructor.
static pointer create(const input::pointer &deeper, long address, int length, endian_t end, int width, bool inclusive)
The create class method is used to create a new dynamically allocated instance of this class.
long calculate_result() const
The calculate_result method is used to calculate the final value to be placed into the output.
The srecord::input_filter_interval class is used to represent a filter which works with the interval ...
Definition: interval.h:35
std::shared_ptr< input > pointer
Definition: input.h:41
endian_t
Definition: endian.h:27