example_0050.cpp
См. документацию.
1 #include <iostream>
2 #include <pyhrol.h>
3 
4 using namespace std;
5 using namespace pyhrol;
6 
8 {
9  int counter;
10  const char *description;
11 
12  PYHROL_PARSE_TUPLE_2(NULL, _args, counter, description)
15 
16  cout
17  << __func__ << ": I am called\n"
18  << " My args: counter = " << counter << ", description = \"" << description << "\"" << endl
19  ;
20 
22 }
23 
24 static void __on_load() __attribute__ ((constructor));
25 
26 void __on_load()
27 {
28  PYHROL_REGISTER_FUNCTION_WITH_KEYWORDS(function_with_keywords, "Function with named arguments")
29 }
#define PYHROL_AFTER_BUILD_VALUE(container)
Definition: pyhrol_macro.h:18
#define PYHROL_AFTER_EXECUTE_DEFAULT(container)
Definition: pyhrol_macro.h:26
static void __on_load() __attribute__((constructor))
#define PYHROL_AFTER_PARSE_TUPLE(container)
Definition: pyhrol_macro.h:9
#define PYHROL_PARSE_TUPLE_2(description, container, arg1, arg2)
void function_with_keywords(Tuples &_args)
Definition: example_0050.cpp:7
#define PYHROL_REGISTER_FUNCTION_WITH_KEYWORDS(function, help)
Definition: pyhrol_macro.h:37