ok
Direktori : /lib/python3.6/site-packages/tuned/exports/__pycache__/ |
Current File : //lib/python3.6/site-packages/tuned/exports/__pycache__/controller.cpython-36.pyc |
3 �<�e� � @ s4 d dl mZ ddlZddlZG dd� dejj�ZdS )� )� interfaces� Nc s� e Zd ZdZ� fdd�Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Z� ZS )$�ExportsControllerz4 Controls and manages object interface exporting. c s$ t t| �j� g | _g | _d| _d S )NF)�superr �__init__� _exporters�_objects�_exports_initialized)�self)� __class__� � /usr/lib/python3.6/controller.pyr s zExportsController.__init__c C s | j j|� dS )zRegister objects exporter.N)r �append)r �instancer r r �register_exporter s z#ExportsController.register_exporterc C s | j j|� dS )zRegister object to be exported.N)r r )r r r r r �register_object s z!ExportsController.register_objectc C s t j|�ot|d�S )z8Check if method was marked with @exports.export wrapper.� export_params)�inspect�ismethod�hasattr)r �methodr r r �_is_exportable_method s z'ExportsController._is_exportable_methodc C s t j|�ot|d�S )z8Check if method was marked with @exports.signal wrapper.� signal_params)r r r )r r r r r �_is_exportable_signal s z'ExportsController._is_exportable_signalc C s t j|�ot|d�S )z>Check if method was marked with @exports.get_property wrapper.�property_get_params)r r r )r r r r r �_is_exportable_getter s z'ExportsController._is_exportable_getterc C s t j|�ot|d�S )z>Check if method was marked with @exports.set_property wrapper.�property_set_params)r r r )r r r r r �_is_exportable_setter$ s z'ExportsController._is_exportable_setterc C s: x4| j D ]*}|jd }|jd }|j|f|�|� qW dS )z!Register method to all exporters.r r N)r r Zexport)r r �exporter�args�kwargsr r r �_export_method( s z ExportsController._export_methodc C s: x4| j D ]*}|jd }|jd }|j|f|�|� qW dS )z!Register signal to all exporters.r r N)r r �signal)r r r r r r r r �_export_signal/ s z ExportsController._export_signalc C s: x4| j D ]*}|jd }|jd }|j|f|�|� qW dS )z*Register property getter to all exporters.r r N)r r Zproperty_getter)r r r r r r r r �_export_getter6 s z ExportsController._export_getterc C s: x4| j D ]*}|jd }|jd }|j|f|�|� qW dS )z*Register property setter to all exporters.r r N)r r Zproperty_setter)r r r r r r r r �_export_setter= s z ExportsController._export_setterc O s&