mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
Add base class for filtered log models
This commit is contained in:
parent
334a3758fb
commit
77de714d35
1 changed files with 25 additions and 6 deletions
|
@ -358,7 +358,7 @@ class LazyLogModel (LogModelBase):
|
||||||
|
|
||||||
self.line_cache[line_offset] = Data.LogLine.parse_full (line)
|
self.line_cache[line_offset] = Data.LogLine.parse_full (line)
|
||||||
|
|
||||||
class FilteredLogModel (LogModelBase):
|
class FilteredLogModelBase (LogModelBase):
|
||||||
|
|
||||||
def __init__ (self, super_model):
|
def __init__ (self, super_model):
|
||||||
|
|
||||||
|
@ -368,6 +368,21 @@ class FilteredLogModel (LogModelBase):
|
||||||
self.access_offset = super_model.access_offset
|
self.access_offset = super_model.access_offset
|
||||||
self.ensure_cached = super_model.ensure_cached
|
self.ensure_cached = super_model.ensure_cached
|
||||||
self.line_cache = super_model.line_cache
|
self.line_cache = super_model.line_cache
|
||||||
|
|
||||||
|
def line_index_to_super (self, line_index):
|
||||||
|
|
||||||
|
raise NotImplementedError ("index conversion not supported")
|
||||||
|
|
||||||
|
def line_index_from_super (self, super_line_index):
|
||||||
|
|
||||||
|
raise NotImplementedError ("index conversion not supported")
|
||||||
|
|
||||||
|
class FilteredLogModel (FilteredLogModelBase):
|
||||||
|
|
||||||
|
def __init__ (self, super_model):
|
||||||
|
|
||||||
|
FilteredLogModelBase.__init__ (self, super_model)
|
||||||
|
|
||||||
self.reset ()
|
self.reset ()
|
||||||
|
|
||||||
def reset (self):
|
def reset (self):
|
||||||
|
@ -385,14 +400,18 @@ class FilteredLogModel (LogModelBase):
|
||||||
self.line_offsets[:] = (offset for row, offset in enum
|
self.line_offsets[:] = (offset for row, offset in enum
|
||||||
if func (row))
|
if func (row))
|
||||||
|
|
||||||
def line_index_to_super (self, line_index):
|
|
||||||
|
|
||||||
return line_index # FIXME
|
|
||||||
|
|
||||||
def line_index_from_super (self, super_line_index):
|
def line_index_from_super (self, super_line_index):
|
||||||
|
|
||||||
|
# FIXME
|
||||||
|
|
||||||
return super_line_index
|
return super_line_index
|
||||||
|
|
||||||
|
def line_index_to_super (self, line_index):
|
||||||
|
|
||||||
|
# FIXME
|
||||||
|
|
||||||
|
return line_index
|
||||||
|
|
||||||
class Filter (object):
|
class Filter (object):
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue