Commit c3421fce7a8a54d32a947d77b7ed18131036689b
1 parent
e48b7195
Use int instead of GChatter in Python methods
Python does not understand GChatter, the type is casted to int.
Showing
1 changed file
with
15 additions
and
27 deletions
pyext/GApplication.i
| ... | ... | @@ -76,15 +76,6 @@ public: |
| 76 | 76 | %rename(_log_filename) log_filename() const; |
| 77 | 77 | %rename(_log_header) log_header(); |
| 78 | 78 | %rename(_log_trailer) log_trailer(); |
| 79 | - %rename(_log_string) log_string(const GChatter& chatter, | |
| 80 | - const std::string& string); | |
| 81 | - %rename(_log_header1) log_header1(const GChatter& chatter, | |
| 82 | - const std::string& header); | |
| 83 | - %rename(_log_header2) log_header2(const GChatter& chatter, | |
| 84 | - const std::string& header); | |
| 85 | - %rename(_log_header3) log_header3(const GChatter& chatter, | |
| 86 | - const std::string& header); | |
| 87 | - %rename(_log_parameters) log_parameters(const GChatter& chatter); | |
| 88 | 79 | %rename(_need_help) need_help() const; |
| 89 | 80 | %rename(_log) log; |
| 90 | 81 | |
| ... | ... | @@ -105,24 +96,6 @@ public: |
| 105 | 96 | const std::string& log_filename(void) const; |
| 106 | 97 | void log_header(void); |
| 107 | 98 | void log_trailer(void); |
| 108 | - void log_string(const GChatter& chatter, | |
| 109 | - const std::string& string); | |
| 110 | - void log_value(const GChatter& chatter, | |
| 111 | - const std::string& name, | |
| 112 | - const std::string& value); | |
| 113 | - void log_value(const GChatter& chatter, | |
| 114 | - const std::string& name, | |
| 115 | - const int& value); | |
| 116 | - void log_value(const GChatter& chatter, | |
| 117 | - const std::string& name, | |
| 118 | - const double& value); | |
| 119 | - void log_header1(const GChatter& chatter, | |
| 120 | - const std::string& header); | |
| 121 | - void log_header2(const GChatter& chatter, | |
| 122 | - const std::string& header); | |
| 123 | - void log_header3(const GChatter& chatter, | |
| 124 | - const std::string& header); | |
| 125 | - void log_parameters(const GChatter& chatter); | |
| 126 | 99 | const bool& need_help(void) const; |
| 127 | 100 | |
| 128 | 101 | // Public members |
| ... | ... | @@ -147,6 +120,21 @@ GApplication._log_value = _log_value |
| 147 | 120 | * @brief GApplication C++ class extension |
| 148 | 121 | ***************************************************************************/ |
| 149 | 122 | %extend GApplication { |
| 123 | + void _log_string(const int& chatter, const std::string& string) { | |
| 124 | + self->log_string(GChatter(chatter), string); | |
| 125 | + } | |
| 126 | + void _log_header1(const int& chatter, const std::string& header) { | |
| 127 | + self->log_header1(GChatter(chatter), header); | |
| 128 | + } | |
| 129 | + void _log_header2(const int& chatter, const std::string& header) { | |
| 130 | + self->log_header2(GChatter(chatter), header); | |
| 131 | + } | |
| 132 | + void _log_header3(const int& chatter, const std::string& header) { | |
| 133 | + self->log_header3(GChatter(chatter), header); | |
| 134 | + } | |
| 135 | + void _log_parameters(const int& chatter) { | |
| 136 | + self->log_parameters(GChatter(chatter)); | |
| 137 | + } | |
| 150 | 138 | GApplicationPar& __getitem__(const std::string& name) { |
| 151 | 139 | return (*self)[name]; |
| 152 | 140 | } | ... | ... |