a `8ab@sHddlmZddlmZddlmZddlmZdZGddde Z d S) )deepcopy) Configuration)Setting)Source)ConfigurationManagerc@s$eZdZddZddZddZdS)rcCs||_g|_dS)N)namesettings)selfrr H/home/carl/code/landscape/setoptconf-tmp/build/lib/setoptconf/manager.py__init__ szConfigurationManager.__init__cCs$t|tr|j|ntddS)Nz$Can only add objects of type Setting) isinstancerr append TypeError)r settingr r r adds zConfigurationManager.addcGsg}t|D]D}t|tr&||q t|trHt|trH||q tdq t|jd}|D]}|j t |j||d}qb| |S)NzAll sources must be a Source)r )managerparent) reversedrrrtype issubclassrrr Z get_configrvalidate)r sourcesZ to_processsourceconfigr r r retrieves      zConfigurationManager.retrieveN)__name__ __module__ __qualname__r rrr r r r r srN) copyrrrrrZ source.baser__all__objectrr r r r s