"Fossies" - the Fresh Open Source Software Archive

Member "swig-4.1.1/Examples/test-suite/abstract_inherit_ok.i" (30 Nov 2022, 291 Bytes) of package /linux/misc/swig-4.1.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) ALAN Interactive Fiction Language source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 %module abstract_inherit_ok
    2 
    3 %feature("notabstract") Spam;
    4 %warnfilter(SWIGWARN_TYPE_ABSTRACT) Spam;
    5 
    6 %inline %{
    7 
    8 class Foo {
    9 public:
   10     virtual ~Foo() { }
   11     virtual int blah() = 0;
   12 };
   13 
   14 class Spam: public Foo {
   15 public:
   16    Spam() { }
   17 #ifndef SWIG
   18    int blah() { return 0; }
   19 #endif
   20 };
   21 
   22 %}