Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
f3f08830
Commit
f3f08830
authored
8 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rm another remnants of Py++; delete empty lines in libBornAgainCore.i
parent
0fa14fb9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Core/PythonAPI/PythonCoreExposer.h
+0
-73
0 additions, 73 deletions
Core/PythonAPI/PythonCoreExposer.h
dev-tools/swig/libBornAgainCore.i
+2
-61
2 additions, 61 deletions
dev-tools/swig/libBornAgainCore.i
with
2 additions
and
134 deletions
Core/PythonAPI/PythonCoreExposer.h
deleted
100644 → 0
+
0
−
73
View file @
0fa14fb9
// ************************************************************************** //
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file PythonAPI/inc/PythonCoreExposer.h
//! @brief Helpers for automatic PythonAPI generation
//!
//! @homepage http://apps.jcns.fz-juelich.de/BornAgain
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2013
//! @authors Scientific Computing Group at MLZ Garching
//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke
//
// ************************************************************************** //
#ifndef PYTHONCOREEXPOSER_H
#define PYTHONCOREEXPOSER_H
#include
"Types.h"
#include
"BasicVector3D.h"
#include
"IFormFactor.h"
#include
"OutputData.h"
#include
"ISampleBuilder.h"
#include
"FTDistributions.h"
#include
"RealParameterWrapper.h"
//! this is special namespace to help Py++ generate correct names
namespace
pyplusplus
{
namespace
aliases
{
using
namespace
Geometry
;
typedef
BasicVector3D
<
double
>
kvector_t
;
typedef
std
::
vector
<
kvector_t
>
vector_kvector_t
;
typedef
BasicVector3D
<
std
::
complex
<
double
>
>
cvector_t
;
typedef
std
::
vector
<
cvector_t
>
vector_cvector_t
;
typedef
std
::
vector
<
IFormFactor
*>
vector_IFormFactorPtr_t
;
typedef
OutputData
<
double
>
IntensityData
;
typedef
std
::
vector
<
int
>
vector_integer_t
;
typedef
std
::
vector
<
unsigned
long
int
>
vector_longinteger_t
;
typedef
std
::
vector
<
complex_t
>
vector_complex_t
;
typedef
std
::
vector
<
std
::
string
>
vector_string_t
;
typedef
std
::
vector
<
RealParameterWrapper
>
vector_realparameter_t
;
// typedef std::vector<ParameterSample> vector_ParameterSample_t;
typedef
std
::
vector
<
double
>
vdouble1d_t
;
typedef
std
::
vector
<
vdouble1d_t
>
vdouble2d_t
;
}
}
//! helper function to set value via subscript operator from python
template
<
class
Self
,
class
Key
,
class
Value
>
void
pyplusplus_setitem
(
Self
&
self
,
Key
const
&
key
,
Value
const
&
value
)
{
self
[
key
]
=
value
;
}
//! functions to help Py++ with template instantiation
namespace
pyplusplus
{
inline
size_t
pyplusplus_boost_kvector
()
{
return
sizeof
(
pyplusplus
::
aliases
::
kvector_t
);
}
inline
size_t
pyplusplus_boost_vectorof_kvector
()
{
return
sizeof
(
pyplusplus
::
aliases
::
vector_kvector_t
);
}
inline
size_t
pyplusplus_boost_cvector
()
{
return
sizeof
(
pyplusplus
::
aliases
::
cvector_t
);
}
inline
size_t
pyplusplus_boost_vectorof_cvector
()
{
return
sizeof
(
pyplusplus
::
aliases
::
vector_cvector_t
);
}
inline
size_t
pyplusplus_boost_vector_integer
()
{
return
sizeof
(
pyplusplus
::
aliases
::
vector_integer_t
);
}
inline
size_t
pyplusplus_boost_vector_longinteger
()
{
return
sizeof
(
pyplusplus
::
aliases
::
vector_longinteger_t
);
}
inline
size_t
pyplusplus_boost_intensity_data
()
{
return
sizeof
(
pyplusplus
::
aliases
::
IntensityData
);
}
inline
size_t
pyplusplus_boost_vector_complex
()
{
return
sizeof
(
pyplusplus
::
aliases
::
vector_complex_t
);
}
inline
size_t
pyplusplus_boost_vector_string
()
{
return
sizeof
(
pyplusplus
::
aliases
::
vector_string_t
);
}
inline
size_t
pyplusplus_boost_vector_realparameter
()
{
return
sizeof
(
pyplusplus
::
aliases
::
vector_realparameter_t
);
}
// inline size_t pyplusplus_boost_vector_ParameterSample() { return sizeof(pyplusplus::aliases::vector_ParameterSample_t); }
inline
size_t
pyplusplus_boost_vector_vdouble2d_t
()
{
return
sizeof
(
pyplusplus
::
aliases
::
vdouble2d_t
);
}
}
#endif // PYTHONCOREEXPOSER_H
This diff is collapsed.
Click to expand it.
dev-tools/swig/libBornAgainCore.i
+
2
−
61
View file @
f3f08830
...
...
@@ -18,12 +18,6 @@
//%feature("director");
%
feature
(
"
autodoc
"
)
;
/**/
%
include
"
stdint.i
"
%
include
"
std_complex.i
"
...
...
@@ -31,7 +25,6 @@
%
include
"
std_vector.i
"
%
include
"
std_shared_ptr.i
"
%
include
"
doxygen_core.i
"
%
include
"
warnings.i
"
...
...
@@ -42,8 +35,6 @@
// include the list of smart pointers (common between Core and Fit)
%
include
"
shared_pointers.i
"
// from PythonCoreExposer.h
%
template
(
vdouble1d_t
)
std
::
vector
<
double
>
;
%
template
(
vdouble2d_t
)
std
::
vector
<
std
::
vector
<
double
>
>
;
%
template
(
vector_integer_t
)
std
::
vector
<
int
>
;
...
...
@@ -51,9 +42,6 @@
%
template
(
vector_complex_t
)
std
::
vector
<
std
::
complex
<
double
>
>
;
%
template
(
vector_string_t
)
std
::
vector
<
std
::
string
>
;
#
define
SWIG_FILE_WITH_INIT
%
{
...
...
@@ -70,17 +58,13 @@
#
define
GCC_DIAG_OFF
(
x
)
#
define
GCC_DIAG_ON
(
x
)
#
ifndef
BORNAGAIN_PYTHON
#
define
BORNAGAIN_PYTHON
#
endif
%
import
"
WinDllMacros.h
"
%
{
#include "AttLimits.h"
#include "BAVersion.h"
#include "BasicVector3D.h"
...
...
@@ -200,7 +184,8 @@
#include "RectangularDetector.h"
#include "ResolutionFunction2DGaussian.h"
#include "Rotations.h"
#include "ISelectionRule.h"
#include "SampleBuilderFactory.h"
#include "SimulationRegistry.h"
#include "Simulation.h"
#include "SimulationParameters.h"
#include "SpecularSimulation.h"
...
...
@@ -211,37 +196,16 @@
#include "Units.h"
#include "VariableBinAxis.h"
#include "WavevectorInfo.h"
#include "SampleBuilderFactory.h"
#include "SimulationRegistry.h"
%}
// import headers to be exported to Python interace.
// Note that the order of inclusion matters, as base classes must be imported before derived classes
%
include
"
AttLimits.h
"
%
include
"
ICloneable.h
"
%
include
"
INamed.h
"
//typedef INamedTemplate<void> INamed;
//typedef INamedTemplate<int> INamedShared;
//%include "INamedShared.h"
%
include
"
IParameterized.h
"
//typedef IParameterized<void> IParamet
//%include "IParameterizedShared.h"
%
include
"
BAVersion.h
"
%
include
"
BasicVector3D.h
"
...
...
@@ -276,16 +240,13 @@
%
include
"
ICompositeSample.h
"
%
include
"
IClusteredParticles.h
"
%
include
"
Crystal.h
"
%
include
"
Distributions.h
"
%
include
"
Ellipse.h
"
%
include
"
FTDecayFunctions.h
"
%
include
"
FTDistributions.h
"
%
include
"
FixedBinAxis.h
"
%
include
"
IFormFactor.h
"
%
template
(
vector_IFormFactorPtr_t
)
std
::
vector
<
IFormFactor
*>
;
%
include
"
IFormFactorBorn.h
"
%
include
"
IFormFactorDecorator.h
"
%
include
"
FormFactorAnisoPyramid.h
"
...
...
@@ -322,35 +283,26 @@
%
include
"
FormFactorTruncatedSphere.h
"
%
include
"
FormFactorTruncatedSpheroid.h
"
%
include
"
FormFactorWeighted.h
"
%
include
"
Simulation.h
"
%
include
"
SimulationParameters.h
"
%
include
"
GISASSimulation.h
"
%
include
"
IHistogram.h
"
%
include
"
Histogram1D.h
"
%
include
"
Histogram2D.h
"
%
include
"
IMaterial.h
"
%
include
"
HomogeneousMaterial.h
"
%
include
"
HomogeneousMagneticMaterial.h
"
%
include
"
IDetector2D.h
"
%
include
"
IDetectorResolution.h
"
%
include
"
Distributions.h
"
%
include
"
FTDecayFunctions.h
"
%
include
"
IInterferenceFunction.h
"
%
include
"
ILayout.h
"
%
include
"
IObserver.h
"
%
include
"
IParticle.h
"
%
include
"
IResolutionFunction2D.h
"
%
include
"
Rotations.h
"
%
include
"
ISelectionRule.h
"
%
include
"
ISingleton.h
"
%
include
"
Instrument.h
"
%
include
"
IntensityDataFunctions.h
"
...
...
@@ -365,7 +317,6 @@
%
include
"
InterferenceFunction2DLattice.h
"
%
include
"
InterferenceFunction2DParaCrystal.h
"
%
include
"
InterferenceFunctionNone.h
"
%
include
"
IPixelMap.h
"
%
include
"
SphericalDetector.h
"
%
include
"
IsGISAXSDetector.h
"
...
...
@@ -373,7 +324,6 @@
%
include
"
Lattice1DParameters.h
"
%
include
"
Lattice2DParameters.h
"
%
include
"
Layer.h
"
%
include
"
IRoughness.h
"
%
include
"
LayerRoughness.h
"
%
include
"
Line.h
"
...
...
@@ -382,10 +332,8 @@
%
include
"
MessageService.h
"
%
include
"
MultiLayer.h
"
%
include
"
OffSpecSimulation.h
"
%
include
"
OutputData.h
"
%
template
(
IntensityData
)
OutputData
<
double
>
;
%
include
"
OutputDataFunctions.h
"
%
include
"
ParameterDistribution.h
"
%
include
"
ParameterPool.h
"
...
...
@@ -401,14 +349,7 @@
%
include
"
ResolutionFunction2DGaussian.h
"
%
include
"
Rotations.h
"
%
include
"
ISelectionRule.h
"
%
include
"
SpecularSimulation.h
"
%
include
"
ThreadInfo.h
"
%
include
"
SampleBuilderFactory.h
"
%
include
"
SimulationRegistry.h
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment