Package qubx :: Module tree_native
[hide private]
[frames] | no frames]

Module tree_native

source code

Wrapper for qubtree shared library (gui mainly uses numpy variant from qubx.tree); this is the 'native' flavor, unless you have the obsolete _qubtree extension library.

Copyright 2007-2014 Research Foundation State University of New York This file is part of QUB Express.

QUB Express is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QUB Express is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License, named LICENSE.txt, in the QUB Express program directory. If not, see <http://www.gnu.org/licenses/>.

Classes [hide private]
  NodeStruct
  PNode
  Node
  Data
  DataRow
  DataCol
  Storage
Functions [hide private]
 
ploc(p) source code
 
NullNode() source code
 
Open(path, readOnly=False) source code
 
ReadBytes(bytes) source code
 
NodeDataAsArray(impl)
Returns a node's data as a 2-d numpy.array.
source code
Variables [hide private]
  qubtree = <CDLL 'libqubtree.so', handle 2c42940 at 7fd129ad9990>
  TYPES = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
  TYPENAMES = {0: 'empty', 1: 'unknown', 2: 'pointer', 3: 'strin...
  TYPES_NUMPY = [None, None, dtype('uint32'), dtype('uint8'), dt...
  TYPES_CTYPES = [None, <class 'ctypes.c_ubyte'>, <class 'ctypes...
  TYPE_OF_NUMPY = defaultdict(<function <lambda> at 0x7fd129ada2...
  SIZE_OF_TYPE = (0, 0, 4, 1, 1, 1, 2, 2, 4, 4, 8, 8, 4, 8, 10)
  QTR_FLAG_PRELOAD = 2
  QTR_FLAG_DATA_IN_NODE = 4
  QTR_FLAG_CHANGED = 4096
  QTR_FLAG_CHILDCHANGED = 8192
  QTR_TYPE_CHAR = 5
  QTR_TYPE_DOUBLE = 13
  QTR_TYPE_EMPTY = 0
  QTR_TYPE_FLOAT = 12
  QTR_TYPE_INT = 9
  QTR_TYPE_LDOUBLE = 14
  QTR_TYPE_LONG = 11
  QTR_TYPE_POINTER = 2
  QTR_TYPE_SHORT = 7
  QTR_TYPE_STRING = 3
  QTR_TYPE_UCHAR = 4
  QTR_TYPE_UINT = 8
  QTR_TYPE_ULONG = 10
  QTR_TYPE_UNKNOWN = 1
  QTR_TYPE_USHORT = 6
  __package__ = 'qubx'
  i = 14
Variables Details [hide private]

TYPENAMES

Value:
{0: 'empty',
 1: 'unknown',
 2: 'pointer',
 3: 'string',
 4: 'unsigned 8-bit int',
 5: 'signed 8-bit int',
 6: 'unsigned 16-bit int',
 7: 'signed 16-bit int',
...

TYPES_NUMPY

Value:
[None,
 None,
 dtype('uint32'),
 dtype('uint8'),
 dtype('uint8'),
 dtype('int8'),
 dtype('uint16'),
 dtype('int16'),
...

TYPES_CTYPES

Value:
[None,
 <class 'ctypes.c_ubyte'>,
 <class 'ctypes.c_uint'>,
 <class 'ctypes.c_char'>,
 <class 'ctypes.c_ubyte'>,
 <class 'ctypes.c_byte'>,
 <class 'ctypes.c_ushort'>,
 <class 'ctypes.c_short'>,
...

TYPE_OF_NUMPY

Value:
defaultdict(<function <lambda> at 0x7fd129ada230>, {'uint64': 10, 'int\
32': 9, 'int16': 7, 'complex128': 14, 'float64': 13, 'uint8': 4, 'int8\
': 5, 'uint16': 6, 'int64': 11, 'bool': 9, 'uint32': 8, 'float32': 12}\
)