EmbASP-Theoretic v7.1.0
Public Member Functions | List of all members
base.handler.Handler Class Reference
Inheritance diagram for base.handler.Handler:
platforms.desktop.desktop_handler.DesktopHandler

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)
 

Detailed Description

A collection of InputProgram and OptionDescriptor.

The subclasses have to implement start_async(Callback, List, List)
and start_sync(List, List) methods.

Constructor & Destructor Documentation

◆ __init__()

def base.handler.Handler.__init__ (   self)

Member Function Documentation

◆ add_option()

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.

◆ add_program()

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.

◆ get_input_program()

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.

◆ get_option_descriptor()

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.

◆ remove_all()

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.

◆ remove_option_from_id()

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.

◆ remove_option_from_value()

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

◆ remove_program_from_id()

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

◆ remove_program_from_value()

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

◆ start_async()

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.

◆ start_sync()

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.


The documentation for this class was generated from the following file: