8#ifndef SEN_CORE_OBJ_OBJECT_SOURCE_H
9#define SEN_CORE_OBJ_OBJECT_SOURCE_H
22namespace sen::kernel::impl
61 bool add(
const std::vector<std::shared_ptr<T>>& instances)
63 std::vector<NativeObjectPtr> vec(instances.begin(), instances.end());
79 void remove(
const std::vector<std::shared_ptr<T>>& instances)
81 std::vector<NativeObjectPtr> vec(instances.begin(), instances.end());
ObjectFilter(ObjectOwnerId ownerId)
friend class kernel::impl::Runner
Definition object_source.h:86
virtual void drainInputs()=0
bool add(const std::vector< std::shared_ptr< T > > &instances)
Convenience helper.
Definition object_source.h:61
virtual void flushOutputs()=0
ObjectSource(const ObjectOwnerId &id)
Definition object_source.h:43
bool add(NativeObjectPtr instance)
Registers an object (including its type). It does nothing if the objects are already present....
Definition object_source.h:57
void remove(NativeObjectPtr instance)
Unregisters an object. Does nothing if the object is not present. This method is thread-safe.
Definition object_source.h:75
~ObjectSource() override=default
virtual void remove(const Span< NativeObjectPtr > &instances)=0
Unregisters an object and notifies any registered listeners. Ignores objects that are not present....
std::shared_ptr< NativeObject > NativeObjectPtr
Definition object_source.h:40
virtual bool add(const Span< NativeObjectPtr > &instances)=0
Registers an object (including its type). It does nothing if the object is already registered....
void remove(const std::vector< std::shared_ptr< T > > &instances)
Convenience helper.
Definition object_source.h:79
Contiguous view of elements of type T. Inspired by http://www.open-std.org/jtc1/sc22/wg21/docs/papers...
Definition span.h:34
constexpr Span< T > makeSpan(T *ptr, std::size_t size) noexcept
Takes in a type that can be passed to a contiguous range and returns a Span.
Definition span.h:201