a ”ˆ«h³ã@sVddlmZddlmZddlmZddlZddlm Z ej   ¡Z Gdd„deƒZ dS)é)Ú ClassLoader)ÚParser)ÚFunctionNcsTeZdZdZ‡fdd„Zedd„ƒZdd„Zdd „Zd d „Z d d „Z dd„Z ‡Z S)Ú Repositoryzk Repository of functions used within TuneD profiles. The functions are loaded lazily (when first used). cstt|ƒ ¡i|_dS©N)ÚsuperrÚ__init__Ú _functions©Úself©Ú __class__©úG/usr/lib/python3.9/site-packages/tuned/profiles/functions/repository.pyrszRepository.__init__cCs|jSr)r r rrrÚ functionsszRepository.functionscCsd|_tj|_t|_dS)Nztuned.profiles.functions)Z _namespaceÚconstsZFUNCTION_PREFIXÚ_prefixrÚ _interfacer rrrÚ_set_loader_parameterssz!Repository._set_loader_parameterscCs,t d|¡| |¡}|ƒ}||j|<|S)Nzcreating function %s)ÚlogÚdebugZ load_classr )r Ú function_nameZ function_clsZfunction_instancerrrÚcreates   zRepository.createcCs||jvr| |¡S|j|Sr)r r)r rrrrÚ load_func%s  zRepository.load_funccCsJt||jƒsJ‚t d|¡t|j ¡ƒD]\}}||kr,|j|=q,dS)Nzremoving function %s)Ú isinstancerrrÚlistr Úitems)r ÚfunctionÚkÚvrrrÚdelete*s zRepository.deletecCst|ƒ |¡Sr)rÚexpand)r Úsrrrr!1szRepository.expand) Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚpropertyrrrrr r!Ú __classcell__rrr rr s   r)Ztuned.utils.class_loaderrZtuned.profiles.functions.parserrZtuned.profiles.functions.baserZ tuned.logsZtunedZ tuned.constsrZlogsÚgetrrrrrrÚs