LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::ActorDefinition Struct Reference

Describes a named actor matched by a regular expression. More...

#include <ActorDefinition.hpp>

Collaboration diagram for ui::qt::ActorDefinition:
Collaboration graph

Public Member Functions

nlohmann::json ToJson () const
 

Static Public Member Functions

static ActorDefinition FromJson (const nlohmann::json &j)
 
static nlohmann::json ListToJson (const std::vector< ActorDefinition > &defs)
 
static std::vector< ActorDefinition > ListFromJson (const nlohmann::json &j)
 

Public Attributes

std::string name
 Display name shown in the Actors panel.
 
std::string pattern
 ECMAScript/QRegularExpression pattern.
 
std::string field
 Log field to match against (empty = any field)
 
std::string directedTo
 Name of the actor this actor's events are directed to (optional)
 
bool enabled {true}
 
bool isSelf {false}
 
std::string alias
 
bool useCaptures {false}
 
std::map< std::string, std::string > subActorDirectedTo
 
std::map< std::string, std::string > captureAliases
 

Detailed Description

Describes a named actor matched by a regular expression.

The regexp is tested against the value of field in each log event. Leave field empty to match against the full serialised event (all field values concatenated with a space).

Member Function Documentation

◆ FromJson()

static ActorDefinition ui::qt::ActorDefinition::FromJson ( const nlohmann::json &  j)
inlinestatic
Here is the caller graph for this function:

◆ ListFromJson()

static std::vector< ActorDefinition > ui::qt::ActorDefinition::ListFromJson ( const nlohmann::json &  j)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListToJson()

static nlohmann::json ui::qt::ActorDefinition::ListToJson ( const std::vector< ActorDefinition > &  defs)
inlinestatic
Here is the caller graph for this function:

◆ ToJson()

nlohmann::json ui::qt::ActorDefinition::ToJson ( ) const
inline

Member Data Documentation

◆ alias

std::string ui::qt::ActorDefinition::alias

Display alias shown instead of the raw actor name in the sequence diagram. For useCaptures=false: replaces name; for useCaptures=true: used as prefix when no entry exists in captureAliases.

◆ captureAliases

std::map<std::string, std::string> ui::qt::ActorDefinition::captureAliases

Aliases for individual captured values (useCaptures=true only). Maps raw log value → friendly display name shown in sequence diagram.

◆ directedTo

std::string ui::qt::ActorDefinition::directedTo

Name of the actor this actor's events are directed to (optional)

◆ enabled

bool ui::qt::ActorDefinition::enabled {true}

◆ field

std::string ui::qt::ActorDefinition::field

Log field to match against (empty = any field)

◆ isSelf

bool ui::qt::ActorDefinition::isSelf {false}

Marks this as the "main/self" actor (log generator). Only one definition should have isSelf=true. Used by SequenceDiagramPanel to colour outgoing (from self → green) vs incoming (to self → blue) arrows.

◆ name

std::string ui::qt::ActorDefinition::name

Display name shown in the Actors panel.

◆ pattern

std::string ui::qt::ActorDefinition::pattern

ECMAScript/QRegularExpression pattern.

◆ subActorDirectedTo

std::map<std::string, std::string> ui::qt::ActorDefinition::subActorDirectedTo

Per-subactor overrides: subactor name → target actor name (capture-group mode). Falls back to directedTo for subactors not listed here.

◆ useCaptures

bool ui::qt::ActorDefinition::useCaptures {false}

When true, each named or numbered capture group in pattern is treated as a separate actor instead of using name as the actor name.


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