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()); \
}

Definition at line 424 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 442 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 452 of file test_virtual_functions.cpp.

◆ D_METHODS

#define D_METHODS

Definition at line 459 of file test_virtual_functions.cpp.

Function Documentation

◆ initialize_inherited_virtuals()

void initialize_inherited_virtuals ( py::module_ &  m)

Definition at line 561 of file test_virtual_functions.cpp.

◆ test_gil()

static void test_gil ( )
static

Definition at line 191 of file test_virtual_functions.cpp.

◆ test_gil_from_thread()

static void test_gil_from_thread ( )
static

Definition at line 203 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 226 of file test_virtual_functions.cpp.

◆ TEST_SUBMODULE()

TEST_SUBMODULE ( virtual_functions  ,
m   
)

Definition at line 234 of file test_virtual_functions.cpp.

s
RealScalar s
Definition: level1_cplx_impl.h:126
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9


gtsam
Author(s):
autogenerated on Tue Jun 25 2024 03:08:07