Public Member Functions | Static Public Attributes | List of all members
grepros.outputs.AppSink Class Reference
Inheritance diagram for grepros.outputs.AppSink:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, args=None, **kwargs)
 
def emit (self, topic, msg, stamp=None, match=None, index=None)
 
def emit_meta (self)
 
def is_highlighting (self)
 
- Public Member Functions inherited from grepros.outputs.Sink
def __enter__ (self)
 
def __exit__ (self, exc_type, exc_value, traceback)
 
def autodetect (cls, target)
 
def bind (self, source)
 
def close (self)
 
def flush (self)
 
def thread_excepthook (self, text, exc)
 
def validate (self)
 

Static Public Attributes

 DEFAULT_ARGS = dict(EMIT=None, METAEMIT=None, HIGHLIGHT=False)
 Constructor argument defaults. More...
 
- Static Public Attributes inherited from grepros.outputs.Sink
 DEFAULT_ARGS = dict(META=False)
 Constructor argument defaults. More...
 
tuple FILE_EXTENSIONS = ()
 Auto-detection file extensions for subclasses, as (".ext", ) More...
 

Additional Inherited Members

- Public Attributes inherited from grepros.outputs.Sink
 args
 
 source
 inputs.Source instance bound to this sink More...
 
 valid
 Result of validate() More...
 

Detailed Description

Provides messages to callback function.

Definition at line 812 of file outputs.py.

Constructor & Destructor Documentation

◆ __init__()

def grepros.outputs.AppSink.__init__ (   self,
  args = None,
**  kwargs 
)
@param   args             arguments as namespace or dictionary, case-insensitive;
                  or emit callback
@param   args.emit        callback(topic, msg, stamp, highlighted msg, index in topic), if any
@param   args.metaemit    callback(metadata dict) if any, invoked before first emit from source batch
@param   args.highlight   whether to expect highlighted matching fields from source messages
@param   kwargs           any and all arguments as keyword overrides, case-insensitive

Reimplemented from grepros.outputs.Sink.

Definition at line 818 of file outputs.py.

Member Function Documentation

◆ emit()

def grepros.outputs.AppSink.emit (   self,
  topic,
  msg,
  stamp = None,
  match = None,
  index = None 
)
Registers message and invokes registered emit callback, if any.

Reimplemented from grepros.outputs.Sink.

Definition at line 839 of file outputs.py.

◆ emit_meta()

def grepros.outputs.AppSink.emit_meta (   self)
Invokes registered metaemit callback, if any, and not already invoked.

Reimplemented from grepros.outputs.Sink.

Definition at line 831 of file outputs.py.

◆ is_highlighting()

def grepros.outputs.AppSink.is_highlighting (   self)
Returns whether emitted matches are highlighted.

Reimplemented from grepros.outputs.Sink.

Definition at line 845 of file outputs.py.

Member Data Documentation

◆ DEFAULT_ARGS

grepros.outputs.AppSink.DEFAULT_ARGS = dict(EMIT=None, METAEMIT=None, HIGHLIGHT=False)
static

Constructor argument defaults.

Definition at line 816 of file outputs.py.


The documentation for this class was generated from the following file:


grepros
Author(s): Erki Suurjaak
autogenerated on Sat Jan 6 2024 03:11:30