<reponame>Tombmyst/Empire
from empire.core import *
from abc import ABC, abstractmethod

from empire.strings.casing import WordCasing


class AbstractStruct(ABC):
    """
    Abstract class for struct. Used as a "forward declaration" in other classes, where if the actual Struct module would be imported, it would
    do a circular reference.
    """
    @abstractmethod
    def assign_values(self, raw: Any):
        raise NotImplementedError()

    @abstractmethod
    def copy_from(self, other):
        raise NotImplementedError()

    @abstractmethod
    def reset_cursor(self):
        raise NotImplementedError()

    @abstractmethod
    def set_cursor(self, loc: int = -1):
        raise NotImplementedError()

    @abstractmethod
    def set_cursor_to_field(self, field_name: str):
        raise NotImplementedError()

    @abstractmethod
    def get_loc(self) -> int:
        raise NotImplementedError()

    @abstractmethod
    def get_raw_input(self) -> Any:
        raise NotImplementedError()

    @abstractmethod
    def reinit_values(self):
        raise NotImplementedError()

    @abstractmethod
    def get_fields(self) -> List[str]:
        raise NotImplementedError()

    @abstractmethod
    def get_number_of_fields(self) -> int:
        raise NotImplementedError()

    @abstractmethod
    def set_default_behavior_export_nones(self, state: bool):
        raise NotImplementedError()

    @abstractmethod
    def set_default_behavior_export_casing_format(self, casing: WordCasing):
        raise NotImplementedError()

    @abstractmethod
    def to_dict(self, casing: Union[WordCasing, None] = None, export_nones: bool = None) -> JSON:
        raise NotImplementedError()

    @abstractmethod
    def to_tuple(self) -> NamedTuple:
        raise NotImplementedError()

    @abstractmethod
    def post_initialization(self):
        raise NotImplementedError()

    @abstractmethod
    def custom_dict_serialization(self) -> Union[JSON, None]:
        raise NotImplementedError()

    @abstractmethod
    def load(self, file: str, mode: int = 0, serialization_format: int = 1) -> bool:
        raise NotImplementedError()

    @abstractmethod
    def save(self, file: str, mode: int = 0, serialization_format_flags: int = 1) -> bool:
        raise NotImplementedError()

from empire.core import *
from abc import ABC, abstractmethod

from empire.strings.casing import WordCasing


class AbstractStruct(ABC):
    """
    Abstract class for struct. Used as a "forward declaration" in other classes, where if the actual Struct module would be imported, it would
    do a circular reference.
    """
    @abstractmethod
    def assign_values(self, raw: Any):
        raise NotImplementedError()

    @abstractmethod
    def copy_from(self, other):
        raise NotImplementedError()

    @abstractmethod
    def reset_cursor(self):
        raise NotImplementedError()

    @abstractmethod
    def set_cursor(self, loc: int = -1):
        raise NotImplementedError()

    @abstractmethod
    def set_cursor_to_field(self, field_name: str):
        raise NotImplementedError()

    @abstractmethod
    def get_loc(self) -> int:
        raise NotImplementedError()

    @abstractmethod
    def get_raw_input(self) -> Any:
        raise NotImplementedError()

    @abstractmethod
    def reinit_values(self):
        raise NotImplementedError()

    @abstractmethod
    def get_fields(self) -> List[str]:
        raise NotImplementedError()

    @abstractmethod
    def get_number_of_fields(self) -> int:
        raise NotImplementedError()

    @abstractmethod
    def set_default_behavior_export_nones(self, state: bool):
        raise NotImplementedError()

    @abstractmethod
    def set_default_behavior_export_casing_format(self, casing: WordCasing):
        raise NotImplementedError()

    @abstractmethod
    def to_dict(self, casing: Union[WordCasing, None] = None, export_nones: bool = None) -> JSON:
        raise NotImplementedError()

    @abstractmethod
    def to_tuple(self) -> NamedTuple:
        raise NotImplementedError()

    @abstractmethod
    def post_initialization(self):
        raise NotImplementedError()

    @abstractmethod
    def custom_dict_serialization(self) -> Union[JSON, None]:
        raise NotImplementedError()

    @abstractmethod
    def load(self, file: str, mode: int = 0, serialization_format: int = 1) -> bool:
        raise NotImplementedError()

    @abstractmethod
    def save(self, file: str, mode: int = 0, serialization_format_flags: int = 1) -> bool:
        raise NotImplementedError()
Abstract class for struct. Used as a "forward declaration" in other classes, where if the actual Struct module would be imported, it would
     do a circular reference.