srecord
1.65.0
Loading...
Searching...
No Matches
filter.h
Go to the documentation of this file.
1
//
2
// srecord - manipulate eprom load files
3
// Copyright (C) 1998-2003, 2005-2008, 2010, 2012 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_H
21
#define SRECORD_INPUT_FILTER_H
22
23
24
#include <
srecord/input.h
>
25
26
namespace
srecord
{
27
28
/**
29
* The srecord::input_filter class is an abstract interface for all of the
30
* various filters that can be applied to an incoming EPROM file.
31
*
32
* Each filter is-a input, but each also has-a deeper input, from which
33
* is obtained the data to be filtered.
34
*/
35
class
input_filter
:
36
public
input
37
{
38
public
:
39
/**
40
* The destructor.
41
*/
42
virtual
~input_filter
();
43
44
// See base class for documentation.
45
bool
read
(
class
record
&
record
);
46
47
// See base class for documentation.
48
std::string
filename
()
const
;
49
50
// See base class for documentation.
51
std::string
filename_and_line
()
const
;
52
53
// See base class for documentation.
54
const
char
*
get_file_format_name
()
const
;
55
56
// See base class for documentation.
57
void
disable_checksum_validation
();
58
59
protected
:
60
/**
61
* The constructor. Only derived classes may call.
62
*
63
* @param deeper
64
* The deeper input to be filtered.
65
*/
66
input_filter
(
input::pointer
deeper);
67
68
//
69
// I'd like this to be private, but srecord::input_filter_crc16 and
70
// srecord::input_filter_crc32 need to access it directly, rather than
71
// going through the srecord::input_filter::read method.
72
//
73
pointer
ifp
;
74
75
private
:
76
/**
77
* The default constructor. Do not use.
78
*/
79
input_filter
();
80
81
/**
82
* The copy constructor. Do not use.
83
*/
84
input_filter
(
const
input_filter
&);
85
86
/**
87
* The assignment operator. Do not use.
88
*/
89
input_filter
&operator=(
const
input_filter
&);
90
};
91
92
};
93
94
// vim: set ts=8 sw=4 et :
95
#endif
// SRECORD_INPUT_FILTER_H
srecord::input_filter::filename
std::string filename() const
The filename method is used to get the name of the input file being processed.
srecord::input_filter::disable_checksum_validation
void disable_checksum_validation()
The disable_checksum_validation method is used to have this input stream ignore checksum errors.
srecord::input_filter::filename_and_line
std::string filename_and_line() const
The filename_and_line method is used to get the name and current line number within the file.
srecord::input_filter::get_file_format_name
const char * get_file_format_name() const
The get_file_format_name method is used to find out the name of the file format being read.
srecord::input_filter::~input_filter
virtual ~input_filter()
The destructor.
srecord::input_filter::ifp
pointer ifp
Definition
filter.h:73
srecord::input_filter::input_filter
input_filter(input::pointer deeper)
The constructor.
srecord::input_filter::read
bool read(class record &record)
The read method is used to read one record from the input.
srecord::input::input
input()
The default constructor.
srecord::input::pointer
std::shared_ptr< input > pointer
Definition
input.h:41
srecord::record
The srecord::record class is used to represent a data record read from a file.
Definition
record.h:35
input.h
srecord
Definition
adler16.h:25
input
filter.h
Generated by
1.13.2