o
    Nrfv  ã                   @   s@   d dl mZ G dd„ deƒZG dd„ deƒZG dd„ deƒZdS )	é   )ÚKeyArgsConstructorc                   @   ó(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	Ú	TraversalzfTraversal method.

    Used by the tree rendering functions like :class:`~asciitree.LeftAligned`.
    c                 C   s   t ‚)z$Return a list of children of a node.)ÚNotImplementedError©ÚselfÚnode© r	   ú\/var/www/html/software/conda/envs/catlas/lib/python3.10/site-packages/asciitree/traversal.pyÚget_children	   ó   zTraversal.get_childrenc                 C   s   |S )z7Return a node representing the tree root from the tree.r	   ©r   Útreer	   r	   r
   Úget_root   r   zTraversal.get_rootc                 C   s   t |ƒS )z'Return the text associated with a node.)Ústrr   r	   r	   r
   Úget_text   s   zTraversal.get_textN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r	   r	   r	   r
   r      s
    r   c                   @   r   )	ÚDictTraversalzgTraversal suitable for a dictionary. Keys are tree labels, all values
    must be dictionaries as well.c                 C   s   t |d  ¡ ƒS )Nr   ©ÚlistÚitemsr   r	   r	   r
   r      ó   zDictTraversal.get_childrenc                 C   s   t | ¡ ƒd S ©Né    r   r   r	   r	   r
   r      r   zDictTraversal.get_rootc                 C   s   |d S r   r	   r   r	   r	   r
   r      s   zDictTraversal.get_textNr   r	   r	   r	   r
   r      s
    r   c                   @   s   e Zd ZdZdZdd„ ZdS )ÚAttributeTraversalzSAttribute traversal.

    Uses an attribute of a node as its list of children.
    Úchildrenc                 C   s   t || jƒS )N)ÚgetattrÚ	attributer   r	   r	   r
   r   *   s   zAttributeTraversal.get_childrenN)r   r   r   r   r!   r   r	   r	   r	   r
   r   #   s    r   N)Úutilr   r   r   r   r	   r	   r	   r
   Ú<module>   s    