Class IZagalaSpecRegexIdentity#

Inheritance Relationships#

Derived Type#

Class Documentation#

class IZagalaSpecRegexIdentity#

Unified interface for objects that can be matched against plain text via a single regex pattern.

UZagalaSpecRegexStepEntry CDOs register themselves with UZagalaSpecStepRegistry when their pattern is non-empty; other implementors must be registered explicitly. Implementors with semantically distinct patterns should use derived classes, one per pattern. Patterns that vary only in keywords (Given/When/Then/And) should use alternation instead.

Usage: class UZagalaSpecMyRegexObject : public UObject, public IZagalaSpecRegexIdentity { virtual FString GetRegexPattern() const override { return TEXT(“^(?:Then |And )my step (.+)$”); } };

Subclassed by UZagalaSpecRegexStepEntry

Public Functions

virtual FString GetRegexPattern() const = 0#

Returns the single regex pattern that identifies this object.

Must be non-empty to be registered.

Returns:

The regex pattern of this object.

virtual bool MatchesText(const FString &Text) const#

Returns true if Text matches this object’s pattern.

Base implementation uses GetRegexPattern().

Parameters:

Text – The plain text to test against the pattern.

Returns:

True if Text matches the pattern, false otherwise.