+
    üÐj
  ã                   óÀ   € R t ^ RIHt  ! R R]4      t ! R R4      t ! R R4      t ! R R	4      t ! R
 R]4      t	 ! R R]4      t
 ! R R]
4      t ! R R]
4      tR# )zf
Twisted Python Roots: an abstract hierarchy representation for Twisted.

Maintainer: Glyph Lefkowitz
)Úreflectc                   ó   € ] tR t^tRtRtR# )ÚNotSupportedErrorzj
An exception meaning that the tree-manipulation operation
you're attempting to perform is not supported.
© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    Ú6/usr/lib/python3/dist-packages/twisted/python/roots.pyr   r      s   † õr   r   c                   ó4   a € ] tR t^t o RtRtR tR tRtV t	R# )ÚRequestzÓI am an abstract representation of a request for an entity.

I also function as the response.  The request is responded to by calling
self.write(data) until there is no data left and then calling
self.finish().
Nc                ób   € \        R\        P                  ! V P                  4      ,          4      h)z.Add some data to the response to this request.z%s.write©ÚNotImplementedErrorr   ÚqualÚ	__class__)ÚselfÚdatas   &&r   ÚwriteÚRequest.write"   s   € ä! *¬w¯|ª|¸D¿N¹NÓ/KÕ"KÓLÐLr   c                ób   € \        R\        P                  ! V P                  4      ,          4      h)zOThe response to this request is finished; flush all data to the network stream.z	%s.finishr   ©r   s   &r   ÚfinishÚRequest.finish&   s   € ä! +´·²¸T¿^¹^Ó0LÕ"LÓMÐMr   r   )
r   r   r	   r
   r   ÚwireProtocolr   r   r   Ú__classdictcell__©Ú__classdict__s   @r   r   r      s#   ø‡ € ñð €LòM÷Nð Nr   r   c                   ó*   a € ] tR t^+t o RtR tRtV tR# )ÚEntityaB  I am a terminal object in a hierarchy, with no children.

I represent a null interface; certain non-instance objects (strings and
integers, notably) are Entities.

Methods on this class are suggested to be implemented, but are not
required, and will be emulated on a per-protocol basis for types which do
not handle them.
c                ób   € \        R\        P                  ! V P                  4      ,          4      h)z_
I produce a stream of bytes for the request, by calling request.write()
and request.finish().
z	%s.renderr   ©r   Úrequests   &&r   ÚrenderÚEntity.render6   s!   € ô
 " +´·²¸T¿^¹^Ó0LÕ"LÓMÐMr   r   N)r   r   r	   r
   r   r'   r   r   r    s   @r   r#   r#   +   s   ø‡ € ñ÷Nð Nr   r#   c                   ó|   a € ] tR t^>t o RtRR ltR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tRtV tR# )Ú
CollectionzƒI represent a static collection of entities.

I contain methods designed to represent collections that can be dynamically
created.
Nc                ó,   € Ve	   Wn         R# / V n         R# )zInitialize me.N©Úentities)r   r-   s   &&r   Ú__init__ÚCollection.__init__E   s   € àÒØ$ŽMàˆDŽMr   c                ó8   € V P                   P                  V4      # )zaGet an entity that was added to me using putEntity.

This method will return 'None' if it fails.
)r-   Úget©r   Únames   &&r   ÚgetStaticEntityÚCollection.getStaticEntityL   s   € ð
 �}‰}× Ñ  Ó&Ð&r   c                ó   € R# )z^Subclass this to generate an entity on demand.

This method should return 'None' if it fails.
Nr   ©r   r3   r&   s   &&&r   ÚgetDynamicEntityÚCollection.getDynamicEntityS   s   ‚ r   c                ób   € V P                  V4      pVe   V# V P                  W4      pVe   V# R# )zîRetrieve an entity from me.

I will first attempt to retrieve an entity statically; static entities
will obscure dynamic ones.  If that fails, I will retrieve the entity
dynamically.

