Live Cells C++
Reactive Programming for C++
Loading...
Searching...
No Matches
live_cells::argument_tracker Class Reference

#include <tracker.hpp>

Classes

class  tracker
 

Public Types

typedef std::function< void(const cell &arg) track_fn)
 

Public Member Functions

 argument_tracker (const argument_tracker &other)=delete
 
argument_trackeroperator= (const argument_tracker &other)=delete
 
void track_argument (const cell &arg)
 
template<typename F >
tracker< F > with_tracker (F track)
 

Static Public Member Functions

static argument_trackerglobal ()
 

Detailed Description

Helper for dynamically tracking the argument cells used within a function.

Member Typedef Documentation

◆ track_fn

typedef std::function<void(const cell &arg) live_cells::argument_tracker::track_fn)

Track argument callback function.

Parameters
argThe referenced observable.

Member Function Documentation

◆ global()

static argument_tracker & live_cells::argument_tracker::global ( )
inlinestatic

Return the global argument tracker instance.

◆ track_argument()

void live_cells::argument_tracker::track_argument ( const cell & arg)

Inform the current argument tracker that cell arg was used.

Parameters
argA cell that was referenced as an argument.

◆ with_tracker()

template<typename F >
tracker< F > live_cells::argument_tracker::with_tracker ( F track)
inline

Register a track argument callback function.

Parameters
trackTrack argument callback function.
Returns
A tracker object, which automatically restores the previous callback, at the time of calling this method, when it is destroyed.

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