sub new_trainer { }
+=head2 C<parser_class $session>
+
+Returns the class from which the parser for this tool output will be instanciated.
+
+This method must be implemented when subclassing.
+
+=cut
+
+sub parser_class;
+
=head2 C<report_class $session>
Returns the class in which suppression reports generated by this tool will be blessed.
Defaults to set L<Test::Valgrind::Component/started>.
-=head2 C<parse $session, $fh>
-
-Wraps around either L</parse_suppressions> or L</parse_analysis> depending on the running mode of the C<$session>.
-Croaks if the tool isn't started.
-
-=cut
-
-sub parse {
- my ($self, $sess, $fh) = @_;
-
- $self->_croak('Tool isn\'t started') unless $self->started;
+=head2 C<filter $session, $report>
- if ($sess->do_suppressions) {
- $self->parse_suppressions($sess, $fh);
- } else {
- $self->parse_analysis($sess, $fh);
- }
-}
-
-=head2 C<parse_suppressions $sesssion, $fh>
-
-Parse the suppression reports that the C<valgrind> process attached to the session C<$session> send through the filehandle C<$fh>.
-
-This method must be implemented when subclassing.
+The <$session> calls this method after receiving a report from the parser and before letting the command filter it.
+You can either return a mangled C<$report> (which does not need to be a clone of the original) or C<undef> if you want the action to ignore it completely.
-=cut
-
-sub parse_suppressions;
-
-=head2 C<parse_analysis $sesssion, $fh>
-
-Parse the error reports sent by the C<valgrind> process attached to the session C<$session> through the filehandle C<$fh>.
-
-This method must be implemented when subclassing.
+Defaults to the identity function.
=cut
-sub parse_analysis;
+sub filter { $_[2] }
=head2 C<finish $session>