Coverage for HMpTy/htm/_htmcCode.py : 69%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from __future__ import absolute_import
3# This file was automatically generated by SWIG (http://www.swig.org).
4# Version 2.0.11
5#
6# Do not make changes to this file unless you know what you are doing--modify
7# the SWIG interface file instead.
9from builtins import object
10from sys import version_info
11if version_info >= (2, 6, 0):
12 def swig_import_helper():
14 try:
15 import importlib
16 _htmc = importlib.import_module('._htmc', package='HMpTy.htm')
17 return _htmc
18 except:
19 pass
21 from os.path import dirname
22 import imp
23 fp = None
24 try:
25 fp, pathname, description = imp.find_module(
26 '_htmc', [dirname(__file__)])
27 except ImportError:
28 from . import _htmc
29 print("HERER")
30 return _htmc
31 if fp is not None:
32 try:
33 _mod = imp.load_module('_htmc', fp, pathname, description)
34 finally:
35 fp.close()
36 print(_mod)
37 return _mod
38 _htmc = swig_import_helper()
39 del swig_import_helper
40else:
41 from . import _htmc
42del version_info
43try:
44 _swig_property = property
45except NameError:
46 pass # Python < 2.2 doesn't have 'property'.
49def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
50 if (name == "thisown"):
51 return self.this.own(value)
52 if (name == "this"):
53 if type(value).__name__ == 'SwigPyObject':
54 self.__dict__[name] = value
55 return
56 method = class_type.__swig_setmethods__.get(name, None)
57 if method:
58 return method(self, value)
59 if (not static):
60 self.__dict__[name] = value
61 else:
62 raise AttributeError("You cannot add attributes to %s" % self)
65def _swig_setattr(self, class_type, name, value):
66 return _swig_setattr_nondynamic(self, class_type, name, value, 0)
69def _swig_getattr(self, class_type, name):
70 if (name == "thisown"):
71 return self.this.own()
72 method = class_type.__swig_getmethods__.get(name, None)
73 if method:
74 return method(self)
75 raise AttributeError(name)
78def _swig_repr(self):
79 try:
80 strthis = "proxy of " + self.this.__repr__()
81 except:
82 strthis = ""
83 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
85try:
86 _object = object
87 _newclass = 1
88except AttributeError:
89 class _object(object):
90 pass
91 _newclass = 0
94class HTMC(_object):
95 __swig_setmethods__ = {}
96 __setattr__ = lambda self, name, value: _swig_setattr(
97 self, HTMC, name, value)
98 __swig_getmethods__ = {}
99 __getattr__ = lambda self, name: _swig_getattr(self, HTMC, name)
100 __repr__ = _swig_repr
102 def __init__(self, depth=16, log=False):
103 if log == False:
104 if log == False:
105 from fundamentals.logs import emptyLogger
106 self.log = emptyLogger()
107 else:
108 self.log = log
109 this = _htmc.new_HTMC(depth)
110 try:
111 self.this.append(this)
112 except:
113 self.this = this
115 def init(self, depth=16):
116 return _htmc.HTMC_init(self, depth)
117 __swig_destroy__ = _htmc.delete_HTMC
118 __del__ = lambda self: None
120 def lookup_id(self, *args):
121 return _htmc.HTMC_lookup_id(self, *args)
123 def intersect(self, *args):
124 return _htmc.HTMC_intersect(self, *args)
126 def cmatch(self, *args):
127 return _htmc.HTMC_cmatch(self, *args)
129 def cbincount(self, *args):
130 return _htmc.HTMC_cbincount(self, *args)
132 def depth(self):
133 return _htmc.HTMC_depth(self)
135HTMC_swigregister = _htmc.HTMC_swigregister
136HTMC_swigregister(HTMC)
139class Matcher(_object):
140 __swig_setmethods__ = {}
141 __setattr__ = lambda self, name, value: _swig_setattr(
142 self, Matcher, name, value)
143 __swig_getmethods__ = {}
144 __getattr__ = lambda self, name: _swig_getattr(self, Matcher, name)
145 __repr__ = _swig_repr
147 def __init__(self, *args):
148 this = _htmc.new_Matcher(*args)
149 try:
150 self.this.append(this)
151 except:
152 self.this = this
153 __swig_destroy__ = _htmc.delete_Matcher
154 __del__ = lambda self: None
156 def get_depth(self):
157 return _htmc.Matcher_get_depth(self)
159 def match(self, *args):
160 return _htmc.Matcher_match(self, *args)
161Matcher_swigregister = _htmc.Matcher_swigregister
162Matcher_swigregister(Matcher)
164# This file is compatible with both classic and new-style classes.