a
`8ab @ sH d dl mZ ddlmZ ddlmZ ddlmZ dZG dd de Z
d S )
)deepcopy )
Configuration)Setting)Source)ConfigurationManagerc @ s$ e Zd Zdd Zdd Zdd ZdS )r c C s || _ g | _d S )N)namesettings)selfr r H/home/carl/code/landscape/setoptconf-tmp/build/lib/setoptconf/manager.py__init__ s zConfigurationManager.__init__c C s$ t |tr| j| ntdd S )Nz$Can only add objects of type Setting)
isinstancer r append TypeError)r
settingr r r add s
zConfigurationManager.addc G s g }t |D ]D}t|tr&|| qt|trHt|trH|| qtdqt| jd}|D ]}|j t
| j| |d}qb| |S )NzAll sources must be a Source)r )managerparent)reversedr r r type
issubclassr r r Z
get_configr validate)r
sourcesZ
to_processsourceconfigr r r retrieve s
zConfigurationManager.retrieveN)__name__
__module____qualname__r
r r r r r r r s r N)copyr r r r r Zsource.baser __all__objectr r r r r