def __init__(self, structT, instantiateFieldFn, masterDir=DIRECTION.OUT, loadConfig=True): Interface.__init__(self, masterDir=masterDir, loadConfig=loadConfig) self._structT = structT self._instantiateFieldFn = instantiateFieldFn self._fieldsToInterfaces = {}
def __init__(self, structT: HStruct, field_path: Tuple[Union[str, int], ...], instantiateFieldFn, masterDir=DIRECTION.OUT, loadConfig=True): Interface.__init__(self, masterDir=masterDir, loadConfig=loadConfig) if not field_path: field_path = tuple() self._field_path = field_path self._structT = structT self._instantiateFieldFn = instantiateFieldFn self._fieldsToInterfaces = {}
def __init__(self, structT: HStruct, field_path: TypePath, instantiateFieldFn, masterDir=DIRECTION.OUT, loadConfig=True): Interface.__init__(self, masterDir=masterDir, loadConfig=loadConfig) if not field_path: field_path = TypePath() else: assert isinstance(field_path, TypePath), field_path self._field_path = field_path self._structT = structT self._instantiateFieldFn = instantiateFieldFn self._fieldsToInterfaces = {}
def __init__(self, structT: HStruct, field_path: TypePath, instantiateFieldFn, masterDir=DIRECTION.OUT, loadConfig=True): Interface.__init__(self, masterDir=masterDir, loadConfig=loadConfig) if not field_path: field_path = TypePath() else: assert isinstance(field_path, TypePath), field_path self._field_path = field_path self._dtype = structT assert self._dtype.fields, "Needs to have at least some mebers (othervise this interface is useless)" self._instantiateFieldFn = instantiateFieldFn self._fieldsToInterfaces = {}