Sen API
Sen Libraries
Loading...
Searching...
No Matches
Objects

Manipulation of objects. More...

Collaboration diagram for Objects:

Classes

struct  sen::EventInfo
 Information about an event emission. More...
struct  sen::MethodCallInfo
 Information about a method call. More...
class  sen::Callback< InfoClass, Args >
 Base class for event or method callbacks. It stores the queue where to push the response. The queue can be obtained directly as an argument, or through an object. More...
class  sen::ConnectionGuard
 Unregisters a callback on destruction, unless keep() is called. More...
struct  sen::ShouldBePassedByValue< InterestId >
 Unique identifier that represents the interest. More...
struct  sen::BusSpec
 The name/address of a bus. More...
struct  sen::VarInfo
 Information about a variable used in the query. More...
class  sen::Interest
 Declares interest on objects that satisfy a set of conditions. More...
class  sen::NativeObject
 An object instantiated in this process. This is the base class for all user-implemented objects. More...
struct  sen::ShouldBePassedByValue< ConnId >
struct  sen::ShouldBePassedByValue< ObjectId >
 Unique identifier for any object instance. More...
class  sen::Object
 A sen object. More...
class  sen::ObjectFilterBase
 Base class for object filters. More...
class  sen::ObjectFilter
 Allows the discovery of objects based on different criteria. More...
class  sen::ObjectList< T >
 A list of objects that is managed by some source based on user-expressed interests. More...
class  sen::MuxedProviderListener
 An extended ObjectProviderListener that works together with ObjectMux and notifies when objects provided by different ObjectMux sources are added/removed multiple times. More...
class  sen::ObjectMux
 Converts multiple object providers into one. Providers might reside in different threads. Note that addition and removal notifications for objects that are matched by overlapping interests might mention different interest IDs. More...
struct  sen::ShouldBePassedByValue< ObjectOwnerId >
 Identifies the owner of an object. More...
struct  sen::ObjectInstanceDiscovery
 Holds information about an object that has been discovered. More...
struct  sen::RemoteObjectDiscovery
 Holds information about a remote object that has been discovered. More...
struct  sen::ObjectRemoval
 Holds information about an object that has been removed. More...
class  sen::ObjectProviderListener
 Allows reacting to objects being added or removed to an object provider. It automatically unregisters itself from all the providers upon destruction. More...
class  sen::ObjectProvider
 Base class for an entity that is able to produce objects. More...
class  sen::ObjectRef< T >
 Object references may or may not hold an object instance. Their value is set by a provider based on some defined interest which was given during construction. More...
class  sen::ObjectSource
 Allows adding and receiving objects. More...
struct  sen::Subscription< T >
 A list of objects and a reference to its source (to keep it alive). More...

Typedefs

template<typename R>
using sen::MethodResult = Result<R, std::exception_ptr>
 The result of a method (which can be an exception in case of error).
template<typename... Args>
using sen::EventCallback = Callback<EventInfo, Args...>
 An event callback.
template<typename R>
using sen::MethodCallback = Callback<MethodCallInfo, MethodResult<R>>
 A method callback.
using sen::PropertyCallback = EventCallback<>
 A property change callback.
using sen::TypeCondition = std::variant<std::monostate, ConstTypeHandle<ClassType>, std::string>
 A condition set on an object's type.
using sen::BusCondition = std::optional<BusSpec>
 Bus conditions may be present, but are not mandatory.
using sen::VarInfoList = std::vector<VarInfo>
 List of variables used in a query expression.
using sen::StreamCall = sen::std_util::move_only_function<void(OutputStream&)>
using sen::VariantCall = sen::std_util::move_only_function<void(Var&)>
using sen::StreamCallForwarder = sen::std_util::move_only_function<void(StreamCall&&)>
using sen::VariantCallForwarder = sen::std_util::move_only_function<void(VariantCall&&)>
using sen::ObjectAddition = std::variant<ObjectInstanceDiscovery, RemoteObjectDiscovery>
 Holds information about an object that is already present and we explicitly asked for.
using sen::ObjectAdditionList = std::vector<ObjectAddition>
 Sequence of object additions.
using sen::ObjectRemovalList = std::vector<ObjectRemoval>
 Sequence of object removals.

Enumerations

enum class  sen::Emit { sen::Emit::now , sen::Emit::onCommit }
 How to emit an event. More...

Functions

std::string sen::asString (const BusSpec &spec)
 Converts a BusSpec into a session.bus string representation.
