Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
LateBindInstance_test Class Reference

Description

Test:
verify a scheme to supply the actual instance for member function invocation.
Remarks
in the end this is just a value replacement in a tuple, where the position is marked with a placeholder type. This scheme is used for starting threads, where the actual thread instance is not known yet at the point where the arguments for the thread-function are constructed
See also
lib::launchDetached

Definition at line 55 of file late-bind-instance-test.cpp.

Private Member Functions

void run (Arg)
 
void demonstrateUsage ()
 
uint theMember (uint limit)
 
void verify_forwarding ()
 
void verify_cornerCases ()
 

Member Function Documentation

◆ run()

void run ( Arg  )
inlineprivate

Definition at line 58 of file late-bind-instance-test.cpp.

References LateBindInstance_test::demonstrateUsage(), LateBindInstance_test::verify_cornerCases(), and LateBindInstance_test::verify_forwarding().

+ Here is the call graph for this function:

◆ demonstrateUsage()

void demonstrateUsage ( )
inlineprivate
Test:
demonstrate the usage of lib::meta::lateBindInstance():
  • construct an argument tuple
  • mark the position of the this-ptr with a placeholder
  • rewrite the arguments later when the actual instance is known
  • member function can now be invoked, since the instance was injected.

Definition at line 75 of file late-bind-instance-test.cpp.

References lib::meta::lateBindInstance(), lib::rani(), and LateBindInstance_test::theMember().

Referenced by LateBindInstance_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ theMember()

uint theMember ( uint  limit)
inlineprivate

Definition at line 95 of file late-bind-instance-test.cpp.

References lib::rani().

Referenced by LateBindInstance_test::demonstrateUsage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ verify_forwarding()

void verify_forwarding ( )
inlineprivate
Test:
verify that the rewriting process does not incur unnecessary data copies

Definition at line 105 of file late-bind-instance-test.cpp.

References EventMatch::afterEvent(), EventMatch::arg(), EventMatch::beforeCall(), EventMatch::beforeEvent(), EventLog::clear(), Tracker::DEFUNCT, EventLog::ensureNot(), EventLog::event(), util::join(), lib::meta::lateBindInstance(), Tracker::log, EventLog::verifyCall(), and EventLog::verifyEvent().

Referenced by LateBindInstance_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ verify_cornerCases()

void verify_cornerCases ( )
inlineprivate
Test:
replacement happens uniformly on all kinds of tuples

Definition at line 159 of file late-bind-instance-test.cpp.

References lib::meta::dump(), and lib::meta::lateBindInstance().

Referenced by LateBindInstance_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Inheritance diagram for LateBindInstance_test:
+ Collaboration diagram for LateBindInstance_test:

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