/trunk/Examples/test-suite/rename_pcre_encoder.i
Swig | 31 lines | 21 code | 10 blank | 0 comment | 0 complexity | ad631f953d0196108e49f5dd0a449204 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- %module rename_pcre_encoder
- // strip the wx prefix from all identifiers except those starting with wxEVT
- %rename("%(regex:/wx(?!EVT)(.*)/\\1/)s") "";
- // Replace "Set" and "Get" prefixes with "put" and "get" respectively.
- %rename("%(regex:/^Set(.*)/put\\1/)s", %$isfunction) "";
- %rename("%(regex:/^Get(.*)/get\\1/)s", %$isfunction) "";
- %inline %{
- struct wxSomeWidget {
- void SetBorderWidth(int width) { m_width = width; }
- int GetBorderWidth() const { return m_width; }
- void SetSize(int, int) {}
- int m_width;
- };
- struct wxAnotherWidget {
- void DoSomething() {}
- };
- class wxEVTSomeEvent {
- };
- class xUnchangedName {
- };
- %}