Public Member Functions | Private Attributes | List of all members
grepros.inputs.ConditionMixin.Topic Class Reference
Inheritance diagram for grepros.inputs.ConditionMixin.Topic:
Inheritance graph
[legend]

Public Member Functions

def __bool__ (self)
 
def __contains__ (self, item)
 
def __getattr__ (self, name)
 
def __getitem__ (self, key)
 
def __init__ (self, count, firsts, lasts)
 
def __len__ (self)
 
def __nonzero__ (self)
 

Private Attributes

 _count
 
 _firsts
 
 _lasts
 

Detailed Description

Object for <topic x> replacements in condition expressions.

- len(topic)        -> number of messages processed in topic
- bool(topic)       -> whether there are any messages in topic
- topic[x]          -> history at -1 -2 for last and but one, or 0 1 for first and second
- topic.x           -> attribute x of last message
- value in topic    -> whether any field of last message contains value
- value in topic[x] -> whether any field of topic history at position contains value

Definition at line 230 of file inputs.py.

Constructor & Destructor Documentation

◆ __init__()

def grepros.inputs.ConditionMixin.Topic.__init__ (   self,
  count,
  firsts,
  lasts 
)

Definition at line 242 of file inputs.py.

Member Function Documentation

◆ __bool__()

def grepros.inputs.ConditionMixin.Topic.__bool__ (   self)

Definition at line 247 of file inputs.py.

◆ __contains__()

def grepros.inputs.ConditionMixin.Topic.__contains__ (   self,
  item 
)
Returns whether value exists in last message, or raises NoMessageException.

Definition at line 251 of file inputs.py.

◆ __getattr__()

def grepros.inputs.ConditionMixin.Topic.__getattr__ (   self,
  name 
)
Returns attribute value of last message, or raises NoMessageException.

Definition at line 261 of file inputs.py.

◆ __getitem__()

def grepros.inputs.ConditionMixin.Topic.__getitem__ (   self,
  key 
)
Returns message from history at key, or Empty() if no such message.

Definition at line 256 of file inputs.py.

◆ __len__()

def grepros.inputs.ConditionMixin.Topic.__len__ (   self)

Definition at line 249 of file inputs.py.

◆ __nonzero__()

def grepros.inputs.ConditionMixin.Topic.__nonzero__ (   self)

Definition at line 248 of file inputs.py.

Member Data Documentation

◆ _count

grepros.inputs.ConditionMixin.Topic._count
private

Definition at line 243 of file inputs.py.

◆ _firsts

grepros.inputs.ConditionMixin.Topic._firsts
private

Definition at line 244 of file inputs.py.

◆ _lasts

grepros.inputs.ConditionMixin.Topic._lasts
private

Definition at line 245 of file inputs.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