homog2d library
Macros | Functions
homog2d_test_rtp_3.cpp File Reference

This program will demonstrate that variant-based runtime polymorphism can be use simultaneously with the pointer-based runtime polymorphism. More...

#include "../../homog2d.hpp"
#include "rtp_p.hpp"
#include "rtp_v.hpp"
Include dependency graph for homog2d_test_rtp_3.cpp:

Macros

#define HOMOG2D_ENABLE_PRTP
 
#define HOMOG2D_ENABLE_VRTP
 

Functions

int main (int, char **argv)
 see homog2d_test_rtp_3.cpp More...
 

Detailed Description

This program will demonstrate that variant-based runtime polymorphism can be use simultaneously with the pointer-based runtime polymorphism.

Build and run with $ make test-rtp

Macro Definition Documentation

◆ HOMOG2D_ENABLE_PRTP

#define HOMOG2D_ENABLE_PRTP

◆ HOMOG2D_ENABLE_VRTP

#define HOMOG2D_ENABLE_VRTP

Function Documentation

◆ main()

int main ( int  ,
char **  argv 
)

see homog2d_test_rtp_3.cpp

36 {
37  std::cout << "START " << argv[0] << '\n';
38 
39  auto vecpts = std::vector<Point2d>(
40  { {0,0},{3,2},{1,4} }
41  );
42 
44  do_vrtp( vecpts, im );
45  do_prtp( vecpts, im );
46  im.write( "BUILD/dummy_rtp_3.svg" );
47 }
void do_vrtp(const std::vector< h2d::Point2d > &vecpts, IM &im)
Variant-based runtime polymorphism function.
Definition: rtp_v.hpp:11
void do_prtp(const std::vector< h2d::Point2d > &vecpts, IM &im)
Pointer-based runtime polymorphism.
Definition: rtp_p.hpp:11
img::Image< img::SvgImage > im(300, 400)
Opaque data structure, will hold the image type, depending on back-end library. This type is the one ...
Definition: homog2d.hpp:712
Here is the call graph for this function: