EmbASP-Theoretic v7.1.0
|
Public Member Functions | |
def | __init__ (self) |
def | add_option (self, o) |
def | add_program (self, program) |
def | get_input_program (self, key) |
def | get_option_descriptor (self, key) |
def | remove_all (self) |
def | remove_option_from_id (self, option_id) |
def | remove_option_from_value (self, o) |
def | remove_program_from_value (self, p) |
def | remove_program_from_id (self, program_id) |
def | start_async (self, c, program_index=None, option_index=None) |
def | start_sync (self, program_index=None, option_index=None) |
A collection of InputProgram and OptionDescriptor. The subclasses have to implement start_async(Callback, List, List) and start_sync(List, List) methods.
def base.handler.Handler.__init__ | ( | self | ) |
def base.handler.Handler.add_option | ( | self, | |
o | |||
) |
Add a new element inside _options dict. The o parameter is the new OptionDescriptor instance. The method return the id associated whit the added OptionDescriptor instance.
def base.handler.Handler.add_program | ( | self, | |
program | |||
) |
Add a new element inside _programs dict. The program param is the InputProgram instance added to the collection. The method return the id associated whit the added InputProgram instance.
def base.handler.Handler.get_input_program | ( | self, | |
key | |||
) |
Returns the specified InputProgram element. The parameter key represents the id. The method return the InputProgram element associated with the given key.
def base.handler.Handler.get_option_descriptor | ( | self, | |
key | |||
) |
Returns the specified OptionDescriptor element. The parameter key represents the id. The method return the OptionDescriptor element associated with the given key.
def base.handler.Handler.remove_all | ( | self | ) |
Removes all the elements from _programs and _options. Both the collections will be empty after this method returns.
def base.handler.Handler.remove_option_from_id | ( | self, | |
option_id | |||
) |
Removes the element associated with the given id from _options dict. option_id represents the id associated with an element.
def base.handler.Handler.remove_option_from_value | ( | self, | |
o | |||
) |
Removes every occurrence of a specified OptionDescriptor element from _options dict. the parameter o represents the element to be removed. The method return true if one or more elements are removed, false otherwise
def base.handler.Handler.remove_program_from_id | ( | self, | |
program_id | |||
) |
Removes the element associated with the given id from _programs} dict. The parameter program_id represents the id associated with an element
def base.handler.Handler.remove_program_from_value | ( | self, | |
p | |||
) |
Removes every occurrence of a specified InputProgram element from _programs dict. The parameter p represents the element to be removed. The method returns true if one or more elements are removed, false otherwise
def base.handler.Handler.start_async | ( | self, | |
c, | |||
program_index = None , |
|||
option_index = None |
|||
) |
This method have to be implemented by subclasses to execute solver in an asynchronous way, if no parameters are given, the entire sets of programs and option are used.
Reimplemented in platforms.desktop.desktop_handler.DesktopHandler.
def base.handler.Handler.start_sync | ( | self, | |
program_index = None , |
|||
option_index = None |
|||
) |
This method have to be implemented by subclasses to execute solver in a synchronous way, if no parameters are given, the entire sets of programs and option are used.
Reimplemented in platforms.desktop.desktop_handler.DesktopHandler.