Skip to content

Commit

Permalink
Hide use of nested classes from SWIG
Browse files Browse the repository at this point in the history
Some versions of SWIG try and fail to wrap our functions
that use nested C++ classes. Help SWIG out by hiding
these functions.
  • Loading branch information
benmwebb committed Mar 1, 2024
1 parent 257c474 commit 2742eff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/kinematics/include/RRT.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions modules/saxs/include/FormFactorTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,15 @@ class IMPSAXSEXPORT FormFactorTable {
double excl_vol_;
};

#ifndef SWIG
// read entry
friend std::istream& operator>>(
std::istream& s, AtomFactorCoefficients& atom_factor_coefficients);

// 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);
Expand Down

0 comments on commit 2742eff

Please sign in to comment.