# Copyright (c) 2015 Hong Xu <hong@topbug.net>

# This file is part of ParamComparison.

# ParamComparison is free software: you can redistribute it and/or modify it under the terms of the

# ParamComparison is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public License along with
# ParamComparison. If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function

import abc
import six

"""
The base class for all readers, which define how to read and process data.
"""

@abc.abstractmethod
"""
:type params: dict
:param params: A dict which contains the values of parameters.

:return: The entry corresponding to the parameters.
:rtype: str
"""
raise NotImplementedError

"""
A class which relays the reading to a user function.
"""

def __init__(self, func, data):
"""
:type func: function
:param func: A user function which takes two parameters: data and params. The
function is defined by user and will be called in :func:read.
"""
self.func = func
self.data = data

params, and the second parameter of the data variable passed in in :func:__init__.
:return: What func returns.
.. seealso:: :func:Reader.read.