from typing import Optional, Tuple, Union

class Hierarchy:
    def all_vars(self) -> VarIter: ...
    def top_scopes(self) -> ScopeIter: ...

class Scope:
    def name(self, hier: Hierarchy) -> str: ...
    def full_name(self, hier: Hierarchy) -> str: ...
    def vars(self, hier: Hierarchy) -> VarIter: ...
    def scopes(self, hier: Hierarchy) -> ScopeIter: ...

class ScopeIter:
    def __iter__(self) -> ScopeIter: ...
    def __next__(self) -> Scope: ...

class Var:
    def name(self, hier: Hierarchy) -> str: ...
    def full_name(self, hier: Hierarchy) -> str: ...
    def bitwidth(self) -> Optional[int]: ...

class VarIter:
    def __iter__(self) -> VarIter: ...
    def __next__(self) -> Var: ...

class TimeTable:
    def __getitem__(self, idx: int) -> int: ...

class Waveform:
    hierarchy: Hierarchy
    time_table: TimeTable

    def __init__(
        self,
        path: str,
        multi_threaded: bool = True,
        remove_scopes_with_empty_name: bool = False,
    ) -> None: ...
    def get_signal(self, var: Var) -> Signal: ...
    def get_signal_from_path(self, abs_hierarchy_path: str) -> Signal: ...

class Signal:
    def value_at_time(self, time: int) -> Union[int, str]: ...
    def value_at_idx(self, idx: int) -> Union[int, str]: ...
    def all_changes(self) -> SignalChangeIter: ...

class SignalChangeIter:
    def __iter__(self) -> SignalChangeIter: ...
    def __next__(self) -> Tuple[int, str]: ...
