/trunk/Examples/test-suite/rename_pcre_encoder.i
# · Swig · 31 lines · 21 code · 10 blank · 0 comment · 0 complexity · ad631f953d0196108e49f5dd0a449204 MD5 · raw file
- %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 {
- };
- %}