If I cannot retrieve an entity, I will return 'None'.
N)r4   r8   )r   r3   r&   Úents   &&& r   Ú	getEntityÚCollection.getEntityY   s;   € ð ×"Ñ" 4Ó(ˆØŠ?ØˆJØ×#Ñ# DÓ2ˆØŠ?ØˆJÙr   c                ó"   € W P                   V&   R# )z\Store a static reference on 'name' for 'entity'.

Raises a KeyError if the operation fails.
Nr,   ©r   r3   Úentitys   &&&r   Ú	putEntityÚCollection.putEntityj   s   € ð
 %�‰�dÓr   c                ó    € V P                   V R# )zQRemove a static reference for 'name'.

Raises a KeyError if the operation fails.
Nr,   r2   s   &&r   Ú	delEntityÚCollection.delEntityq   s   € ð
 �M‰M˜$Òr   c                ób   € \        R\        P                  ! V P                  4      ,          4      h)z>Store an entity for 'name', based on the content of 'request'.z%s.storeEntity©r   r   r   r   r7   s   &&&r   ÚstoreEntityÚCollection.storeEntityx   s    € äÐ 0´7·<²<ÀÇÁÓ3OÕ OÓPÐPr   c                ób   € \        R\        P                  ! V P                  4      ,          4      h)z?Remove an entity for 'name', based on the content of 'request'.z%s.removeEntityrG   r7   s   &&&r   ÚremoveEntityÚCollection.removeEntity|   s    € äÐ 1´G·L²LÀÇÁÓ4PÕ PÓQÐQr   c                ó6   € V P                   P                  4       # )z\Retrieve a list of all name, entity pairs that I store references to.

See getStaticEntity.
)r-   Úitemsr   s   &r   ÚlistStaticEntitiesÚCollection.listStaticEntities€   s   € ð
 �}‰}×"Ñ"Ó$Ð$r   c                ó   € . # )zQA list of all name, entity that I can generate on demand.

See getDynamicEntity.
r   r%   s   &&r   ÚlistDynamicEntitiesÚCollection.listDynamicEntities‡   ó	   € ð
 ˆ	r   c                óN   € V P                  4       V P                  V4      ,           # )zERetrieve a list of all name, entity pairs I contain.

See getEntity.
)rO   rR   r%   s   &&r   ÚlistEntitiesÚCollection.listEntitiesŽ   s#   € ð
 ×&Ñ&Ó(¨4×+CÑ+CÀGÓ+LÕLÐLr   c                ó6   € V P                   P                  4       # )z[Retrieve a list of the names of entities that I store references to.

See getStaticEntity.
)r-   Úkeysr   s   &r   ÚlistStaticNamesÚCollection.listStaticNames•   s   € ð
 �}‰}×!Ñ!Ó#Ð#r   c                ó   € . # )z\Retrieve a list of the names of entities that I store references to.

See getDynamicEntity.
r   r   s   &r   ÚlistDynamicNamesÚCollection.listDynamicNamesœ   rT   r   c                ó"   € V P                  4       # )zJRetrieve a list of all names for entities that I contain.

