C++ Library Extensions 2022.12.09
To help learn modern C++ programming
09-functor.cpp File Reference
#include <tpf_output.hpp>
Include dependency graph for 09-functor.cpp:

Go to the source code of this file.

Classes

class  Functor
 
class  DummyClass< ElementType >
 

Typedefs

using mem_function_t = int(DummyClass::*)(int, int)
 

Functions

void test_functor ()
 
int call_mem (DummyClass &d, mem_function_t fptr, int a, int b)
 
int call_mem_through_obj_ptr (DummyClass *dptr, mem_function_t fptr, int a, int b)
 
void test_call_mem ()
 
void test_call_mem_through_obj_ptr ()
 
void test_member_function_pointer ()
 
int main ()
 

Variables

tpf::sstream stream
 
auto endl = tpf::endl
 

Typedef Documentation

◆ mem_function_t

using mem_function_t = int(DummyClass::*)(int, int)

Definition at line 79 of file 09-functor.cpp.

Function Documentation

◆ call_mem()

int call_mem ( DummyClass d,
mem_function_t  fptr,
int  a,
int  b 
)

Definition at line 81 of file 09-functor.cpp.

Here is the caller graph for this function:

◆ call_mem_through_obj_ptr()

int call_mem_through_obj_ptr ( DummyClass dptr,
mem_function_t  fptr,
int  a,
int  b 
)

Definition at line 86 of file 09-functor.cpp.

Here is the caller graph for this function:

◆ main()

int main ( )

Definition at line 145 of file 09-functor.cpp.

Here is the call graph for this function:

◆ test_call_mem()

void test_call_mem ( )

Definition at line 91 of file 09-functor.cpp.

Here is the call graph for this function:

◆ test_call_mem_through_obj_ptr()

void test_call_mem_through_obj_ptr ( )

Definition at line 101 of file 09-functor.cpp.

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

◆ test_functor()

void test_functor ( )

Definition at line 25 of file 09-functor.cpp.

◆ test_member_function_pointer()

void test_member_function_pointer ( )

Definition at line 110 of file 09-functor.cpp.

Here is the call graph for this function:

Variable Documentation

◆ endl

auto endl = tpf::endl

Definition at line 7 of file 09-functor.cpp.

◆ stream

tpf::sstream stream

Definition at line 6 of file 09-functor.cpp.