An object instantiated in this process. This is the base class for all user-implemented objects.
More...
|
| | ~NativeObject () override |
| virtual void | registered (kernel::RegistrationApi &api) |
| | Implement this function to react to the fact that the object has been created and registered into the execution context.
|
| virtual void | update (kernel::RunApi &runApi) |
| | Implement this function to perform changes to your object state or interactions with other objects. This method is typically called in an execution loop. Does nothing by default.
|
| virtual void | unregistered (kernel::RegistrationApi &api) |
| | Implement this function to react to the fact that the object has been unregistered from the execution context.
|
| virtual bool | needsPreDrainOrPreCommit () const noexcept |
| | True if preUpdate and postUpdate needs to be called for this object. Defaults to false.
|
| virtual void | preDrain () |
| | Implement this function if you need to perform some action before the draining inputs the component where the object lives. The needsPreDrainOrPreCommit() function should return true for this function to be called.
|
| virtual void | preCommit () |
| | Implement this function if you need to perform some action before the commit is called in the component where the object lives. The needsPreDrainOrPreCommit() function should return true for this function to be called.
|
| void | setNextPropertyUntyped (const Property *property, const Var &value) |
| | Untyped version of the setNext family of methods that get generated by subclasses.
|
| Var | getNextPropertyUntyped (const Property *property) const |
| | Untyped version of the getNext family of methods that get generated by subclasses.
|
| ObjectId | getId () const noexcept final |
| | Global unique object identification.
|
| const std::string & | getName () const noexcept final |
| | The name given to the object upon construction.
|
| Var | getPropertyUntyped (const Property *prop) const final |
| | Variant-based property getter.
|
| NativeObject * | asNativeObject () noexcept final |
| | Helper that checks if the object is local (without dynamic casts).
|
| const NativeObject * | asNativeObject () const noexcept final |
| | Helper that checks if the object is local (without dynamic casts).
|
| const std::string & | getLocalName () const noexcept final |
| | An alias used as an alternate way of identifying this object locally.
|
| TimeStamp | getLastCommitTime () const noexcept override |
| | The point in time when the last commit was called.
|
| ConnectionGuard | onEventUntyped (const Event *ev, EventCallback< VarList > &&callback) final |
| | Reflection-based interface for reacting to events.
|
| void | invokeUntyped (const Method *method, const VarList &args, MethodCallback< Var > &&onDone) final |
| | Reflection- and variant- based interface for (asynchronously) invoking a method on this object. This mechanism is meant to be used only when the natively generated functions are not available or when performance or type safety are of no particular concern. NOLINTNEXTLINE(google-default-arguments).
|
| ConnectionGuard | onPropertyChangedUntyped (const Property *prop, EventCallback< VarList > &&callback) final |
| | Reflection-based interface for detecting property changes.
|
| virtual ConstTypeHandle< ClassType > | getClass () const noexcept=0 |
| | Reflection information.
|
| virtual impl::ProxyObject * | asProxyObject () noexcept |
| | Helper that checks if the object is a proxy (without dynamic casts).
|
| virtual const impl::ProxyObject * | asProxyObject () const noexcept |
| | Helper that checks if the object is a proxy (without dynamic casts).
|
| virtual void | invokeAllPropertyCallbacks ()=0 |
| | Helper method that invokes all the registered property callbacks, even if/when the property has not changed. This might prove helpful in situations where the initialization code is similar to the one of these callbacks.
|
|
| | NativeObject (const std::string &name) |
| void | commit (TimeStamp time) |
| virtual Var | senImplGetPropertyImpl (MemberHash propertyId) const =0 |
| virtual void | senImplSetNextPropertyUntyped (MemberHash propertyId, const Var &value)=0 |
| virtual Var | senImplGetNextPropertyUntyped (MemberHash propertyId) const =0 |
| uint32_t | senImplComputeMaxReliableSerializedPropertySize () const |
| virtual void | senImplCommitImpl (TimeStamp time)=0 |
| virtual void | senImplWriteChangedPropertiesToStream (OutputStream &confirmed, impl::BufferProvider uni, impl::BufferProvider multi)=0 |
| virtual void | senImplStreamCall (MemberHash methodId, InputStream &in, StreamCallForwarder &&fwd)=0 |
| virtual void | senImplVariantCall (MemberHash methodId, const VarList &args, VariantCallForwarder &&fwd)=0 |
| virtual impl::FieldValueGetter | senImplGetFieldValueGetter (MemberHash propertyId, Span< uint16_t > fields) const =0 |
| ConnId | senImplMakeConnectionId () noexcept |
| void | senImplRemoveUntypedConnection (ConnId id, MemberHash memberHash) override |
| template<typename R, typename... Args, typename F, class C> |
| void | senImplAsyncCall (C *instance, MethodCallback< R > &&callback, F &&f, bool forcePush, Args... args) |
| | Queues a call to a method for future execution (non-const version).
|
| template<typename R, typename... Args, typename F, class C> |
| void | senImplAsyncCall (const C *instance, MethodCallback< R > &&callback, F &&f, bool forcePush, Args... args) const |
| | Queues a call to a method for future execution (const version).
|
| void | senImplAsyncCall (const Method *method, const VarList &args, MethodCallback< Var > &&callback) |
| | Queues a call to a method using a variant-based approach.
|
| template<typename R, typename... Args, typename F, class C> |
| void | senImplAsyncDeferredCall (C *instance, MethodCallback< R > &&callback, F &&f, bool forcePush, Args... args) |
| | Queues a call to a method for future execution with deferred semantics (non-const version).
|
| template<typename... T> |
| void | senImplProduceEvent (impl::EventBuffer< T... > &eventBuffer, Emit emissionMode, MemberHash eventId, TransportMode transportMode, bool addToTransportQueue, MaybeRef< T >... args) |
| | Helper to call eventBuffer.produce() with our data.
|
| void | senImplEventEmitted (MemberHash id, std::function< VarList()> &&argsGetter, const EventInfo &info) final |
| | Called by EventBuffer when emitting an event.
|
| void | addWorkToQueue (sen::std_util::move_only_function< void()> &&call, bool forcePush) const |
| | Queues a function (no specific task) into the work queue.
|
| impl::SerializableEventQueue * | getOutputEventQueue () noexcept |
| std::lock_guard< std::shared_mutex > | createWriterLock () const |
| std::shared_lock< std::shared_mutex > | createReaderLock () const |
| virtual void | senImplRemoveTypedConnection (ConnId id)=0 |
| ObjectId | senImplMakeId (std::string_view objectName) const |
| | Creates a unique id.
|
| ConnectionGuard | senImplMakeConnectionGuard (ConnId id, MemberHash member, bool typed) |
| | Creates a guard for a callback.
|
| virtual void | senImplWriteAllPropertiesToStream (OutputStream &out) const =0 |
| | Writes all properties to out.
|
| virtual void | senImplWriteStaticPropertiesToStream (OutputStream &out) const =0 |
| | Writes all static properties to out.
|
| virtual void | senImplWriteDynamicPropertiesToStream (OutputStream &out) const =0 |
| | Writes all dynamic properties to out.
|
An object instantiated in this process. This is the base class for all user-implemented objects.