Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::Interest Class Reference

Declares interest on objects that satisfy a set of conditions. More...

#include <interest.h>

Inheritance diagram for sen::Interest:

Public Member Functions

 ~Interest ()=default
const TypeConditiongetTypeCondition () const noexcept
 The condition related to the type.
InterestId getId () const noexcept
 The unique ID of this interest.
const lang::ChunkgetQueryCode () const noexcept
 The code that can evaluate the condition.
const std::string & getQueryString () const noexcept
 The user-defined string that encodes the criteria.
const BusConditiongetBusCondition () const noexcept
 The source of this interest (if any).
const VarInfoListgetOrComputeVarInfoList (const ClassType *classType) const
 Compute the information about the variables used in the query expression (if any). Throws in case the type is not known, or if there's an error in the expression (property or field not present, wrong type used, etc.).
bool operator== (const Interest &other) const noexcept
bool operator!= (const Interest &other) const noexcept

Static Public Member Functions

static std::shared_ptr< Interest > make (std::string_view query, const CustomTypeRegistry &typeRegistry)
 Make an interest from a query. Throws std::exception if not well formed.

Detailed Description

Declares interest on objects that satisfy a set of conditions.

Constructor & Destructor Documentation

◆ ~Interest()

sen::Interest::~Interest ( )
default

Member Function Documentation

◆ make()

std::shared_ptr< Interest > sen::Interest::make ( std::string_view query,
const CustomTypeRegistry & typeRegistry )
staticnodiscard

Make an interest from a query. Throws std::exception if not well formed.

◆ getTypeCondition()

const TypeCondition & sen::Interest::getTypeCondition ( ) const
nodiscardnoexcept

The condition related to the type.

◆ getId()

InterestId sen::Interest::getId ( ) const
nodiscardnoexcept

The unique ID of this interest.

◆ getQueryCode()

const lang::Chunk & sen::Interest::getQueryCode ( ) const
nodiscardnoexcept

The code that can evaluate the condition.

◆ getQueryString()

const std::string & sen::Interest::getQueryString ( ) const
nodiscardnoexcept

The user-defined string that encodes the criteria.

◆ getBusCondition()

const BusCondition & sen::Interest::getBusCondition ( ) const
nodiscardnoexcept

The source of this interest (if any).

◆ getOrComputeVarInfoList()

const VarInfoList & sen::Interest::getOrComputeVarInfoList ( const ClassType * classType) const
nodiscard

Compute the information about the variables used in the query expression (if any). Throws in case the type is not known, or if there's an error in the expression (property or field not present, wrong type used, etc.).

◆ operator==()

bool sen::Interest::operator== ( const Interest & other) const
nodiscardnoexcept

◆ operator!=()

bool sen::Interest::operator!= ( const Interest & other) const
nodiscardnoexcept

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