pitasc.parameter_model
- class pitasc.parameter_model.Parameter(parameter_id, data_type, prototype, parent, reference_id=None, location_message='not_set')
- create_data_deepcopy(new_parent)
- get_child(idx=0)
- get_child_count()
- get_child_index(child)
- class pitasc.parameter_model.ParameterBasic(parameter_id, data_type, prototype, parent, reference_id=None, location_message='not_set')
- create_data_deepcopy(new_parent)
- get_child(idx=0)
- get_child_count()
- get_child_index(child)
- class pitasc.parameter_model.ParameterDict(parameter_id, data_type, prototype, parent, reference_id=None, location_message='not_set')
- append(parameter)
- class pitasc.parameter_model.ParameterList(parameter_id, data_type, prototype, parent, reference_id=None, location_message='not_set')
- append(parameter)
Appends a new parameter to the list.
Maintains the order of parameters.
Parameters will be automatically named uniquely by adding a suffix, e.g. ‘_no0’, ‘_no1’,… to the id, if id is already in the list.
This is a O(n) operation, with n being the number of entries with the same id, which is usually very small (1-100)
- class pitasc.parameter_model.ParameterModel(parameter_id, data_type, prototype, parent, reference_id=None, location_message='not_set')
- class Change
- child = 24
- child_created = 8
- child_deleted = 16
- created = 1
- data = 4
- data_type = 128
- deleted = 2
- description = 64
- parameter_id = 32
- parent = 512
- prototype = 256
- reference = 1024
- unchanged = 0
- add_referencer(parameter)
- clear_reference_cache()
- create_data_deepcopy(new_parent)
- create_deepcopy(new_parent, new_id=None)
- static create_parameter(parameter_id, data_type, prototype, parent, reference_id=None, location_message='not_set')
Factory method: Creates and returns a parameter based on data_type
- static create_root_parameter(model)
Creates and returns the root parameter for a model
- create_sub_parameter(parameter_id, data_type, parent, location_message)
- property data
- find_id(parameter_id, origin=None, indent=0)
Traverses upwards to find a parameter by id
- find_model(parameter_id, origin)
Traverses upwards to find a parameter type
- find_models(prototype, parameters=None, checked=None)
Traverses updwards and finds all parameters with a certain prototype
- find_reference(parameter_id, origin)
Traverses upwards by id and then downwards by path to find a parameter.
Parameters in the data field are prioritized over models in case both exist. Doesn’t prevent cycles, only self referencing!
- get_child(idx)
- get_child_count()
- get_child_index(child)
- get_children()
- get_index()
- get_model(name)
Check all own models and all own include files for the requested model type
- get_or_create_includes()
- get_or_create_meta()
- get_or_create_models()
- get_original()
- get_path(path=None)
- get_prototype_chain()
- property includes
- init_data()
- is_a(type_name)
- property meta
- property models
- property reference
- property reference_id
- remove_referencer(parameter)
- class pitasc.parameter_model.ParameterNone(parameter_id, prototype, parent, location_message='not_set')
- create_data_deepcopy(new_parent)
- get_child(idx=0)
- get_child_count()
- get_child_index(child)
- class pitasc.parameter_model.ParameterOrderedDict(parameter_id, data_type, prototype, parent, reference_id=None, location_message='not_set')
- create_data_deepcopy(new_parent)
- get_child(idx)
- get_child_count()
- get_child_index(child)
- get_children()
- init_data()
- insert(parameter, index)
- move(parameter, new_index)
- pop()
Removes the last parameter in the list.
- remove(parameter)