Classes | Macros | Functions
test_virtual_functions.cpp File Reference
#include <pybind11/functional.h>
#include "constructor_stats.h"
#include "pybind11_tests.h"
#include <thread>
Include dependency graph for test_virtual_functions.cpp:

Go to the source code of this file.

Classes

class  A_Repeat
 
class  A_Tpl
 
struct  Adder
 
struct  AdderBase
 
class  B_Repeat
 
class  B_Tpl
 
struct  Base
 
class  C_Repeat
 
class  C_Tpl
 
class  D_Repeat
 
class  D_Tpl
 
struct  AdderBase::Data
 
struct  DispatchIssue
 
class  ExampleVirt
 
class  Movable
 
class  NCVirt
 
class  NCVirtTrampoline
 
class  NonCopyable
 
class  PyA_Repeat
 
class  PyA_Tpl< Base >
 
class  PyB_Repeat
 
class  PyB_Tpl< Base >
 
class  PyC_Repeat
 
class  PyD_Repeat
 
class  PyExampleVirt
 
class  test_override_cache_helper
 
class  test_override_cache_helper_trampoline
 

Macros

#define A_METHODS
 
#define B_METHODS
 
#define C_METHODS
 
#define D_METHODS
 

Functions

void initialize_inherited_virtuals (py::module_ &m)
 
static void test_gil ()
 
static void test_gil_from_thread ()
 
int test_override_cache (std::shared_ptr< test_override_cache_helper > const &instance)
 
 TEST_SUBMODULE (virtual_functions, m)
 

Macro Definition Documentation

◆ A_METHODS

#define A_METHODS
Value:
public: \
virtual int unlucky_number() = 0; \
virtual std::string say_something(unsigned times) { \
std::string s = ""; \
for (unsigned i = 0; i < times; ++i) \
s += "hi"; \
return s; \
} \
std::string say_everything() { \
return say_something(1) + " " + std::to_string(unlucky_number()); \
}
RealScalar s

Definition at line 423 of file test_virtual_functions.cpp.

◆ B_METHODS

#define B_METHODS
Value:
public: \
int unlucky_number() override { return 13; } \
std::string say_something(unsigned times) override { \
return "B says hi " + std::to_string(times) + " times"; \
} \
virtual double lucky_number() { return 7.0; }

Definition at line 441 of file test_virtual_functions.cpp.

◆ C_METHODS

#define C_METHODS
Value:
public: \
int unlucky_number() override { return 4444; } \
double lucky_number() override { return 888; }

Definition at line 451 of file test_virtual_functions.cpp.

◆ D_METHODS

#define D_METHODS

Definition at line 458 of file test_virtual_functions.cpp.

Function Documentation

◆ initialize_inherited_virtuals()

void initialize_inherited_virtuals ( py::module_ &  m)

Definition at line 560 of file test_virtual_functions.cpp.

◆ test_gil()

static void test_gil ( )
static

Definition at line 190 of file test_virtual_functions.cpp.

◆ test_gil_from_thread()

static void test_gil_from_thread ( )
static

Definition at line 202 of file test_virtual_functions.cpp.

◆ test_override_cache()

int test_override_cache ( std::shared_ptr< test_override_cache_helper > const &  instance)
inline

Definition at line 225 of file test_virtual_functions.cpp.

◆ TEST_SUBMODULE()

TEST_SUBMODULE ( virtual_functions  ,
m   
)

Definition at line 233 of file test_virtual_functions.cpp.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:55