Skip to content

Commit

Permalink
refs #4328. Apply default arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Jan 5, 2012
1 parent c4b224d commit 04a6382
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Code/Mantid/Framework/PythonAPI/src/geometry_exports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ namespace Mantid

void export_goniometer()
{
enum_< Geometry::RotationSense>("RotationSense")
.value("CW", Geometry::CW)
.value("CCW", Geometry::CCW)
.export_values();


class_< Geometry::GoniometerAxis, boost::noncopyable>("GoniometerAxis", no_init)
.add_property("name", &Geometry::GoniometerAxis::name)
.add_property("rotationaxis", &Geometry::GoniometerAxis::rotationaxis)
Expand All @@ -299,11 +305,11 @@ namespace Mantid
.def( init< Geometry::Goniometer const & >(( arg("other") )) )
.def( "getR", &getR )
.def( "axesInfo", &Geometry::Goniometer::axesInfo )
.def( "pushAxis", &Geometry::Goniometer::pushAxis, ( arg("name"), arg("axisx"), arg("axisy"), arg("axisz"), arg("angle"), arg("CCW"), arg("angleUnit")=(int)(Geometry::angDegrees) ) )
.def( "setRotationAngle", (void ( Geometry::Goniometer::* )( std::string, double) ) (&Geometry::Goniometer::setRotationAngle), (arg("name"), arg("value") ) )
.def( "setRotationAngle", (void ( Geometry::Goniometer::* )( size_t, double) ) (&Geometry::Goniometer::setRotationAngle), (arg("axisnumber"), arg("value") ) )
.def( "getAxis", (Geometry::GoniometerAxis (Geometry::Goniometer::* )(std::string) ) (&Geometry::Goniometer::getAxis), (arg("axisname") ) )
.def( "getNumberAxes", (size_t ( Geometry::Goniometer::* )( std::string) ) (&Geometry::Goniometer::getNumberAxes), (arg("axisname") ) )
.def( "pushAxis", (void ( Geometry::Goniometer::* ) ( std::string, double, double, double, double, int, int) )(&Geometry::Goniometer::pushAxis), ( arg("name"), arg("axisX"), arg("axisY"), arg("axisZ"), arg("angle"), arg("sense")=(int)(Geometry::CCW), arg("angleUnit")=(int)(Geometry::angDegrees) ) )
.def( "setRotationAngle", (void ( Geometry::Goniometer::* )( std::string, double) ) (&Geometry::Goniometer::setRotationAngle), (arg("name"), arg("angle") ) )
.def( "setRotationAngle", (void ( Geometry::Goniometer::* )( size_t, double) ) (&Geometry::Goniometer::setRotationAngle), (arg("axisNumber"), arg("angle") ) )
.def( "getAxis", (Geometry::GoniometerAxis (Geometry::Goniometer::* )(std::string) ) (&Geometry::Goniometer::getAxis), (arg("name") ) )
.def( "getNumberAxes", &Geometry::Goniometer::getNumberAxes, (arg("axisname") ) )
.def( "makeUniversalGoniometer", (void ( Geometry::Goniometer::*)() ) (&Geometry::Goniometer::makeUniversalGoniometer) )
.def( "getEulerAngles", (std::vector<double> ( Geometry::Goniometer::* )(std::string) ) (&Geometry::Goniometer::getEulerAngles), (arg("convention")=(std::string)("XYZ") ) )
;
Expand Down

0 comments on commit 04a6382

Please sign in to comment.