SWIG is defined when swig is generating its stuff... so ```#ifndef SWIG``` hides all the classes in there from swig. Otherwise the codegenerator would complain about those classes in between (they have overloaded constructors and all the other stuff it doesn't like)... SWIG is not defined when actually compiling xbmc.
See: http://www.swig.org/Doc1.3/SWIG.html#SWIG_nn8