o
    ÝîiM  ã                   @   sª   d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	m
Z
mZ dd„ ZG dd	„ d	eƒZG d
d„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZe eei¡ dS )z¦
The ``spyne.model.primitive`` package contains types with values that fit
in a single field.

See :mod:`spyne.protocol._model` for {to,from}_string implementations.
é    )Úabsolute_import)ÚSimpleModel)Ú
NATIVE_MAP)Ú
apply_pssmÚmsgpackÚxmlÚjsonc                 C   s6   | j d u rdS | j |¡}|d uo| ¡ dt|ƒfkS )NTr   )ÚpatternÚ_pattern_reÚmatchÚspanÚlen)ÚattrÚvalueÚm© r   ú[/var/www/html/LicenciasMIG/venv/lib/python3.10/site-packages/spyne/model/primitive/_base.pyÚre_match_with_span$   s   
r   c                   @   s&   e Zd ZdZdZG dd„ dejƒZdS )ÚAnyXmlzdAn xml node that can contain any number of sub nodes. It's represented by
    an ElementTree object.ÚanyTypec                   @   s   e Zd ZdZ	 dZdS )zAnyXml.AttributesN)Ú__name__Ú
__module__Ú__qualname__Ú	namespaceÚprocess_contentsr   r   r   r   Ú
Attributes6   s
    r   N)r   r   r   Ú__doc__Ú__type_name__r   r   r   r   r   r   r   0   s    r   c                       s    e Zd Ze‡ fdd„ƒZ‡  ZS )ÚAnyc                    ó6   t | dd¡ƒ}|dur||d< tt| ƒjdi |¤ŽS ©zsDuplicates cls and overwrites the values in ``cls.Attributes`` with
        ``**kwargs`` and returns the new class.Ústore_asNr   )r   ÚgetÚsuperr   Ú	customize©ÚclsÚkwargsr!   ©Ú	__class__r   r   r$   ?   ó   zAny.customize)r   r   r   Úclassmethodr$   Ú__classcell__r   r   r(   r   r   >   s    r   c                       s$   e Zd ZdZe‡ fdd„ƒZ‡  ZS )ÚAnyHtmlÚstringc                    r   r    )r   r"   r#   r-   r$   r%   r(   r   r   r$   N   r*   zAnyHtml.customize)r   r   r   r   r+   r$   r,   r   r   r(   r   r-   K   s    r-   c                       s>   e Zd ZdZdZeZG dd„ dejƒZe	‡ fdd„ƒZ
‡  ZS )ÚAnyDictz}A dict instance that can contain other dicts, iterables or primitive
    types. Its serialization is protocol-dependent.
    r   c                   @   s   e Zd ZdZdS )zAnyDict.AttributesN)r   r   r   r!   r   r   r   r   r   b   ó    r   c                    r   r    )r   r"   r#   r/   r$   r%   r(   r   r   r$   h   r*   zAnyDict.customize)r   r   r   r   r   ÚdictÚValuer   r   r+   r$   r,   r   r   r(   r   r/   Z   s    r/   c                   @   s&   e Zd ZdZG dd„ dejƒZdZdS )ÚBooleanz(Life is simple here. Just true or false.c                   @   s   e Zd ZeZdS )zBoolean.AttributesN)r   r   r   Úboolr!   r   r   r   r   r   w   r0   r   ÚbooleanN)r   r   r   r   r   r   r   r   r   r   r   r3   t   s    r3   N)r   Ú
__future__r   Úspyne.modelr   Úspyne.model.primitiver   Úspyne.model._baser   r   r   r   r   r   r   r-   r/   r3   Úupdater4   r   r   r   r   Ú<module>   s   
ÿ