libtcspc C++ API
Streaming TCSPC and time tag data processing
Loading...
Searching...
No Matches
tcspc::access_tracker< Access > Class Template Reference

Description

template<typename Access>
class tcspc::access_tracker< Access >

Tracker that mediates access to objects via a tcspc::context.

This is a movable (noncopyable) object that tracks its address when moved. The address is stored in the associated tcspc::context from which the tracker was created.

An object stores the tracker instance as a data member and also registers an access factory in its constructor. This allows code to later access the object state, even after the tracked object has been embedded in an outer object (as with a processor incorporated into a processing graph).

Template Parameters
Accesstype of access interface for the tracked object

Public Member Functions

 access_tracker ()=default
 Construct an empty tracker.
template<typename F>
void register_access_factory (F factory)
 Register an access factory with this tracker's context.

Friends

class context

Constructor & Destructor Documentation

◆ access_tracker()

template<typename Access>
tcspc::access_tracker< Access >::access_tracker ( )
default

Construct an empty tracker.

Empty instances cannot be used other than by assigning a non-empty instance.

Non-empty instances can only be obtained from a tcspc::context.

Member Function Documentation

◆ register_access_factory()

template<typename Access>
template<typename F>
void tcspc::access_tracker< Access >::register_access_factory ( F factory)
inline

Register an access factory with this tracker's context.

This is usually called in the tracked object's constructor to arrange for later access to the object via its corresponding access type.

Template Parameters
Ffactory function type
Parameters
factoryfunction taking reference to this tracker and returning the access object of type Access

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