Fix the SWIG warning in the SWIG interface files

This keeps the .cpp and .h files clean.
This commit is contained in:
Matt Williams 2013-07-22 16:10:31 +01:00
parent 3971e6415c
commit 7ee913c8a8
4 changed files with 6 additions and 5 deletions

View File

@ -204,9 +204,7 @@ namespace PolyVox
// Non-member overloaded operators. // Non-member overloaded operators.
/// Stream insertion operator. /// Stream insertion operator.
#if !defined SWIG
std::ostream& operator<<(std::ostream& os, const Region& region); std::ostream& operator<<(std::ostream& os, const Region& region);
#endif
// Functions to be inlined to to be in the header rather than the .cpp. // Functions to be inlined to to be in the header rather than the .cpp.
// 'inline' keyword is used for the definition rather than the declaration. // 'inline' keyword is used for the definition rather than the declaration.

View File

@ -494,12 +494,10 @@ namespace PolyVox
* \param region The Region to write to the stream. * \param region The Region to write to the stream.
* \return A reference to the output stream to allow chaining. * \return A reference to the output stream to allow chaining.
*/ */
#if !defined SWIG
std::ostream& operator<<(std::ostream& os, const Region& region) std::ostream& operator<<(std::ostream& os, const Region& region)
{ {
os << "(" << region.getLowerX() << "," << region.getLowerY() << "," << region.getLowerZ() << os << "(" << region.getLowerX() << "," << region.getLowerY() << "," << region.getLowerZ() <<
") to (" << region.getUpperX() << "," << region.getUpperY() << "," << region.getUpperZ() << ")"; ") to (" << region.getUpperX() << "," << region.getUpperY() << "," << region.getUpperZ() << ")";
return os; return os;
} }
#endif
} }

View File

@ -68,6 +68,7 @@ EXTRACTOR(shortname, LargeVolume)
%ignore *::operator-=; %ignore *::operator-=;
%ignore *::operator*=; %ignore *::operator*=;
%ignore *::operator/=; %ignore *::operator/=;
%ignore *::operator<<; //This is covered by STR()
#endif #endif
%include "stdint.i" %include "stdint.i"

View File

@ -4,6 +4,10 @@
#include "Region.h" #include "Region.h"
%} %}
%extend PolyVox::Region {
STR()
};
%ignore depth; %ignore depth;
%ignore height; %ignore height;
%ignore width; %ignore width;