/** @file processor.h
 *
 *	Declaration of processing module interface.
 *
 *	Processing module controls processing of input datafiles.
 *
 *	(C) Ceslav Przywara 2008, MFF UK Prague
 *
 */

#ifndef _PROCESSOR_H
#define _PROCESSOR_H

#include <stdexcept>
#include <string>
#include <vector>

namespace ace {

/** Container for input filenames.
 */
typedef std::vector<std::string> filenames_t;

/** Exception class for indication of fatal error occurrence in process phase.
 */
class fatal_error: public std::runtime_error {
public:
	/**	@param message Error message.
	 */
	fatal_error(const std::string& message): std::runtime_error(message) {}
};

/** Procedure processes input datafiles from given list (filename).
 *	Extracts and stores extracted n-grams.
 *	@param files_to_process Container with filenames to process.
 *	@param files_total_size Size (in chars) of all files (if non-zero,
 *		progress will be reported).
 *	@throws fatal_error If fatal error happens while processing.
 */
void process(filenames_t& files_to_process, size_t files_total_size);

} // namespace ace

#endif
