PageRenderTime 30ms CodeModel.GetById 26ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/test-suite/rename_pcre_encoder.i

#
Swig | 31 lines | 21 code | 10 blank | 0 comment | 0 complexity | ad631f953d0196108e49f5dd0a449204 MD5 | raw file
 1%module rename_pcre_encoder
 2
 3// strip the wx prefix from all identifiers except those starting with wxEVT
 4%rename("%(regex:/wx(?!EVT)(.*)/\\1/)s") "";
 5
 6// Replace "Set" and "Get" prefixes with "put" and "get" respectively.
 7%rename("%(regex:/^Set(.*)/put\\1/)s", %$isfunction) "";
 8%rename("%(regex:/^Get(.*)/get\\1/)s", %$isfunction) "";
 9
10%inline %{
11
12struct wxSomeWidget {
13    void SetBorderWidth(int width) { m_width = width; }
14    int GetBorderWidth() const { return m_width; }
15
16    void SetSize(int, int) {}
17
18    int m_width;
19};
20
21struct wxAnotherWidget {
22    void DoSomething() {}
23};
24
25class wxEVTSomeEvent {
26};
27
28class xUnchangedName {
29};
30
31%}