Skip to content

Commit

Permalink
[BALL] Fix Python bindings for UnaryProcessor derivatives
Browse files Browse the repository at this point in the history
Many sip classes have used incorrect base classes, preventing the BALLCore
module from being built with sip 4.19+ (partially fixes #606).
  • Loading branch information
tkemmer committed Jul 27, 2017
1 parent ac5666a commit 50f4484
Show file tree
Hide file tree
Showing 16 changed files with 171 additions and 171 deletions.
20 changes: 20 additions & 0 deletions include/BALL/PYTHON/pyUnaryProcessors.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef BALL_PYTHON_PYPROCESSOR_H
#define BALL_PYTHON_PYPROCESSOR_H

#include <BALL/KERNEL/atomContainer.h>

namespace BALL
{
using AtomContainerProcessor = UnaryProcessor<AtomContainer>;
using AtomProcessor = UnaryProcessor<Atom>;
using BondProcessor = UnaryProcessor<Bond>;
using ChainProcessor = UnaryProcessor<Chain>;
using CompositeProcessor = UnaryProcessor<Composite>;
using FragmentProcessor = UnaryProcessor<Fragment>;
using ResidueProcessor = UnaryProcessor<Residue>;

using ConstAtomProcessor = ConstUnaryProcessor<Atom>;
using ConstCompositeProcessor = ConstUnaryProcessor<Composite>;
}

#endif //BALL_PYTHON_PYPROCESSOR_H
8 changes: 1 addition & 7 deletions source/PYTHON/EXTENSIONS/BALL/BALLCore.sip
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,7 @@
%Include extractors.sip
%Include pyIndexList.sip // a list of numbers (indices etc.)
%Include pyAtomDict.sip // a dictionary mapping to atoms
%Include pyAtomProcessor.sip
%Include pyBondProcessor.sip
%Include pyFragmentProcessor.sip
%Include pyResidueProcessor.sip
%Include pyCompositeProcessor.sip
%Include pyChainProcessor.sip
//%Include pyLists.sip
%Include pyUnaryProcessors.sip

// QSAR
//%Include descriptor.sip
Expand Down
1 change: 1 addition & 0 deletions source/PYTHON/EXTENSIONS/BALL/addHydrogenProcessor.sip
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class AddHydrogenProcessor : CompositeProcessor
{
%TypeHeaderCode
#include <BALL/PYTHON/pyUnaryProcessors.h>
#include <BALL/STRUCTURE/addHydrogenProcessor.h>
using namespace BALL;
%End
Expand Down
5 changes: 2 additions & 3 deletions source/PYTHON/EXTENSIONS/BALL/aromaticityProcessor.sip
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
%ModuleCode
#include <BALL/QSAR/aromaticityProcessor.h>
using namespace BALL;
typedef UnaryProcessor<Composite> CompositeProcessor;
%End

class AromaticityProcessor
: CompositeProcessor
: AtomContainerProcessor
{
%TypeHeaderCode
#include <BALL/PYTHON/pyUnaryProcessors.h>
#include <BALL/QSAR/aromaticityProcessor.h>
using namespace BALL;
using namespace BALL::Exception;
typedef UnaryProcessor<Composite> CompositeProcessor;
%End

public:
Expand Down
5 changes: 2 additions & 3 deletions source/PYTHON/EXTENSIONS/BALL/assignBondOrderProcessor.sip
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
%ModuleCode
#include <BALL/STRUCTURE/assignBondOrderProcessor.h>
using namespace BALL;
typedef UnaryProcessor<Composite> CompositeProcessor;
%End



class AssignBondOrderProcessor
: CompositeProcessor
: AtomContainerProcessor
{
%TypeHeaderCode
#include <BALL/PYTHON/pyUnaryProcessors.h>
#include <BALL/STRUCTURE/assignBondOrderProcessor.h>
using namespace BALL;
using namespace BALL::Exception;
typedef UnaryProcessor<Composite> CompositeProcessor;
%End

public:
Expand Down
10 changes: 2 additions & 8 deletions source/PYTHON/EXTENSIONS/BALL/connectedComponentsProcessor.sip
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,17 @@
%ModuleCode
#include <BALL/STRUCTURE/connectedComponentsProcessor.h>
using namespace BALL;
typedef UnaryProcessor<Composite> CompositeProcessor;
%End



class ConnectedComponentsProcessor
: CompositeProcessor
: AtomContainerProcessor
{
%TypeHeaderCode
#include <BALL/PYTHON/pyUnaryProcessors.h>
#include <BALL/STRUCTURE/connectedComponentsProcessor.h>
using namespace std;
using namespace BALL;
using namespace BALL::Exception;
typedef UnaryProcessor<Composite> CompositeProcessor;

//typedef vector<Atom*> Component;
//typedef vector<Component> ComponentVector;
%End

public:
Expand Down
15 changes: 6 additions & 9 deletions source/PYTHON/EXTENSIONS/BALL/geometricProperties.sip
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
//

class BoundingBoxProcessor
// : public UnaryProcessor<Atom>
: AtomProcessor
: ConstAtomProcessor
{
%TypeHeaderCode
#include <BALL/PYTHON/pyUnaryProcessors.h>
#include <BALL/STRUCTURE/geometricProperties.h>
using namespace BALL;
typedef UnaryProcessor<Atom> AtomProcessor;
%End
public:
virtual bool start() throw();
Expand All @@ -26,13 +25,12 @@ class BoundingBoxProcessor
};

class GeometricCenterProcessor
// : public UnaryProcessor<Atom>
: AtomProcessor
: ConstAtomProcessor
{
%TypeHeaderCode
#include <BALL/PYTHON/pyUnaryProcessors.h>
#include <BALL/STRUCTURE/geometricProperties.h>
using namespace BALL;
typedef UnaryProcessor<Atom> AtomProcessor;
%End
public:
virtual bool start() throw();
Expand All @@ -45,13 +43,12 @@ class GeometricCenterProcessor
};

class FragmentDistanceCollector
// : public UnaryProcessor<Composite>
: CompositeProcessor
: ConstCompositeProcessor
{
%TypeHeaderCode
#include <BALL/PYTHON/pyUnaryProcessors.h>
#include <BALL/STRUCTURE/geometricProperties.h>
using namespace BALL;
typedef UnaryProcessor<Composite> CompositeProcessor;
%End
public:
FragmentDistanceCollector();
Expand Down
6 changes: 2 additions & 4 deletions source/PYTHON/EXTENSIONS/BALL/geometricTransformations.sip
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
//

class TranslationProcessor
// : public UnaryProcessor<Atom>
: AtomProcessor
{
%TypeHeaderCode
#include <BALL/PYTHON/pyUnaryProcessors.h>
#include <BALL/STRUCTURE/geometricTransformations.h>
using namespace BALL;
typedef UnaryProcessor<Atom> AtomProcessor;
%End
public:
TranslationProcessor();
Expand All @@ -25,13 +24,12 @@ class TranslationProcessor
};

class TransformationProcessor
// :public UnaryProcessor<Atom>
: AtomProcessor
{
%TypeHeaderCode
#include <BALL/PYTHON/pyUnaryProcessors.h>
#include <BALL/STRUCTURE/geometricTransformations.h>
using namespace BALL;
typedef UnaryProcessor<Atom> AtomProcessor;
%End
public:
TransformationProcessor();
Expand Down
23 changes: 0 additions & 23 deletions source/PYTHON/EXTENSIONS/BALL/pyAtomProcessor.sip

This file was deleted.

23 changes: 0 additions & 23 deletions source/PYTHON/EXTENSIONS/BALL/pyBondProcessor.sip

This file was deleted.

22 changes: 0 additions & 22 deletions source/PYTHON/EXTENSIONS/BALL/pyChainProcessor.sip

This file was deleted.

23 changes: 0 additions & 23 deletions source/PYTHON/EXTENSIONS/BALL/pyCompositeProcessor.sip

This file was deleted.

23 changes: 0 additions & 23 deletions source/PYTHON/EXTENSIONS/BALL/pyFragmentProcessor.sip

This file was deleted.

23 changes: 0 additions & 23 deletions source/PYTHON/EXTENSIONS/BALL/pyResidueProcessor.sip

This file was deleted.

Loading

0 comments on commit 50f4484

Please sign in to comment.