ó
i4Vdc           @   sJ   d  d l  m Z d  d l m Z d  d l m Z d e f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   c_void_p(   t   GDALException(   t   sixt   GDALBasec           B   s;   e  Z d  Z d Z e Z d „  Z d „  Z e	 e e ƒ Z
 RS(   s   
    Base object for GDAL objects that has a pointer access property
    that controls access to the underlying C pointer.
    c         C   s*   |  j  r |  j  St d |  j j ƒ ‚ d  S(   Ns    GDAL %s pointer no longer valid.(   t   _ptrR   t	   __class__t   __name__(   t   self(    (    sj   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/gdal/base.pyt   _get_ptr   s    	c         C   sa   t  | t j ƒ r' |  j | ƒ |  _ n6 | d  k sE t  | |  j ƒ rQ | |  _ n t d ƒ ‚ d  S(   Ns   Incompatible pointer type(   t
   isinstanceR   t   integer_typest   ptr_typeR   t   Nonet	   TypeError(   R   t   ptr(    (    sj   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/gdal/base.pyt   _set_ptr   s
    N(   R   t
   __module__t   __doc__R   R   R    R   R   R   t   propertyR   (    (    (    sj   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/gdal/base.pyR      s   			
N(   t   ctypesR    t   django.contrib.gis.gdal.errorR   t   django.utilsR   t   objectR   (    (    (    sj   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/contrib/gis/gdal/base.pyt   <module>   s   