# Path: typepy/_typecode.py
# class Typecode(enum.Enum):
#     NONE = 0
#     INTEGER = 1 << 0
#     REAL_NUMBER = 1 << 1
#     STRING = 1 << 2
#     NULL_STRING = 1 << 3
#     DATETIME = 1 << 4
#     INFINITY = 1 << 5
#     NAN = 1 << 6
#     BOOL = 1 << 7
#     DICTIONARY = 1 << 8
#     LIST = 1 << 9
#     IP_ADDRESS = 1 << 10
#     BYTES = 1 << 11
# 
# Path: typepy/checker/_interface.py
# class TypeCheckerInterface(metaclass=abc.ABCMeta):
#     @abc.abstractmethod
#     def is_type(self) -> bool:  # pragma: no cover
#         pass
# 
#     @abc.abstractmethod
#     def validate(self) -> None:  # pragma: no cover
#         pass
# 
# Path: typepy/converter/_interface.py
# class ValueConverterInterface(metaclass=abc.ABCMeta):
#     @abc.abstractmethod
#     def force_convert(self):  # pragma: no cover
#         pass
# 
# Path: typepy/error.py
# class TypeConversionError(TypeError):
#     """
#     Exception raised when failed to convert data.
#     """


import abc
from typing import Any, Optional
from .._typecode import Typecode
from ..checker._interface import TypeCheckerInterface
from ..converter import ValueConverterInterface
from ..error import TypeConversionError
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""




class AbstractType(TypeCheckerInterface, ValueConverterInterface):
    __slots__ = (
        "_data",
        "_strict_level",
        "_params",
        "__checker",
        "__converter",
        "__is_type_result",
    )

    @abc.abstractproperty

# Path: typepy/_typecode.py
# class Typecode(enum.Enum):
#     NONE = 0
#     INTEGER = 1 << 0
#     REAL_NUMBER = 1 << 1
#     STRING = 1 << 2
#     NULL_STRING = 1 << 3
#     DATETIME = 1 << 4
#     INFINITY = 1 << 5
#     NAN = 1 << 6
#     BOOL = 1 << 7
#     DICTIONARY = 1 << 8
#     LIST = 1 << 9
#     IP_ADDRESS = 1 << 10
#     BYTES = 1 << 11
# 
# Path: typepy/checker/_interface.py
# class TypeCheckerInterface(metaclass=abc.ABCMeta):
#     @abc.abstractmethod
#     def is_type(self) -> bool:  # pragma: no cover
#         pass
# 
#     @abc.abstractmethod
#     def validate(self) -> None:  # pragma: no cover
#         pass
# 
# Path: typepy/converter/_interface.py
# class ValueConverterInterface(metaclass=abc.ABCMeta):
#     @abc.abstractmethod
#     def force_convert(self):  # pragma: no cover
#         pass
# 
# Path: typepy/error.py
# class TypeConversionError(TypeError):
#     """
#     Exception raised when failed to convert data.
#     """


# Path: typepy/type/_base.py
import abc
from typing import Any, Optional
from .._typecode import Typecode
from ..checker._interface import TypeCheckerInterface
from ..converter import ValueConverterInterface
from ..error import TypeConversionError

"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""




class AbstractType(TypeCheckerInterface, ValueConverterInterface):
    __slots__ = (
        "_data",
        "_strict_level",
        "_params",
        "__checker",
        "__converter",
        "__is_type_result",
    )

    @abc.abstractproperty

    def typecode(self) -> Typecode:  # pragma: no cover