See getEntity.
)rZ   r%   s   &&r   Ú	listNamesÚCollection.listNames£   s   € ð
 ×#Ñ#Ó%Ð%r   r,   ©N)r   r   r	   r
   r   r.   r4   r8   r<   rA   rD   rH   rK   rO   rR   rV   rZ   r]   r`   r   r   r    s   @r   r*   r*   >   sX   ø‡ € ñôò'òòò"%ò òQòRò%òòMò$ò÷&ð &r   r*   c                   ó   € ] tR t^«tRtRtR# )ÚConstraintViolationz2An exception raised when a constraint is violated.r   Nr   r   r   r   rd   rd   «   s   † Ý<r   rd   c                   ó<   a € ] tR t^¯t o RtR tR tR tR tRt	V t
R# )ÚConstrainedz?A collection that has constraints on its names and/or entities.c                ó   € ^# )zÜA method that determines whether an entity may be added to me with a given name.

If the constraint is satisfied, return 1; if the constraint is not
satisfied, either return 0 or raise a descriptive ConstraintViolation.
r   r2   s   &&r   ÚnameConstraintÚConstrained.nameConstraint²   ó   € ñ r   c                ó   € ^# )zÊA method that determines whether an entity may be added to me.

If the constraint is satisfied, return 1; if the constraint is not
satisfied, either return 0 or raise a descriptive ConstraintViolation.
r   ©r   r@   s   &&r   ÚentityConstraintÚConstrained.entityConstraintº   rj   r   c                ó2   € \         P                  WV4       R # rb   )r*   rA   r?   s   &&&r   ÚreallyPutEntityÚConstrained.reallyPutEntityÂ   s   € Ü×Ñ˜T¨Ö0r   c                ó°   € V P                  V4      '       d6   V P                  V4      '       d   V P                  W4       R# \        R4      h\        R4      h)zVStore an entity if it meets both constraints.

Otherwise raise a ConstraintViolation.
zEntity constraint violated.zName constraint violated.N)rh   rm   rp   rd   r?   s   &&&r   rA   ÚConstrained.putEntityÅ   sL   € ð
 ×Ñ˜t×$Ò$Ø×$Ñ$ V×,Ò,Ø×$Ñ$ TÖ2ä)Ð*GÓHÐHä%Ð&AÓBÐBr   r   N)r   r   r	   r
   r   rh   rm   rp   rA   r   r   r    s   @r   rf   rf   ¯   s#   ø‡ € ÙIòòò1÷Cð Cr   rf   c                   ó4   a € ] tR t^Ót o Rt^ tR tR tRtV t	R# )ÚLockedz5A collection that can be locked from adding entities.c                ó   € ^V n         R# )é   N©Úlockedr   s   &r   ÚlockÚLocked.lockØ   s	   € ØˆŽr   c                ó$   € V P                   '       * # rb   rx   rl   s   &&r   rm   ÚLocked.entityConstraintÛ   s   € Ø—;‘;ŒÐr   rx   N)
r   r   r	   r
   r   ry   rz   rm   r   r   r    s   @r   ru   ru   Ó   s   ø‡ € Ù?à€Fò÷ð r   ru   c                   ó:   a € ] tR t^ßt o Rt]tR tR tR t	Rt
V tR# )Ú
Homogenousz•A homogenous collection of entities.

I will only contain entities that are an instance of the class or type
specified by my 'entityType' attribute.
c                ór   € \        WP                  4      '       d   ^# \        V RV P                   R24      h)rw   z of incorrect type (Ú))Ú
isinstanceÚ
entityTyperd   rl   s   &&r   rm   ÚHomogenous.entityConstraintè   s3   € Ü�fŸo™o×.Ò.Ùä%¨¨Ð0DÀTÇ_Á_ÐDUÐUVÐ&WÓXÐXr   c                ó   € R # )ÚNamer   r   s   &r   ÚgetNameTypeÚHomogenous.getNameTypeî   s   € Ùr   c                ó.   € V P                   P                  # rb   )rƒ   r   r   s   &r   ÚgetEntityTypeÚHomogenous.getEntityTypeñ   s   € Ø�‰×'Ñ'Ð'r   r   N)r   r   r	   r
   r   Úobjectrƒ   rm   r‡   rŠ   r   r   r    s   @r   r   r   ß   s&   ø‡ € ñð €JòYò÷(ð (r   r   N)r   Útwisted.pythonr   r   r   r   r#   r*   Ú	Exceptionrd   rf   ru   r   r   r   r   Ú<module>r�      st   ðñ
õ #ôÐ+ô ÷Nñ N÷*Nñ N÷&j&ñ j&ôZ=˜)ô =ô!C�*ô !CôH	ˆ[ô 	ô(�ö (r   