sardanacontainer
This module is part of the Python Pool libray. It defines the base classes for a pool container element
Classes
SardanaContainer

- class SardanaContainer[source]
- A container class for sardana elements - add_element(e)[source]
- Adds a new - pool.PoolObjectto this container- Parameters:
- e ( - PoolObject) – the pool element to be added
- Return type:
 
 - remove_element(e)[source]
- Removes the - pool.PoolObjectfrom this container- Parameters:
- e ( - PoolObject) – the pool object to be removed
- Throw:
- KeyError 
- Return type:
 
 - get_element_id_map()[source]
- Returns a reference to the internal pool object ID map - Return type:
- Returns:
- the internal pool object ID map 
 
 - get_element_name_map()[source]
- Returns a reference to the internal pool object name map - Return type:
- Returns:
- the internal pool object name map 
 
 - get_element_type_map()[source]
- Returns a reference to the internal pool object type map - Return type:
- Dict[- ElementType,- Dict[- int,- PoolObject]]
- Returns:
- the internal pool object type map 
 
 - get_element(**kwargs)[source]
- Returns a reference to the requested pool object - Parameters:
- kwargs ( - Any) – if key ‘id’ given: search by ID else if key ‘full_name’ given: search by full name else if key ‘name’ given: search by name
- Return type:
- Returns:
- the pool object 
- Throw:
- KeyError 
 
 - get_element_by_name(name, **kwargs)[source]
- Returns a reference to the requested pool object - Parameters:
- name ( - str) – pool object name
- Return type:
- Returns:
- the pool object 
- Throw:
- KeyError 
 
 - get_element_by_full_name(full_name, **kwargs)[source]
- Returns a reference to the requested pool object - Parameters:
- name – pool object full name 
- Return type:
- Returns:
- the pool object 
- Throw:
- KeyError 
 
 - get_element_by_id(id, **kwargs)[source]
- Returns a reference to the requested pool object - Parameters:
- id ( - int) – pool object ID
- Return type:
- Returns:
- the pool object 
- Throw:
- KeyError 
 
 - get_elements_by_type(t)[source]
- Returns a list of all pool objects of the given type - Parameters:
- t ( - ElementType) – element type
- Return type:
- Returns:
- list of pool objects