example_0040.cpp
См. документацию.
1 #include <iostream>
2 #include <pyhrol.h>
3 
4 using namespace std;
5 using namespace pyhrol;
6 
8 {
9  int i = 0;
10  const char *pch = "Zero";
11 
12  _args.set_options(0);
13  PYHROL_PARSE_TUPLE_2(NULL, _args, i, pch)
16 
17  cout
18  << __func__ << ": I am called\n"
19  << " My args: i = " << i << ", pch = \"" << pch << "\"" << endl
20  ;
21 
23 }
24 
25 static void __on_load() __attribute__ ((constructor));
26 
27 void __on_load()
28 {
29  PYHROL_REGISTER_FUNCTION(function_with_default_args, "Function can takes one or two primitive args or takes no arguments; it returns no values")
30 }
#define PYHROL_AFTER_BUILD_VALUE(container)
Definition: pyhrol_macro.h:18
#define PYHROL_AFTER_EXECUTE_DEFAULT(container)
Definition: pyhrol_macro.h:26
#define PYHROL_AFTER_PARSE_TUPLE(container)
Definition: pyhrol_macro.h:9
#define PYHROL_PARSE_TUPLE_2(description, container, arg1, arg2)
static void __on_load() __attribute__((constructor))
virtual void set_options(const uint8_t)=0
void function_with_default_args(Tuples &_args)
Definition: example_0040.cpp:7
#define PYHROL_REGISTER_FUNCTION(function, help)
Definition: pyhrol_macro.h:34