Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
table.cpython-313.pyc71 linesDownload Raw Back to __pycache__
1�

2o�j���2�SSKJr SSKJr "SS\5rg)�)�encode)�number_typesc�d�\rSrSrSrSrSrSrSrSr	Sr3S	rS4rSr
SrS
rSrSrSrg)�Table�z�Table wraps a byte slice and provides read access to its data.5 6The variable `Pos` indicates the root of the FlatBuffers object therein.7)�Bytes�Posc�f�[R"U[R5 XlX lg)N)�N�enforce_number�
UOffsetTFlagsrr	)�self�buf�poss   �WD:\code\apps\devtools\python\user_packages\Python313\site-packages\flatbuffers/table.py�__init__�Table.__init__s �����S�!�/�/�*��J��H�c��URUR[RUR5-8nUR[RU5nX:a"UR[RX!-5$g)zpOffset provides access into the Table's vtable.9 10Deprecated fields are ignored by checking the vtable's length.11�)r	�Getr�
SOffsetTFlags�
VOffsetTFlags)r�vtableOffset�vtable�	vtableEnds    r�Offset�Table.Offset!sZ���X�X�������$�(�(�;�
;�F�������&�1�I���
�X�X�a�o�o�v�'<�
=�=�rc���[R"U[R5 U[R"[RR12URU5-$)z:Indirect retrieves the relative offset stored at `offset`.)rrr
rr�packer_typer)r�offs  r�Indirect�Table.Indirect-s<�����S�!�/�/�*�����A�O�O�7�7����S�I�I�Irc��[R"U[R5 U[R"[RR13URU5-
nU[RR-n[R"[RR14URU5n[URX"U-5$)z<String gets a string from data stored inside the flatbuffer.)	rrr
rrr r�	bytewidth�bytes)rr!�start�lengths    r�String�Table.String2s������S�!�/�/�*��6�:�:�a�o�o�1�1�4�:�:�s�C�C�C��!�/�/�+�+�+�E�
�Z�Z����3�3�T�Z�Z��
E�F�����E�F�N�3�4�4rc�Z�[R"U[R5 XR-
nU[R15"[RRURU5-
n[R16"[RRURU5nU$)z^VectorLen retrieves the length of the vector whose offset is stored17 18at "off" in this object.19)rrr
r	rrr r)rr!�rets   r�	VectorLen�Table.VectorLen:sm��20���S�!�/�/�*��8�8�O�C��6�:�:�a�o�o�1�1�4�:�:�s�C�C�C�21�*�*�Q�_�_�0�0�$�*�*�c�22B�C��Jrc���[R"U[R5 XR-
nXR	[RU5-nU[RR23-
nU$)zbVector retrieves the start of data of the vector whose offset is24 25stored at "off" in this object.26)rrr
r	rr%)rr!�xs   r�Vector�Table.VectorFsS��27���S�!�/�/�*��8�8�O�C��h�h�q����,�,�A�����	"�	"�"�A��Hrc��[U5[Lde[R"U[R5 X R28-
nX R
[RU5-UlURUlg)zUUnion initializes any Table-derived type to point to the union at29 30the given offset.31N)�typerrrr
r	rr)r�t2r!s   r�Union�Table.UnionSsY��32��8�u�������S�!�/�/�*��8�8�O�C�
�8�8�A�O�O�S�1�
1�B�F��z�z�B�Hrc���[R"U[R5 UR[R33"URURU55$)zNGet retrieves a value of the type specified by `flags`  at the34 35given offset.36)rrr
�py_typerrr r)r�flagsr!s   rr�	Table.Get_s>��37���S�!�/�/�*��=�=����E�$5�$5�t�z�z�3�G�H�Hrc���[R"U[R5 Ub[R"X#5 URU5nUS:XaU$UR	X0R38U-5$)Nr)rrrrrr	)r�slot�d�validator_flagsr!s     r�GetSlot�
Table.GetSlotgs[�����T�1�?�?�+��"����q�*�39�+�+�d�40�C�41�a�x�
�h��8�8�O�X�X��^�4�4rc��URU5nURU5n[R"U5n[R42"XPRXC5$)z�GetVectorAsNumpy returns the vector that starts at `Vector(off)`43 44as a numpy array with the type specified by `flags`. The array is45a `view` into Bytes, so modifying the returned array will46modify Bytes in place.47)r1r-r�
to_numpy_typer�GetVectorAsNumpyr)rr:r!�offsetr(�numpy_dtypes      rrD�Table.GetVectorAsNumpypsE���[�[��
�F�
�^�^�C�
 �F��/�/�%�(�K��"�"�;�48�49�F�K�Krc�p�[R"U5n[R"X@RX25$)z�GetArrayAsNumpy returns the array with fixed width that starts at `Vector(offset)`50 51with length `length` as a numpy array with the type specified by `flags`.52The53array is a `view` into Bytes so modifying the returned will modify Bytes in54place.55)rrCrrDr)rr:r!r(rFs     r�GetArrayAsNumpy�Table.GetArrayAsNumpy|s)���/�/�%�(�K��"�"�;�56�57�F�H�Hrc���[R"U[R5 [R"U[R5 URU5nUS:XaU$U$)z�GetVOffsetTSlot retrieves the VOffsetT that the given vtable location58 59points to. If the vtable value is zero, the default value `d`60will be returned.61r)rrrr)rr=r>r!s    r�GetVOffsetTSlot�Table.GetVOffsetTSlot�sK�����T�1�?�?�+����Q����(�62�+�+�d�63�C�64�a�x�
�h��JrN)�__name__�65__module__�__qualname__�__firstlineno__�__doc__�	__slots__rrr"r)r-r1r6rr@rDrIrL�__static_attributes__�rrrrsN���66�)��67
�J�685�69�
�70�I�5�71L�	I�
rrN)�rrr�objectrrUrr�<module>rXs����A�F�Ar
codekingpro/portable-devtools · Team Ai