8#ifndef SEN_CORE_OBJ_INTEREST_H
9#define SEN_CORE_OBJ_INTEREST_H
41using TypeCondition = std::variant<std::monostate, ConstTypeHandle<ClassType>, std::string>;
70class Interest:
public std::enable_shared_from_this<Interest>
73 SEN_NOCOPY_NOMOVE(Interest)
87 [[nodiscard]] InterestId
getId() const noexcept;
104 [[nodiscard]]
bool operator==(const Interest& other) const noexcept;
105 [[nodiscard]]
bool operator!=(const Interest& other) const noexcept;
112 std::
string queryString_;
117 mutable
std::mutex varInfoListMutex_;
A registry of custom types.
Definition type_registry.h:36
const VarInfoList & getOrComputeVarInfoList(const ClassType *classType) const
Compute the information about the variables used in the query expression (if any)....
const lang::Chunk & getQueryCode() const noexcept
The code that can evaluate the condition.
const BusCondition & getBusCondition() const noexcept
The source of this interest (if any).
const TypeCondition & getTypeCondition() const noexcept
The condition related to the type.
InterestId getId() const noexcept
The unique ID of this interest.
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.
const std::string & getQueryString() const noexcept
The user-defined string that encodes the criteria.
Represents a property.
Definition property.h:79
std::string busName
Definition interest.h:47
std::vector< uint16_t > fieldIndexes
Definition interest.h:63
std::string sessionName
Definition interest.h:46
std::optional< BusSpec > BusCondition
Bus conditions may be present, but are not mandatory.
Definition interest.h:54
std::vector< VarInfo > VarInfoList
List of variables used in a query expression.
Definition interest.h:67
std::string_view extractQualifiedTypeName(const TypeCondition &condition)
Gets the qualified type name from a type condition.
std::variant< std::monostate, ConstTypeHandle< ClassType >, std::string > TypeCondition
A condition set on an object's type.
Definition interest.h:41
std::string asString(const BusSpec &spec)
Converts a BusSpec into a session.bus string representation.
The name/address of a bus.
Definition interest.h:45
Information about a variable used in the query.
Definition interest.h:61
Definition code_location.h:14
#define SEN_STRONG_TYPE_HASHABLE(name)
Makes your strong type std::hashable. NOLINTNEXTLINE.
Definition strong_type.h:188
#define SEN_STRONG_TYPE(name, native_type)
Helper macro to define strong types. NOLINTNEXTLINE.
Definition strong_type.h:179
Utility to indicate that your class wants to be passed by value in some of the library calls.
Definition class_helpers.h:34