warn when a handler didn't complete its job

issue #16
for some reason I couldn't get it to work
it looked like the options weren't properly parsed
This commit is contained in:
Frédéric Mangano 2016-05-02 10:26:03 +02:00
parent 4de88d0ed2
commit 2ef9a825da
2 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,7 @@
#include "tags_handlers/stream_tags_handler.h"
#include <iostream>
using namespace opustags;
const int StreamTagsHandler::ALL_STREAMS = -1;
@ -41,6 +43,12 @@ bool StreamTagsHandler::done()
return work_finished;
}
void StreamTagsHandler::end_of_file()
{
if (!work_finished && streamno != ALL_STREAMS)
std::cerr << "warning: stream " << streamno << " wasn't found" << std::endl;
}
void StreamTagsHandler::list_impl(const Tags &)
{
}

View File

@ -19,6 +19,7 @@ namespace opustags {
void list(const int streamno, const Tags &) override;
bool edit(const int streamno, Tags &) override;
bool done() override;
void end_of_file() override;
protected:
virtual void list_impl(const Tags &);