win2xcur/win2xcur/parser/base.py

19 lines
400 B
Python
Raw Permalink Normal View History

2020-09-27 00:53:23 -04:00
from abc import ABCMeta, abstractmethod
from typing import List
from win2xcur.cursor import CursorFrame
class BaseParser(metaclass=ABCMeta):
blob: bytes
frames: List[CursorFrame]
@abstractmethod
def __init__(self, blob: bytes) -> None:
self.blob = blob
@classmethod
@abstractmethod
def can_parse(cls, blob: bytes) -> bool:
raise NotImplementedError()