PageRenderTime 35ms CodeModel.GetById 9ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Swig | 24 lines | 21 code | 3 blank | 0 comment | 0 complexity | 4ec0ca2d10d5590a596a1d94569087f7 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. %module rename_simple
  2. %rename(NewStruct) OldStruct;
  3. %rename(NewVariable) OldVariable;
  4. %rename(NewInstanceMethod) OldInstanceMethod;
  5. %rename(NewInstanceVariable) OldInstanceVariable;
  6. %rename(NewStaticMethod) OldStaticMethod;
  7. %rename(NewStaticVariable) OldStaticVariable;
  8. %rename(NewFunction) OldFunction;
  9. %rename(NewGlobalVariable) OldGlobalVariable;
  10. %inline %{
  11. struct OldStruct {
  12. OldStruct() : OldInstanceVariable(111) {}
  13. int OldInstanceVariable;
  14. int OldInstanceMethod() { return 222; }
  15. static int OldStaticVariable;
  16. static int OldStaticMethod() { return 333; }
  17. };
  18. int OldStruct::OldStaticVariable = 444;
  19. int OldFunction() { return 555; }
  20. int OldGlobalVariable = 666;
  21. %}