
    d                         d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	  G d d	ej
        e	          Z
 G d
 de          Z G d de
          ZdS )z(Here is defined the UnImplemented class.    N   )hdf5extension)SizeType)Node)Leafc                   F     e Zd ZdZdZ fdZd ZddZ	 	 dd	Zd
 Z	 xZ
S )UnImplementeda  This class represents datasets not supported by PyTables in an HDF5
    file.

    When reading a generic HDF5 file (i.e. one that has not been created with
    PyTables, but with some other HDF5 library based tool), chances are that
    the specific combination of datatypes or dataspaces in some dataset might
    not be supported by PyTables yet. In such a case, this dataset will be
    mapped into an UnImplemented instance and the user will still be able to
    access the complete object tree of the generic HDF5 file. The user will
    also be able to *read and write the attributes* of the dataset, *access
    some of its metadata*, and perform *certain hierarchy manipulation
    operations* like deleting or moving (but not copying) the node. Of course,
    the user will not be able to read the actual data on it.

    This is an elegant way to allow users to work with generic HDF5 files
    despite the fact that some of its datasets are not supported by
    PyTables. However, if you are really interested in having full access to an
    unimplemented dataset, please get in contact with the developer team.

    This class does not have any public instance variables or methods, except
    those inherited from the Leaf class (see :ref:`LeafClassDescr`).

    UNIMPLEMENTEDc                     d| _         	 t          d          | _        	 t          d          f| _        	 d| _        	 t                                          ||           dS )z$Create the `UnImplemented` instance.Fr   N)_v_newr   nrowsshape	byteordersuper__init__self
parentnodename	__class__s      4lib/python3.11/site-packages/tables/unimplemented.pyr   zUnImplemented.__init__'   s_    
 ?a[[
<qkk^
+	 	T*****    c                     |                                  \  | _        | _        }	 t          | j        d                   | _        n$# t
          $ r t          d          | _        Y nw xY w|S Nr   )_open_unimplementedr   r   r   r   
IndexError)r   	object_ids     r   _g_openzUnImplemented._g_open8   sl    262J2J2L2L/T^Y	%!$*Q-00DJJ 	% 	% 	%!!DJJJ	%s   A A%$A%Tc                 @    t          j        d| j        d           dS )zDo nothing.

        This method does nothing, but a ``UserWarning`` is issued.
        Please note that this method *does not return a new node*, but
        ``None``.

        zUnImplemented node z+ does not know how to copy itself; skippingN)warningswarn_v_pathnamer   	newparentnewname	recursive_logkwargss         r   _g_copyzUnImplemented._g_copy@   s2     	"	# 	# 	# tr   NFc                 &     | j         |||fi | dS )zDo nothing.

        This method does nothing, since `UnImplemented` nodes can not
        be copied.  However, a ``UserWarning`` is issued.  Please note
        that this method *does not return a new node*, but ``None``.

        N)r)   )r   r$   r%   	overwriter&   createparentsr(   s          r   _f_copyzUnImplemented._f_copyN   s'     	Y==f===tr   c                 \    d                     t          |           | j        j                  S )Nz{}
  NOTE: <The UnImplemented object represents a PyTables unimplemented
         dataset present in the '{}' HDF5 file.  If you want to see this
         kind of HDF5 dataset implemented in PyTables, please contact the
         developers.>
)formatstr_v_filefilenamer   s    r   __repr__zUnImplemented.__repr__]   s(    
 F3t99dl+,,	-r   T)NNFFF)__name__
__module____qualname____doc__
_c_classidr   r   r)   r-   r4   __classcell__r   s   @r   r	   r	      s         2 !J+ + + + +"      /3@E   - - - - - - -r   r	   c                   N     e Zd ZdZdZ fdZddZd ZddZd	 Z	d
 Z
d Z xZS )UnknownzThis class represents nodes reported as *unknown* by the underlying
    HDF5 library.

    This class does not have any public instance variables or methods, except
    those inherited from the Node class.

    UNKNOWNc                 Z    d| _         t                                          ||           dS )zCreate the `Unknown` instance.FN)r   r   r   r   s      r   r   zUnknown.__init__s   s,     T*****r   Fc                     d S N )r   r   r   inits       r   _g_newzUnknown._g_newy       r   c                     dS r   rC   r3   s    r   r   zUnknown._g_open|   s    qr   Tc                     d S rB   rC   r#   s         r   r)   zUnknown._g_copy   s    tr   c                     d S rB   rC   )r   parents     r   	_g_deletezUnknown._g_delete   rF   r   c                 8    | j         }| j        j        }| d| dS )Nz ())r"   r   r6   )r   pathname	classnames      r   __str__zUnknown.__str__   s+    #N+	**i****r   c                     | dS )Nz
  NOTE: <The Unknown object represents a node which is reported as
         unknown by the underlying HDF5 library, but that might be
         supported in more recent HDF5 versions.>
rC   r3   s    r   r4   zUnknown.__repr__   s        	r   )Fr5   )r6   r7   r8   r9   r:   r   rE   r   r)   rK   rP   r4   r;   r<   s   @r   r>   r>   g   s          J+ + + + +          + + +
      r   r>   c                       e Zd ZdZdS )OldIndexArray
IndexArrayN)r6   r7   r8   r:   rC   r   r   rS   rS      s        JJJr   rS   )r9   r     r   utilsr   noder   leafr   r	   r>   rS   rC   r   r   <module>rY      s    . .                         X- X- X- X- X-M/ X- X- X-x) ) ) ) )d ) ) )Z    M     r   