+
    Dfjp                     >    R t ^ RIHt  ! R R4      t ! R R4      tR# )z6
Generic sentence handling tools: hopefully reusable.
)Setc                   l   a  ] tR t^	t o Rt]! 4       tR t]R 4       t	R t
V 3R lR ltV 3R ltRtV tR	# )
_BaseSentencea  
A base sentence class for a particular protocol.

Using this base class, specific sentence classes can almost automatically
be created for a particular protocol.
To do this, fill the ALLOWED_ATTRIBUTES class attribute using
the C{getSentenceAttributes} class method of the producer::

    class FooSentence(BaseSentence):
        """
        A sentence for integalactic transmodulator sentences.

        @ivar transmogrificationConstant: The value used in the
            transmogrifier while producing this sentence, corrected for
            gravitational fields.
        @type transmogrificationConstant: C{Tummy}
        """
        ALLOWED_ATTRIBUTES = FooProtocol.getSentenceAttributes()

@ivar presentAttributes: An iterable containing the names of the
    attributes that are present in this sentence.
@type presentAttributes: iterable of C{str}

@cvar ALLOWED_ATTRIBUTES: A set of attributes that are allowed in this
    sentence.
@type ALLOWED_ATTRIBUTES: C{set} of C{str}
c                    Wn         R# )z
Initializes a sentence with parsed sentence data.

@param sentenceData: The parsed sentence data.
@type sentenceData: C{dict} (C{str} -> C{str} or L{None})
N_sentenceData)selfsentenceDatas   &&?/usr/lib/python3/dist-packages/twisted/positioning/_sentence.py__init___BaseSentence.__init__(   s
     *    c                ,    \        V P                  4      # )z
An iterable containing the names of the attributes that are present in
this sentence.

@return: The iterable of names of present attributes.
@rtype: iterable of C{str}
)iterr   )r   s   &r
   presentAttributes_BaseSentence.presentAttributes1   s     D&&''r   c                    WP                   9   d   V P                  P                  VR4      # V P                  P                  pV RV R2p\        V4      h)z%
Gets an attribute of this sentence.
Nz sentences have no z attributes)ALLOWED_ATTRIBUTESr   get	__class____name__AttributeError)r   name	classNamemsgs   &&  r
   __getattr___BaseSentence.__getattr__<   sV     ***%%))$55//IK24&DC %%r   c                    < V ^8  d   QhRS[ /# )   return)str)format__classdict__s   "r
   __annotate___BaseSentence.__annotate__G   s     < <# <r   c                J   V P                   P                  4       p\        V4       UUu. uF  w  r#VR8w  g   K  V RV 2NK  	  pppRP                  V4      pV P                   P	                  R4      ;'       g    RpV P
                  P                  pRV RV RV R2# u uppi )	zx
Returns a textual representation of this sentence.

@return: A textual representation of this sentence.
@rtype: C{str}
typez: z, zunknown type<z (z) {z}>)r   itemssortedjoinr   r   r   )r   r(   kvdatadataReprtypeReprr   s   &       r
   __repr___BaseSentence.__repr__G   s     ""((*(.uEf1#RsE99T?%%))&1CC^NN++	9+RzhZs;; Fs
   BBc                6   < V ^8  d   Qh/ S[ S[,          ;R&   # )r   r   )r   r    )r!   r"   s   "r
   r#   r$   	   s     : C(; r   r   N)r   
__module____qualname____firstlineno____doc__setr   r   propertyr   r   r0   __annotate_func____static_attributes____classdictcell__r"   s   @r
   r   r   	   sD     8 $'5* ( (	&< <}  r   r   c                   4   a  ] tR t^Xt o Rt]R 4       tRtV tR# )!_PositioningSentenceProducerMixina  
A mixin for certain protocols that produce positioning sentences.

This mixin helps protocols that store the layout of sentences that they
consume in a C{_SENTENCE_CONTENTS} class variable provide all sentence
attributes that can ever occur. It does this by providing a class method,
C{getSentenceAttributes}, which iterates over all sentence types and
collects the possible sentence attributes.
c                    R0pV P                   P                  4        F#  pV F  pVf   K	  VP                  V4       K  	  K%  	  V# )a  
Returns a set of all attributes that might be found in the sentences
produced by this protocol.

This is basically a set of all the attributes of all the sentences that
this protocol can produce.

@return: The set of all possible sentence attribute names.
@rtype: C{set} of C{str}
r&   )_SENTENCE_CONTENTSvaluesadd)cls
attributesattributeList	attributes   &   r
   getSentenceAttributes7_PositioningSentenceProducerMixin.getSentenceAttributesc   sK     X
 33::<M*	$y) + = r    N)	r   r3   r4   r5   r6   classmethodrG   r:   r;   r<   s   @r
   r>   r>   X   s       r   r>   N)r6   typingr   r   r>   rI   r   r
   <module>rL      s&    L< L<^ r   