From 2742effffe0bf69bfb7281104ee3aa7c7b29eca5 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Fri, 1 Mar 2024 14:53:47 -0800 Subject: [PATCH] Hide use of nested classes from SWIG Some versions of SWIG try and fail to wrap our functions that use nested C++ classes. Help SWIG out by hiding these functions. --- modules/kinematics/include/RRT.h | 2 ++ modules/saxs/include/FormFactorTable.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/kinematics/include/RRT.h b/modules/kinematics/include/RRT.h index 8dec5d14db..2608189510 100644 --- a/modules/kinematics/include/RRT.h +++ b/modules/kinematics/include/RRT.h @@ -107,7 +107,9 @@ class IMPKINEMATICSEXPORT RRT : public IMP::Sampler { unsigned int number_of_collisions_; }; +#ifndef SWIG friend std::ostream& operator<<(std::ostream& s, const Parameters& p); +#endif public: //! Constructor diff --git a/modules/saxs/include/FormFactorTable.h b/modules/saxs/include/FormFactorTable.h index 76bf6e6662..abbcd9b9bf 100644 --- a/modules/saxs/include/FormFactorTable.h +++ b/modules/saxs/include/FormFactorTable.h @@ -212,6 +212,7 @@ class IMPSAXSEXPORT FormFactorTable { double excl_vol_; }; +#ifndef SWIG // read entry friend std::istream& operator>>( std::istream& s, AtomFactorCoefficients& atom_factor_coefficients); @@ -219,6 +220,7 @@ class IMPSAXSEXPORT FormFactorTable { // write entry friend std::ostream& operator<<( std::ostream& s, const AtomFactorCoefficients& atom_factor_coefficients); +#endif private: int read_form_factor_table(const std::string& table_name);