std::string_view sen::extractQualifiedTypeName (const TypeCondition &condition)
 Gets the qualified type name from a type condition.
ObjectId sen::getObjectId (const ObjectAddition &discovery)
ObjectOwnerId sen::getObjectOwnerId (const ObjectAddition &discovery)
InterestId sen::getInterestId (const ObjectAddition &discovery)
Objectsen::getObjectInstance (const ObjectAddition &discovery)
ObjectRemoval sen::makeRemoval (const ObjectAddition &discovery)
 sen::Subscription< T >::Subscription (Subscription &&other) noexcept
Subscriptionsen::Subscription< T >::operator= (Subscription &&other) noexcept
 sen::Subscription< T >::~Subscription ()

Detailed Description

Manipulation of objects.


Class Documentation

◆ sen::EventInfo

struct sen::EventInfo

Information about an event emission.

Class Members
TimeStamp creationTime When was the event created, timestamped by the source.

◆ sen::MethodCallInfo

struct sen::MethodCallInfo

Information about a method call.

◆ sen::BusSpec

struct sen::BusSpec

The name/address of a bus.

Class Members
string sessionName
string busName

◆ sen::VarInfo

struct sen::VarInfo

Information about a variable used in the query.

Class Members
const Property * property = nullptr
vector< uint16_t > fieldIndexes

◆ sen::ObjectInstanceDiscovery

struct sen::ObjectInstanceDiscovery

Holds information about an object that has been discovered.

Class Members
shared_ptr< Object > instance
ObjectId id
InterestId interestId
ObjectOwnerId ownerId

◆ sen::ObjectRemoval

struct sen::ObjectRemoval

Holds information about an object that has been removed.

Class Members
InterestId interestId
ObjectId objectid
ObjectOwnerId ownerId

Typedef Documentation

◆ MethodResult

template<typename R>
using sen::MethodResult = Result<R, std::exception_ptr>

The result of a method (which can be an exception in case of error).

◆ EventCallback

template<typename... Args>
using sen::EventCallback = Callback<EventInfo, Args...>

An event callback.

◆ MethodCallback

template<typename R>
using sen::MethodCallback = Callback<MethodCallInfo, MethodResult<R>>

A method callback.

◆ PropertyCallback

A property change callback.

◆ TypeCondition

using sen::TypeCondition = std::variant<std::monostate, ConstTypeHandle<ClassType>, std::string>

A condition set on an object's type.

◆ BusCondition

using sen::BusCondition = std::optional<BusSpec>

Bus conditions may be present, but are not mandatory.

◆ VarInfoList

using sen::VarInfoList = std::vector<VarInfo>

List of variables used in a query expression.

◆ StreamCall

◆ VariantCall

◆ StreamCallForwarder

◆ VariantCallForwarder

◆ ObjectAddition

Holds information about an object that is already present and we explicitly asked for.

◆ ObjectAdditionList

Sequence of object additions.

◆ ObjectRemovalList

using sen::ObjectRemovalList = std::vector<ObjectRemoval>

Sequence of object removals.

Enumeration Type Documentation

◆ Emit

enum class sen::Emit
strong

How to emit an event.

Enumerator
now 

Directly when it happens.

onCommit 

When commit is called.

Function Documentation

◆ asString()

std::string sen::asString ( const BusSpec & spec)
nodiscard

Converts a BusSpec into a session.bus string representation.

◆ extractQualifiedTypeName()

std::string_view sen::extractQualifiedTypeName ( const TypeCondition & condition)
nodiscard

Gets the qualified type name from a type condition.

◆ getObjectId()

ObjectId sen::getObjectId ( const ObjectAddition & discovery)
inlinenodiscard

◆ getObjectOwnerId()

ObjectOwnerId sen::getObjectOwnerId ( const ObjectAddition & discovery)
inlinenodiscard

◆ getInterestId()

InterestId sen::getInterestId ( const ObjectAddition & discovery)
inlinenodiscard

◆ getObjectInstance()

Object * sen::getObjectInstance ( const ObjectAddition & discovery)
inlinenodiscard

◆ makeRemoval()

ObjectRemoval sen::makeRemoval ( const ObjectAddition & discovery)
inlinenodiscard

◆ Subscription()

template<typename T>
sen::Subscription< T >::Subscription ( Subscription< T > && other)
inlinenoexcept

◆ operator=()

template<typename T>
Subscription< T > & sen::Subscription< T >::operator= ( Subscription< T > && other)
inlinenoexcept

◆ ~Subscription()

template<typename T>
sen::Subscription< T >::~Subscription ( )
inline