/*
 * LineReader.h
 *
 *  Created on: 20. 3. 2017
 *	  Author: Jan Travnicek
 */

#ifndef _LINE_READER_H_
#define _LINE_READER_H_

#include <string>

#include <readline/LineReader.h>

namespace cli {

/**
 * Line reader serves as a base class for adaptors reding from various source.
 */
class LineReader {
public:
	virtual bool readline ( std::string & line ) = 0;

	virtual void reset ( ) {
	}

public:
	LineReader ( ) = default;

	LineReader ( LineReader && ) noexcept = default;

	LineReader ( const LineReader & ) = delete;

	LineReader & operator = ( LineReader && ) noexcept = delete;

	LineReader & operator = ( const LineReader & ) = delete;

	virtual ~LineReader ( ) noexcept = default;
};

} // namespace cli

#endif /* _LINE_READER_H_ */
