diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayBoundedValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayBoundedValidator.cpp index 08351c19cc235b9e3c935d817322551be37e28aa..04d050698f8a9cf2020d253438220c7d3c56bc62 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayBoundedValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayBoundedValidator.cpp @@ -11,27 +11,27 @@ namespace { #define EXPORT_ARRAYBOUNDEDVALIDATOR(type, prefix) \ class_<ArrayBoundedValidator<type>, bases<IValidator>, boost::noncopyable>( \ #prefix "ArrayBoundedValidator") \ - .def(init<type, type>( \ - (arg("self"),arg("lowerBound"), arg("upperBound")), \ + .def(init<type, type>( \ + (arg("self"), arg("lowerBound"), arg("upperBound")), \ "A validator to ensure each value is in the given range")) \ - .def("hasLower", &ArrayBoundedValidator<type>::hasLower, arg("self"), \ + .def("hasLower", &ArrayBoundedValidator<type>::hasLower, arg("self"), \ "Returns true if a lower bound has been set") \ - .def("hasUpper", &ArrayBoundedValidator<type>::hasUpper, arg("self"), \ + .def("hasUpper", &ArrayBoundedValidator<type>::hasUpper, arg("self"), \ "Returns true if an upper bound has been set") \ - .def("lower", &ArrayBoundedValidator<type>::lower, arg("self"), \ + .def("lower", &ArrayBoundedValidator<type>::lower, arg("self"), \ return_value_policy<copy_const_reference>(), \ "Returns the lower bound") \ - .def("upper", &ArrayBoundedValidator<type>::upper, arg("self"), \ + .def("upper", &ArrayBoundedValidator<type>::upper, arg("self"), \ return_value_policy<copy_const_reference>(), \ "Returns the upper bound") \ - .def("setLower", &ArrayBoundedValidator<type>::setLower, (arg("self"),arg("lower")), \ - "Sets the lower bound") \ - .def("setUpper", &ArrayBoundedValidator<type>::setUpper, (arg("self"),arg("upper")), \ - "Sets the upper bound") \ - .def("clearLower", &ArrayBoundedValidator<type>::clearLower, arg("self"), \ - "Clear any set lower bound") \ - .def("clearUpper", &ArrayBoundedValidator<type>::clearUpper, arg("self"), \ - "Clear any set upper bound"); + .def("setLower", &ArrayBoundedValidator<type>::setLower, \ + (arg("self"), arg("lower")), "Sets the lower bound") \ + .def("setUpper", &ArrayBoundedValidator<type>::setUpper, \ + (arg("self"), arg("upper")), "Sets the upper bound") \ + .def("clearLower", &ArrayBoundedValidator<type>::clearLower, \ + arg("self"), "Clear any set lower bound") \ + .def("clearUpper", &ArrayBoundedValidator<type>::clearUpper, \ + arg("self"), "Clear any set upper bound"); } void export_ArrayBoundedValidator() { diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayLengthValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayLengthValidator.cpp index c5907328d72ecddf5e5bd0a241e3e7c88bc7da74..1c405b0a82329d73a07155177f8d132e2285c48d 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayLengthValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayLengthValidator.cpp @@ -12,38 +12,42 @@ namespace { #define EXPORT_LENGTHVALIDATOR(type, prefix) \ class_<ArrayLengthValidator<type>, bases<IValidator>, boost::noncopyable>( \ #prefix "ArrayLengthValidator") \ - .def(init<int>((arg("self"),arg("length")), "Constructs a validator verifying that " \ - "an array is of the exact length given")) \ - .def(init<int, int>((arg("self"),arg("lenmin"), arg("lenmax")), \ + .def(init<int>((arg("self"), arg("length")), \ + "Constructs a validator verifying that " \ + "an array is of the exact length given")) \ + .def(init<int, int>((arg("self"), arg("lenmin"), arg("lenmax")), \ "Constructs a validator verifying that the length " \ "of an array is within the range given")) \ - .def("hasLength", &ArrayLengthValidator<type>::hasLength, arg("self"), \ + .def("hasLength", &ArrayLengthValidator<type>::hasLength, arg("self"), \ "Returns true if a single length has been set") \ - .def("hasMinLength", &ArrayLengthValidator<type>::hasMinLength, arg("self"), \ - "Returns true if a minimum length has been set") \ - .def("hasMaxLength", &ArrayLengthValidator<type>::hasMaxLength, arg("self"), \ - "Returns true if a maximum length has been set") \ + .def("hasMinLength", &ArrayLengthValidator<type>::hasMinLength, \ + arg("self"), "Returns true if a minimum length has been set") \ + .def("hasMaxLength", &ArrayLengthValidator<type>::hasMaxLength, \ + arg("self"), "Returns true if a maximum length has been set") \ .def("getLength", &ArrayLengthValidator<type>::getLength, \ - return_value_policy<copy_const_reference>(), arg("self"), \ + return_value_policy<copy_const_reference>(), arg("self"), \ "Returns the set fixed length") \ .def("getMinLength", &ArrayLengthValidator<type>::getMinLength, \ - return_value_policy<copy_const_reference>(), arg("self"), \ + return_value_policy<copy_const_reference>(), arg("self"), \ "Returns the set minimum length") \ .def("getMaxLength", &ArrayLengthValidator<type>::getMaxLength, \ - return_value_policy<copy_const_reference>(), arg("self"), \ + return_value_policy<copy_const_reference>(), arg("self"), \ "Returns the set maximum length") \ - .def("setLength", &ArrayLengthValidator<type>::setLength, (arg("self"),arg("length")), \ + .def("setLength", &ArrayLengthValidator<type>::setLength, \ + (arg("self"), arg("length")), \ "Set the accepted length of an array") \ - .def("clearLength", &ArrayLengthValidator<type>::clearLength, arg("self"), \ - "Clears accepted length of an array") \ - .def("setLengthMin", &ArrayLengthValidator<type>::setLengthMin, (arg("self"),arg("minimum length")), \ + .def("clearLength", &ArrayLengthValidator<type>::clearLength, \ + arg("self"), "Clears accepted length of an array") \ + .def("setLengthMin", &ArrayLengthValidator<type>::setLengthMin, \ + (arg("self"), arg("minimum length")), \ "Set the accepted minimum length of an array") \ - .def("setLengthMax", &ArrayLengthValidator<type>::setLengthMax, (arg("self"),arg("maximum length")), \ + .def("setLengthMax", &ArrayLengthValidator<type>::setLengthMax, \ + (arg("self"), arg("maximum length")), \ "Set the accepted maximum length of an array") \ - .def("clearLengthMin", &ArrayLengthValidator<type>::clearLengthMin, arg("self"), \ - "Set the accepted minimum length of an array") \ - .def("clearLengthMax", &ArrayLengthValidator<type>::clearLengthMax, arg("self"), \ - "Set the accepted maximum length of an array"); + .def("clearLengthMin", &ArrayLengthValidator<type>::clearLengthMin, \ + arg("self"), "Set the accepted minimum length of an array") \ + .def("clearLengthMax", &ArrayLengthValidator<type>::clearLengthMax, \ + arg("self"), "Set the accepted maximum length of an array"); } void export_ArrayLengthValidator() { diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp index df6f57368f2183e84bbd00cbe78056f164e1ea50..0a44570ab12ebb2728ead06f93df0c79c704c98d 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp @@ -30,17 +30,17 @@ typedef return_value_policy<Policies::VectorRefToNumpy<Converters::Clone>> class_<ArrayProperty<type>, bases<PropertyWithValue<std::vector<type>>>, \ boost::noncopyable>(#prefix "ArrayProperty", no_init) \ .def(init<const std::string &, const unsigned int>( \ - (arg("self"),arg("name"), arg("direction") = Direction::Input), \ + (arg("self"), arg("name"), arg("direction") = Direction::Input), \ "Construct an ArrayProperty of type" #type)) \ \ .def(init<const std::string &, IValidator_sptr, const unsigned int>( \ - (arg("self"),arg("name"), arg("validator"), \ + (arg("self"), arg("name"), arg("validator"), \ arg("direction") = Direction::Input), \ "Construct an ArrayProperty of type" #type "with a validator")) \ \ .def(init<const std::string &, const std::string &, IValidator_sptr, \ const unsigned int>( \ - (arg("self"),arg("name"), arg("values"), \ + (arg("self"), arg("name"), arg("values"), \ arg("validator") = IValidator_sptr(new NullValidator), \ arg("direction") = Direction::Input), \ "Construct an ArrayProperty of type" #type \ diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/BoundedValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/BoundedValidator.cpp index 58408bdb5d3c396c94694b32396bffc60fde2bfc..5aef737a654e84fc3e27b1d69d2519589aae449d 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/BoundedValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/BoundedValidator.cpp @@ -67,35 +67,38 @@ createExclusiveBoundedValidator(object lower = object(), default_call_policies(), \ (arg("lower") = object(), arg("upper") = object(), \ arg("exclusive") = false))) \ - .def("setLower", &BoundedValidator<ElementType>::setLower, (arg("self"),arg("lower")), \ - "Set the lower bound") \ - .def("setUpper", &BoundedValidator<ElementType>::setUpper, (arg("self"),arg("upper")), \ - "Set the upper bound") \ + .def("setLower", &BoundedValidator<ElementType>::setLower, \ + (arg("self"), arg("lower")), "Set the lower bound") \ + .def("setUpper", &BoundedValidator<ElementType>::setUpper, \ + (arg("self"), arg("upper")), "Set the upper bound") \ .def("setLowerExclusive", \ - &BoundedValidator<ElementType>::setLowerExclusive, (arg("self"),arg("exclusive")), \ + &BoundedValidator<ElementType>::setLowerExclusive, \ + (arg("self"), arg("exclusive")), \ "Sets if the lower bound is exclusive") \ .def("setUpperExclusive", \ - &BoundedValidator<ElementType>::setUpperExclusive, (arg("self"),arg("exclusive")), \ + &BoundedValidator<ElementType>::setUpperExclusive, \ + (arg("self"), arg("exclusive")), \ "Sets if the upper bound is exclsuive") \ - .def("setExclusive", &BoundedValidator<ElementType>::setExclusive, (arg("self"),arg("exclusive")), \ + .def("setExclusive", &BoundedValidator<ElementType>::setExclusive, \ + (arg("self"), arg("exclusive")), \ "Sets both bounds to be inclusive/exclusive") \ - .def("lower", &BoundedValidator<ElementType>::lower, arg("self"), \ + .def("lower", &BoundedValidator<ElementType>::lower, arg("self"), \ return_value_policy<copy_const_reference>(), \ "Returns the lower bound") \ - .def("upper", &BoundedValidator<ElementType>::upper, arg("self"), \ + .def("upper", &BoundedValidator<ElementType>::upper, arg("self"), \ return_value_policy<copy_const_reference>(), \ "Returns the upper bound") \ - .def("setBounds", &BoundedValidator<ElementType>::setBounds, (arg("self"),arg("lower"),arg("upper")), \ - "Set both bounds") \ - .def("hasLower", &BoundedValidator<ElementType>::hasLower, arg("self"), \ + .def("setBounds", &BoundedValidator<ElementType>::setBounds, \ + (arg("self"), arg("lower"), arg("upper")), "Set both bounds") \ + .def("hasLower", &BoundedValidator<ElementType>::hasLower, arg("self"), \ "Returns True if a lower bound has been set") \ - .def("hasUpper", &BoundedValidator<ElementType>::hasUpper, arg("self"), \ + .def("hasUpper", &BoundedValidator<ElementType>::hasUpper, arg("self"), \ "Returns True if an upper bound has been set") \ .def("isLowerExclusive", \ - &BoundedValidator<ElementType>::isLowerExclusive, arg("self"), \ + &BoundedValidator<ElementType>::isLowerExclusive, arg("self"), \ "Returns True if the lower bound is exclusive") \ .def("isUpperExclusive", \ - &BoundedValidator<ElementType>::isUpperExclusive, arg("self"), \ + &BoundedValidator<ElementType>::isUpperExclusive, arg("self"), \ "Returns True if the upper bound is exclusive"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/CompositeValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/CompositeValidator.cpp index d5cee8f394b63a4b903d7dd125d1e803451dca4e..94f4416922ee772c84d371210918a467694f1e29 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/CompositeValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/CompositeValidator.cpp @@ -39,6 +39,6 @@ void export_CompositeValidator() { (arg("validators")))) .def("add", (void (CompositeValidator::*)(IValidator_sptr)) & - CompositeValidator::add,(arg("self"),arg("other")), - "Add another validator to the list"); + CompositeValidator::add, + (arg("self"), arg("other")), "Add another validator to the list"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp index 3624c15d62cb5e1fdefb048688b04f22ef4d9672..61163771c9d2d3e88a73a25de32ab62e32c6cecb 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp @@ -41,101 +41,117 @@ void export_ConfigService() { std_vector_exporter<FacilityInfo *>::wrap("std_vector_facilityinfo"); class_<ConfigServiceImpl, boost::noncopyable>("ConfigServiceImpl", no_init) - .def("reset", &ConfigServiceImpl::reset,arg("self"), + .def("reset", &ConfigServiceImpl::reset, arg("self"), "Clears all user settings and removes the user properties file") - .def("getLocalFilename", &ConfigServiceImpl::getLocalFilename,arg("self"), - "Returns the path to the system wide properties file.") + .def("getLocalFilename", &ConfigServiceImpl::getLocalFilename, + arg("self"), "Returns the path to the system wide properties file.") - .def("getUserFilename", &ConfigServiceImpl::getUserFilename,arg("self"), + .def("getUserFilename", &ConfigServiceImpl::getUserFilename, arg("self"), "Returns the path to the user properties file") - .def("getInstrumentDirectory", &ConfigServiceImpl::getInstrumentDirectory,arg("self"), + .def("getInstrumentDirectory", &ConfigServiceImpl::getInstrumentDirectory, + arg("self"), "Returns the directory used for the instrument definitions") .def("getInstrumentDirectories", - &ConfigServiceImpl::getInstrumentDirectories,arg("self"), + &ConfigServiceImpl::getInstrumentDirectories, arg("self"), return_value_policy<reference_existing_object>(), "Returns the list of directories searched for the instrument " "definitions") - .def("getFacilityNames", &ConfigServiceImpl::getFacilityNames,arg("self"), - "Returns the default facility") + .def("getFacilityNames", &ConfigServiceImpl::getFacilityNames, + arg("self"), "Returns the default facility") - .def("getFacilities", &ConfigServiceImpl::getFacilities,arg("self"), + .def("getFacilities", &ConfigServiceImpl::getFacilities, arg("self"), "Returns the default facility") .def("getFacility", (const FacilityInfo &(ConfigServiceImpl::*)() const) & - ConfigServiceImpl::getFacility,arg("self"), - return_value_policy<reference_existing_object>(), + ConfigServiceImpl::getFacility, + arg("self"), return_value_policy<reference_existing_object>(), "Returns the default facility") .def("getFacility", (const FacilityInfo &(ConfigServiceImpl::*)(const std::string &) const) & ConfigServiceImpl::getFacility, - (arg("self"),arg("facilityName")), + (arg("self"), arg("facilityName")), return_value_policy<reference_existing_object>(), "Returns the named facility. Raises an RuntimeError if it does not " "exist") - .def("setFacility", &ConfigServiceImpl::setFacility,(arg("self"),arg("facilityName")), + .def("setFacility", &ConfigServiceImpl::setFacility, + (arg("self"), arg("facilityName")), "Sets the current facility to the given name") - .def("updateFacilities", &ConfigServiceImpl::updateFacilities,(arg("self"),arg("fileName")), + .def("updateFacilities", &ConfigServiceImpl::updateFacilities, + (arg("self"), arg("fileName")), "Loads facility information from a provided file") .def("getInstrument", &ConfigServiceImpl::getInstrument, getInstrument_Overload( "Returns the named instrument. If name = \"\" then the " "default.instrument is returned", - (arg("self"),arg("instrumentName") = + (arg("self"), + arg("instrumentName") = ""))[return_value_policy<copy_const_reference>()]) .def("getString", &ConfigServiceImpl::getString, - getString_Overload("Returns the named key's value. If use_cache = " - "true [default] then relative paths->absolute", - (arg("self"),arg("key"), arg("use_cache") = true))) + getString_Overload( + "Returns the named key's value. If use_cache = " + "true [default] then relative paths->absolute", + (arg("self"), arg("key"), arg("use_cache") = true))) - .def("setString", &ConfigServiceImpl::setString,(arg("self"),arg("key"),arg("value")), + .def("setString", &ConfigServiceImpl::setString, + (arg("self"), arg("key"), arg("value")), "Set the given property name. " "If it does not exist it is added to the current configuration") - .def("hasProperty", &ConfigServiceImpl::hasProperty,(arg("self"),arg("rootName"))) + .def("hasProperty", &ConfigServiceImpl::hasProperty, + (arg("self"), arg("rootName"))) - .def("getDataSearchDirs", &ConfigServiceImpl::getDataSearchDirs,arg("self"), - return_value_policy<copy_const_reference>(), + .def("getDataSearchDirs", &ConfigServiceImpl::getDataSearchDirs, + arg("self"), return_value_policy<copy_const_reference>(), "Return the current list of data search paths") - .def("appendDataSearchDir", &ConfigServiceImpl::appendDataSearchDir,(arg("self"),arg("path")), + .def("appendDataSearchDir", &ConfigServiceImpl::appendDataSearchDir, + (arg("self"), arg("path")), "Append a directory to the current list of data search paths") .def("setDataSearchDirs", (void (ConfigServiceImpl::*)(const std::string &)) & - ConfigServiceImpl::setDataSearchDirs,(arg("self"),arg("searchDirs")), + ConfigServiceImpl::setDataSearchDirs, + (arg("self"), arg("searchDirs")), "Set the whole datasearch.directories property from a single " "string. Entries should be separated by a ; character") - .def("setDataSearchDirs", &setDataSearchDirs,(arg("self"),arg("searchDirs")), + .def("setDataSearchDirs", &setDataSearchDirs, + (arg("self"), arg("searchDirs")), "Set the datasearch.directories property from a list of strings.") - .def("saveConfig", &ConfigServiceImpl::saveConfig,(arg("self"),arg("filename")), + .def("saveConfig", &ConfigServiceImpl::saveConfig, + (arg("self"), arg("filename")), "Saves the keys that have changed from their default to the given " "filename") - .def("setFileLogLevel", &ConfigServiceImpl::setFileLogLevel,(arg("self"),arg("logLevel")), - "Sets the log level priority for the File log channel, logLevel 1 = Fatal, 6 = information, 7 = Debug") - - .def("setConsoleLogLevel", &ConfigServiceImpl::setConsoleLogLevel,(arg("self"),arg("logLevel")), - "Sets the log level priority for the Console log channel, logLevel 1 = Fatal, 6 = information, 7 = Debug") + .def("setFileLogLevel", &ConfigServiceImpl::setFileLogLevel, + (arg("self"), arg("logLevel")), "Sets the log level priority for " + "the File log channel, logLevel 1 = " + "Fatal, 6 = information, 7 = Debug") + .def("setConsoleLogLevel", &ConfigServiceImpl::setConsoleLogLevel, + (arg("self"), arg("logLevel")), + "Sets the log level priority for the Console log channel, logLevel " + "1 = Fatal, 6 = information, 7 = Debug") - .def("keys", &ConfigServiceImpl::keys,arg("self")) + .def("keys", &ConfigServiceImpl::keys, arg("self")) // Treat this as a dictionary - .def("__getitem__", &getStringUsingCache,(arg("self"),arg("key"))) - .def("__setitem__", &ConfigServiceImpl::setString, (arg("self"),arg("key"),arg("value"))) - .def("__contains__", &ConfigServiceImpl::hasProperty,(arg("self"),arg("key"))) + .def("__getitem__", &getStringUsingCache, (arg("self"), arg("key"))) + .def("__setitem__", &ConfigServiceImpl::setString, + (arg("self"), arg("key"), arg("value"))) + .def("__contains__", &ConfigServiceImpl::hasProperty, + (arg("self"), arg("key"))) .def("Instance", &ConfigService::Instance, return_value_policy<reference_existing_object>(), "Returns a reference to the ConfigService") diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/DataItem.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/DataItem.cpp index e226309a7a50c76d387ba77684daf6840b83fdcf..00138aa8bb7557bd71cf8b05bb29e429f9c7556e 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/DataItem.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/DataItem.cpp @@ -11,10 +11,11 @@ void export_DataItem() { class_<DataItem, boost::noncopyable>("DataItem", no_init) .def("id", &DataItem::id, arg("self"), "The string ID of the class") - .def("name", &DataItem::name, arg("self"),"The name of the object") - .def("threadSafe", &DataItem::threadSafe, arg("self"), "Returns true if the object " - "can be accessed safely from " - "multiple threads") + .def("name", &DataItem::name, arg("self"), "The name of the object") + .def("threadSafe", &DataItem::threadSafe, arg("self"), + "Returns true if the object " + "can be accessed safely from " + "multiple threads") .def("__str__", &DataItem::name, arg("self"), "Returns the string name of the object if it has been stored") .def("__repr__", &DataItem::toString, arg("self"), diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/DateAndTime.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/DateAndTime.cpp index 06b27279b7e1eb919190d17b6902fd4a5a605e5c..4928393000b1b61d19e99d649308dca8a408f8f2 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/DateAndTime.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/DateAndTime.cpp @@ -20,17 +20,21 @@ std::string ISO8601StringPlusSpace(DateAndTime &self) { void export_DateAndTime() { class_<DateAndTime>("DateAndTime", no_init) // Constructors - .def(init<const std::string>((arg("self"),arg("ISO8601 string")),"Construct from an ISO8601 string")) - .def(init<double, double>((arg("self"),arg("seconds"),arg("nanoseconds")), + .def(init<const std::string>((arg("self"), arg("ISO8601 string")), + "Construct from an ISO8601 string")) + .def(init<double, double>( + (arg("self"), arg("seconds"), arg("nanoseconds")), "Construct using a number of seconds and nanoseconds (floats)")) - .def(init<int64_t, int64_t>((arg("self"),arg("seconds"),arg("nanoseconds")), + .def(init<int64_t, int64_t>( + (arg("self"), arg("seconds"), arg("nanoseconds")), "Construct using a number of seconds and nanoseconds (integers)")) - .def(init<int64_t>((arg("self"),arg("total nanoseconds")),"Construct a total number of nanoseconds")) - .def("total_nanoseconds", &DateAndTime::totalNanoseconds,arg("self")) - .def("totalNanoseconds", &DateAndTime::totalNanoseconds,arg("self")) - .def("setToMinimum", &DateAndTime::setToMinimum,arg("self")) - .def("__str__", &ISO8601StringPlusSpace,arg("self")) - .def("__long__", &DateAndTime::totalNanoseconds,arg("self")) + .def(init<int64_t>((arg("self"), arg("total nanoseconds")), + "Construct a total number of nanoseconds")) + .def("total_nanoseconds", &DateAndTime::totalNanoseconds, arg("self")) + .def("totalNanoseconds", &DateAndTime::totalNanoseconds, arg("self")) + .def("setToMinimum", &DateAndTime::setToMinimum, arg("self")) + .def("__str__", &ISO8601StringPlusSpace, arg("self")) + .def("__long__", &DateAndTime::totalNanoseconds, arg("self")) .def(self == self) .def(self != self) // cppcheck-suppress duplicateExpression @@ -44,22 +48,24 @@ void export_DateAndTime() { void export_time_duration() { class_<time_duration>("time_duration", no_init) - .def("hours", &time_duration::hours,arg("self"), + .def("hours", &time_duration::hours, arg("self"), "Returns the normalized number of hours") - .def("minutes", &time_duration::minutes,arg("self"), + .def("minutes", &time_duration::minutes, arg("self"), "Returns the normalized number of minutes +/-(0..59)") - .def("seconds", &time_duration::seconds,arg("self"), + .def("seconds", &time_duration::seconds, arg("self"), "Returns the normalized number of seconds +/-(0..59)") - .def("total_seconds", &time_duration::total_seconds,arg("self"), + .def("total_seconds", &time_duration::total_seconds, arg("self"), "Get the total number of seconds truncating any fractional seconds") - .def("total_milliseconds", &time_duration::total_milliseconds,arg("self"), + .def("total_milliseconds", &time_duration::total_milliseconds, + arg("self"), "Get the total number of milliseconds truncating any remaining " "digits") - .def("total_microseconds", &time_duration::total_microseconds,arg("self"), + .def("total_microseconds", &time_duration::total_microseconds, + arg("self"), "Get the total number of microseconds truncating any remaining " "digits") .def( - "total_nanoseconds", &time_duration::total_nanoseconds,arg("self"), + "total_nanoseconds", &time_duration::total_nanoseconds, arg("self"), "Get the total number of nanoseconds truncating any remaining digits") ; diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/DeltaEMode.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/DeltaEMode.cpp index 9d52c6a9d74509a03c6aff193b697761c1464352..e3148bede17616f65de8dfa5494dc590a4beb101 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/DeltaEMode.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/DeltaEMode.cpp @@ -17,9 +17,9 @@ void export_DeltaEMode() { .export_values(); class_<DeltaEMode, boost::noncopyable>("DeltaEMode", no_init) - .def("asString", &DeltaEMode::asString,arg("self"), + .def("asString", &DeltaEMode::asString, arg("self"), "Returns the given type translated to a string") - .def("fromString", &DeltaEMode::fromString,arg("modeStr"), + .def("fromString", &DeltaEMode::fromString, arg("modeStr"), "Returns the enumerated type translated from a string") .def("availableTypes", &DeltaEMode::availableTypes, return_value_policy<Policies::VectorToNumpy>(), diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/EnabledWhenProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/EnabledWhenProperty.cpp index b328b297b82a665f4cf00eef325cea2f574765e4..9982028e943d1892288b44e4dc7eb4b9b8f38b32 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/EnabledWhenProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/EnabledWhenProperty.cpp @@ -18,12 +18,12 @@ void export_EnabledWhenProperty() { "EnabledWhenProperty", no_init) // no default constructor .def(init<std::string, ePropertyCriterion, std::string>( - (arg("self"),arg("otherPropName"), arg("when"), arg("value")), + (arg("self"), arg("otherPropName"), arg("when"), arg("value")), "Enabled otherPropName property when value criterion meets that " "given by the 'when' argument")) .def(init<std::string, ePropertyCriterion>( - (arg("self"),arg("otherPropName"), arg("when")), + (arg("self"), arg("otherPropName"), arg("when")), "Enabled otherPropName property when criterion does not require a " "value, i.e isDefault")); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/FacilityInfo.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/FacilityInfo.cpp index 1482a77d5ea9c814cbdb44c4c6ccb721be122124..907c51778cf610aba31d1a672e6df9a6a320a04e 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/FacilityInfo.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/FacilityInfo.cpp @@ -13,56 +13,58 @@ void export_FacilityInfo() { class_<FacilityInfo>("FacilityInfo", no_init) - .def("name", &FacilityInfo::name,arg("self"), + .def("name", &FacilityInfo::name, arg("self"), return_value_policy<copy_const_reference>(), "Returns name of the facility as definined in the Facilities.xml " "file") - .def("__str__", &FacilityInfo::name,arg("self"), + .def("__str__", &FacilityInfo::name, arg("self"), return_value_policy<copy_const_reference>(), "Returns name of the facility as definined in the Facilities.xml " "file") - .def("zeroPadding", &FacilityInfo::zeroPadding,arg("self"), + .def("zeroPadding", &FacilityInfo::zeroPadding, arg("self"), "Returns default zero padding for this facility") - .def("delimiter", &FacilityInfo::delimiter,arg("self"), + .def("delimiter", &FacilityInfo::delimiter, arg("self"), return_value_policy<copy_const_reference>(), "Returns the delimiter between the instrument name and the run " "number.") - .def("extensions", &FacilityInfo::extensions,arg("self"), + .def("extensions", &FacilityInfo::extensions, arg("self"), "Returns the list of file extensions that are considered as " "instrument data files.") - .def("preferredExtension", &FacilityInfo::preferredExtension,arg("self"), + .def("preferredExtension", &FacilityInfo::preferredExtension, arg("self"), return_value_policy<copy_const_reference>(), "Returns the extension that is preferred for this facility") - .def("archiveSearch", &FacilityInfo::archiveSearch,arg("self"), + .def("archiveSearch", &FacilityInfo::archiveSearch, arg("self"), return_value_policy<copy_const_reference>(), "Return the archive search interface names") .def("instruments", (const std::vector<InstrumentInfo> &(FacilityInfo::*)() const) & - FacilityInfo::instruments,arg("self"), - return_value_policy<copy_const_reference>(), + FacilityInfo::instruments, + arg("self"), return_value_policy<copy_const_reference>(), "Returns a list of instruments of this facility as defined in the " "Facilities.xml file") .def("instruments", (std::vector<InstrumentInfo>( FacilityInfo::*)(const std::string &) const) & - FacilityInfo::instruments,(arg("self"),arg("technique")), + FacilityInfo::instruments, + (arg("self"), arg("technique")), "Returns a list of instruments of given technique") - .def("instrument", &FacilityInfo::instrument,(arg("self"),arg("instrumentName")), + .def("instrument", &FacilityInfo::instrument, + (arg("self"), arg("instrumentName")), return_value_policy<copy_const_reference>(), "Returns the instrument with the given name") - .def("liveListener", &FacilityInfo::liveListener,arg("self"), + .def("liveListener", &FacilityInfo::liveListener, arg("self"), return_value_policy<copy_const_reference>(), "Returns the name of the default live listener") - .def("computeResources", &FacilityInfo::computeResources,arg("self"), + .def("computeResources", &FacilityInfo::computeResources, arg("self"), "Returns a vector of the available compute resources"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/FilteredTimeSeriesProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/FilteredTimeSeriesProperty.cpp index f2f5eb43480666d5661b0994e6ceb8dee3d9d6c2..dcf283dbc0448b16201f5058ef507836cec2488a 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/FilteredTimeSeriesProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/FilteredTimeSeriesProperty.cpp @@ -19,12 +19,11 @@ namespace { class_<FilteredTimeSeriesProperty<TYPE>, bases<TimeSeriesProperty<TYPE>>, \ boost::noncopyable>(#Prefix "FilteredTimeSeriesProperty", no_init) \ .def(init<TimeSeriesProperty<TYPE> *, const TimeSeriesProperty<bool> &, \ - const bool>("Constructor", (arg("self"), arg("source"), \ - arg("filter"), \ - arg("transferOwner")))) \ + const bool>( \ + "Constructor", \ + (arg("self"), arg("source"), arg("filter"), arg("transferOwner")))) \ .def("unfiltered", &FilteredTimeSeriesProperty<TYPE>::unfiltered, \ - (arg("self")), \ - return_value_policy<RemoveConst>(), \ + (arg("self")), return_value_policy<RemoveConst>(), \ "Returns a time series containing the unfiltered data"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertyManager.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertyManager.cpp index 91937a6a1b796cdfaf0db942642962c1f4449cbe..c1ff7244e8324999b904c3ed2a66dfde8be51dab 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertyManager.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertyManager.cpp @@ -127,14 +127,16 @@ void export_IPropertyManager() { return_value_policy<copy_const_reference>(), "Returns the list of properties managed by this object") - .def("declareProperty", &declareProperty, (arg("self"), arg("name"),arg("value")), + .def("declareProperty", &declareProperty, + (arg("self"), arg("name"), arg("value")), "Create a new named property") .def("setPropertyValue", &IPropertyManager::setPropertyValue, - (arg("self"), arg("name"),arg("value")), + (arg("self"), arg("name"), arg("value")), "Set the value of the named property via a string") - .def("setProperty", &setProperty, (arg("self"), arg("name"),arg("value")), + .def("setProperty", &setProperty, + (arg("self"), arg("name"), arg("value")), "Set the value of the named property") .def("setPropertySettings", &setPropertySettings, @@ -142,7 +144,8 @@ void export_IPropertyManager() { "Assign the given IPropertySettings object to the named property") .def("setPropertyGroup", &IPropertyManager::setPropertyGroup, - (arg("self"), arg("name"),arg("group")), "Set the group for a given property") + (arg("self"), arg("name"), arg("group")), + "Set the group for a given property") .def("existsProperty", &IPropertyManager::existsProperty, (arg("self"), arg("name")), "Returns whether a property exists") @@ -156,7 +159,8 @@ void export_IPropertyManager() { (arg("self"), arg("name")), return_value_policy<return_by_value>(), "Returns the property of the given name. Use .value to give the " "value") - .def("__setitem__", &declareOrSetProperty, (arg("self"), arg("name"),arg("value")), + .def("__setitem__", &declareOrSetProperty, + (arg("self"), arg("name"), arg("value")), "Set the value of the named property or create it if it doesn't " "exist") .def("__delitem__", &deleteProperty, (arg("self"), arg("name")), @@ -166,8 +170,8 @@ void export_IPropertyManager() { (arg("self"), arg("name")), "Returns whether a property exists") // Bonus methods to be even more like a dict - .def("has_key", &IPropertyManager::existsProperty, (arg("self"), arg("name")), - "Returns whether a property exists") + .def("has_key", &IPropertyManager::existsProperty, + (arg("self"), arg("name")), "Returns whether a property exists") .def("keys", &getKeys, arg("self")) .def("values", &IPropertyManager::getProperties, arg("self"), return_value_policy<copy_const_reference>(), diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertySettings.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertySettings.cpp index eeda9a27676591b2ede8b4f9ca7441ef83644667..fd960fc825ee672f356b8e749aaf328be27b2c69 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertySettings.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertySettings.cpp @@ -10,9 +10,11 @@ void export_IPropertySettings() { register_ptr_to_python<IPropertySettings *>(); class_<IPropertySettings, boost::noncopyable>("IPropertySettings", no_init) - .def("isEnabled", &IPropertySettings::isEnabled,(arg("self"),arg("alg")), + .def("isEnabled", &IPropertySettings::isEnabled, + (arg("self"), arg("alg")), "Is the property to be shown as enabled in the GUI. Default true.") - .def("isVisible", &IPropertySettings::isVisible,(arg("self"),arg("alg")), + .def("isVisible", &IPropertySettings::isVisible, + (arg("self"), arg("alg")), "Is the property to be shown in the GUI? Default true."); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/InstrumentInfo.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/InstrumentInfo.cpp index b7d8f9b2f11f4e33b373306aebe97893eaf36d80..d72da5eea64e8dc3adddb0ec6e846008889996a8 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/InstrumentInfo.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/InstrumentInfo.cpp @@ -12,38 +12,41 @@ void export_InstrumentInfo() { std_vector_exporter<InstrumentInfo>::wrap("std_vector_InstrumentInfo"); class_<InstrumentInfo>("InstrumentInfo", no_init) - .def("name", &InstrumentInfo::name,arg("self"), + .def("name", &InstrumentInfo::name, arg("self"), "" "Returns the full name of the instrument as defined in the " "Facilites.xml file") - .def("shortName", &InstrumentInfo::shortName,arg("self"), + .def("shortName", &InstrumentInfo::shortName, arg("self"), "Returns the abbreviated name of the instrument as definined in the " "Facilites.xml file") - .def("__str__", &InstrumentInfo::shortName,arg("self"), + .def("__str__", &InstrumentInfo::shortName, arg("self"), "Returns the abbreviated name of the instrument as definined in the " "Facilites.xml file") - .def("zeroPadding", &InstrumentInfo::zeroPadding,(arg("self"),arg("runNumber")), + .def("zeroPadding", &InstrumentInfo::zeroPadding, + (arg("self"), arg("runNumber")), "Returns zero padding for this instrument") - .def("filePrefix", &InstrumentInfo::filePrefix,(arg("self"),arg("runNumber")), + .def("filePrefix", &InstrumentInfo::filePrefix, + (arg("self"), arg("runNumber")), "Returns file prefix for this instrument") - .def("delimiter", &InstrumentInfo::delimiter, arg("self"),"Returns the delimiter " - "between the instrument " - "name and the run number.") + .def("delimiter", &InstrumentInfo::delimiter, arg("self"), + "Returns the delimiter " + "between the instrument " + "name and the run number.") - .def("techniques", &InstrumentInfo::techniques,arg("self"), + .def("techniques", &InstrumentInfo::techniques, arg("self"), return_value_policy<copy_const_reference>(), "Return list of techniques this instrument supports") - .def("facility", &InstrumentInfo::facility,arg("self"), + .def("facility", &InstrumentInfo::facility, arg("self"), return_value_policy<copy_const_reference>(), "Returns the facility that contains this instrument.") - .def("instdae", &InstrumentInfo::liveDataAddress,arg("self"), + .def("instdae", &InstrumentInfo::liveDataAddress, arg("self"), return_value_policy<copy_const_reference>(), "Returns the host name and the port of the machine hosting DAE and " "providing port to connect to for a live data stream") diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ListValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ListValidator.cpp index db70d3b87236975e77b0719befae9426bcf4b6b3..d13676fc3f7917019aac076cd0c6daa88a08e5f2 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ListValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ListValidator.cpp @@ -34,7 +34,8 @@ createListValidator(const boost::python::list &allowedValues) { .def("__init__", \ make_constructor(&createListValidator<type>, \ default_call_policies(), arg("allowedValues"))) \ - .def("addAllowedValue", &ListValidator<type>::addAllowedValue, (arg("self"),arg("value")), \ + .def("addAllowedValue", &ListValidator<type>::addAllowedValue, \ + (arg("self"), arg("value")), \ "Adds a value to the list of accepted values"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/LogFilter.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/LogFilter.cpp index ecd302291d91f81aedd3dd04ea7846816eeaf552..4a8b24348cd44569214bdd954ddeb8db54a5ee78 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/LogFilter.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/LogFilter.cpp @@ -10,11 +10,13 @@ using namespace boost::python; void export_LogFilter() { class_<LogFilter, boost::noncopyable>( - "LogFilter", init<const Property *>((arg("self"),arg("property")), + "LogFilter", init<const Property *>( + (arg("self"), arg("property")), "Creates a log filter using the log to be filtered")) - .def("data", &LogFilter::data, arg("self"),return_value_policy<return_by_value>(), + .def("data", &LogFilter::data, arg("self"), + return_value_policy<return_by_value>(), "Returns a time series property filtered on current filter property") - .def("addFilter", &LogFilter::addFilter,(arg("self"),arg("filter")), + .def("addFilter", &LogFilter::addFilter, (arg("self"), arg("filter")), "Adds a filter to the current list"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Logger.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Logger.cpp index 35808e4786b64455be65c66007d946422dbe906b..8494bdcd5fce1ec6680049775a0b6d5c466420bb 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Logger.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Logger.cpp @@ -25,28 +25,35 @@ void export_Logger() { // To distinguish between the overloaded functions typedef void (Logger::*LogLevelFunction)(const std::string &); - class_<Logger, boost::noncopyable>("Logger", init<std::string>((arg("self"),arg("name")))) - .def("fatal", (LogLevelFunction)&Logger::fatal,(arg("self"),arg("message")), + class_<Logger, boost::noncopyable>( + "Logger", init<std::string>((arg("self"), arg("name")))) + .def("fatal", (LogLevelFunction)&Logger::fatal, + (arg("self"), arg("message")), "Send a message at fatal priority: " "An unrecoverable error has occured and the application will " "terminate") - .def("error", (LogLevelFunction)&Logger::error,(arg("self"),arg("message")), + .def("error", (LogLevelFunction)&Logger::error, + (arg("self"), arg("message")), "Send a message at error priority: " "An error has occured but the framework is able to handle it and " "continue") - .def("warning", (LogLevelFunction)&Logger::warning,(arg("self"),arg("message")), + .def("warning", (LogLevelFunction)&Logger::warning, + (arg("self"), arg("message")), "Send a message at warning priority: " "Something was wrong but the framework was able to continue despite " "the problem.") - .def("notice", (LogLevelFunction)&Logger::notice,(arg("self"),arg("message")), + .def("notice", (LogLevelFunction)&Logger::notice, + (arg("self"), arg("message")), "Sends a message at notice priority: " "Really important information that should be displayed to the user, " "this should be minimal. The default logging level is set here " "unless it is altered.") - .def("information", (LogLevelFunction)&Logger::information,(arg("self"),arg("message")), + .def("information", (LogLevelFunction)&Logger::information, + (arg("self"), arg("message")), "Send a message at information priority: " "Useful but not vital information to be relayed back to the user.") - .def("debug", (LogLevelFunction)&Logger::debug,(arg("self"),arg("message")), + .def("debug", (LogLevelFunction)&Logger::debug, + (arg("self"), arg("message")), "Send a message at debug priority:" ". Anything that may be useful to understand what the code has been " "doing for debugging purposes.") diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Material.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Material.cpp index 7bc6fd4fec43cd94ab52b26923671b3343b6f295..5928f46115c8e5d58263a3324306403c9e23d6b3 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Material.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Material.cpp @@ -14,8 +14,8 @@ void export_Material() { register_ptr_to_python<boost::shared_ptr<Material>>(); class_<Material, boost::noncopyable>("Material", no_init) - .def("name", &Material::name, arg("self"), return_value_policy<copy_const_reference>(), - "Name of the material") + .def("name", &Material::name, arg("self"), + return_value_policy<copy_const_reference>(), "Name of the material") .add_property("numberDensity", make_function(&Material::numberDensity), "Number density") .add_property("temperature", make_function(&Material::temperature), @@ -23,18 +23,18 @@ void export_Material() { .add_property("pressure", make_function(&Material::pressure), "Pressure") .def("cohScatterXSection", (double (Material::*)(double) const)(&Material::cohScatterXSection), - (arg("self"),arg("lambda") = (double)NeutronAtom::ReferenceLambda), + (arg("self"), arg("lambda") = (double)NeutronAtom::ReferenceLambda), "Coherent Scattering Cross-Section") .def("incohScatterXSection", (double (Material::*)(double) - const)(&Material::incohScatterXSection), - (arg("self"),arg("lambda") = (double)NeutronAtom::ReferenceLambda), + const)(&Material::incohScatterXSection), + (arg("self"), arg("lambda") = (double)NeutronAtom::ReferenceLambda), "Incoherent Scattering Cross-Section") .def("totalScatterXSection", (double (Material::*)(double) - const)(&Material::totalScatterXSection), - (arg("self"),arg("lambda") = (double)NeutronAtom::ReferenceLambda), + const)(&Material::totalScatterXSection), + (arg("self"), arg("lambda") = (double)NeutronAtom::ReferenceLambda), "Total Scattering Cross-Section") .def("absorbXSection", (double (Material::*)(double) const)(&Material::absorbXSection), - (arg("self"),arg("lambda") = (double)NeutronAtom::ReferenceLambda), + (arg("self"), arg("lambda") = (double)NeutronAtom::ReferenceLambda), "Absorption Cross-Section"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Memory.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Memory.cpp index 17d99e36452806b9f77843a8516722ed8a230cd0..a3bcdc1420274326010e8d42717fd136c4a8d160 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Memory.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Memory.cpp @@ -6,7 +6,8 @@ using namespace boost::python; void export_MemoryStats() { - class_<MemoryStats>("MemoryStats", init<>(arg("self"),"Construct MemoryStats object.")) + class_<MemoryStats>("MemoryStats", + init<>(arg("self"), "Construct MemoryStats object.")) .def("update", &MemoryStats::update, arg("self")) .def("totalMem", &MemoryStats::totalMem, arg("self")) .def("availMem", &MemoryStats::availMem, arg("self")) diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ProgressBase.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ProgressBase.cpp index 1534919ad9045e7798c075bbf143f38e6a0bd056..0dcef5d1d7e65df2895e25f7f5346f9a00fd0039 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ProgressBase.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ProgressBase.cpp @@ -6,36 +6,42 @@ using namespace boost::python; void export_ProgressBase() { class_<ProgressBase, boost::noncopyable>("ProgressBase", no_init) - .def("report", (void (ProgressBase::*)()) & ProgressBase::report,arg("self"), + .def("report", (void (ProgressBase::*)()) & ProgressBase::report, + arg("self"), "Increment the progress by 1 and report with no message") .def("report", (void (ProgressBase::*)(const std::string &)) & ProgressBase::report, - (arg("self"),arg("msg")), "Increment the progress by 1 and report along with " - "the given message") + (arg("self"), arg("msg")), + "Increment the progress by 1 and report along with " + "the given message") .def("report", (void (ProgressBase::*)(int64_t, const std::string &)) & ProgressBase::report, - (arg("self"),arg("i"), arg("msg")), "Set the progress to given amount and " - "report along with the given message") + (arg("self"), arg("i"), arg("msg")), + "Set the progress to given amount and " + "report along with the given message") .def("reportIncrement", (void (ProgressBase::*)(size_t, const std::string &)) & ProgressBase::reportIncrement, - (arg("self"),arg("i"), arg("msg")), "Increment the progress by given amount and " - "report along with the given message") + (arg("self"), arg("i"), arg("msg")), + "Increment the progress by given amount and " + "report along with the given message") - .def("setNumSteps", &ProgressBase::setNumSteps, (arg("self"),arg("nsteps")), + .def("setNumSteps", &ProgressBase::setNumSteps, + (arg("self"), arg("nsteps")), "Sets a new number of steps for the current progress range") .def("resetNumSteps", &ProgressBase::resetNumSteps, - (arg("self"),arg("nsteps"), arg("start"), arg("end")), + (arg("self"), arg("nsteps"), arg("start"), arg("end")), "Resets the number of steps & progress range to the given values") - .def("setNotifyStep", &ProgressBase::setNotifyStep, (arg("self"),arg("notifyStep")), + .def("setNotifyStep", &ProgressBase::setNotifyStep, + (arg("self"), arg("notifyStep")), "Set how often the notifications are actually reported") - .def("getEstimatedTime", &ProgressBase::getEstimatedTime,arg("self"), + .def("getEstimatedTime", &ProgressBase::getEstimatedTime, arg("self"), "Returns an estimate of the time remaining. May not be to accurate " "if the reporting is lumpy."); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyHistory.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyHistory.cpp index d4f67431f747f941cc340cabb34aef18be13d9c2..b373cd85709094ce91c42507fab412c66e54a5fe 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyHistory.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyHistory.cpp @@ -14,22 +14,22 @@ void export_PropertyHistory() { class_<PropertyHistory>("PropertyHistory", no_init) - .def("name", &PropertyHistory::name,arg("self"), + .def("name", &PropertyHistory::name, arg("self"), return_value_policy<copy_const_reference>(), "Returns the name of the property.") - .def("value", &PropertyHistory::value,arg("self"), + .def("value", &PropertyHistory::value, arg("self"), return_value_policy<copy_const_reference>(), "Returns the value of the property.") - .def("type", &PropertyHistory::type,arg("self"), + .def("type", &PropertyHistory::type, arg("self"), return_value_policy<copy_const_reference>(), "Returns the type of the property.") - .def("isDefault", &PropertyHistory::isDefault,arg("self"), + .def("isDefault", &PropertyHistory::isDefault, arg("self"), "Returns if the property value is the default value.") - .def("direction", &PropertyHistory::direction,arg("self"), + .def("direction", &PropertyHistory::direction, arg("self"), "Returns the direction of the property.") // ----------------- Operators -------------------------------------- .def(self_ns::str(self)); diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Quat.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Quat.cpp index d4b5f1e1299f8a02673e57a6b66dd863a8cd92d9..abcba6155a2a13b3dc1a9a711887e3754578a120 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Quat.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Quat.cpp @@ -31,7 +31,8 @@ void export_Quat() { init<>(arg("self"), "Construct a default Quat that will perform no transformation.")) .def(init<double, double, double, double>( - (arg("self"), arg("w"), arg("a"), arg("b"), arg("c")), "Constructor with values")) + (arg("self"), arg("w"), arg("a"), arg("b"), arg("c")), + "Constructor with values")) .def(init<V3D, V3D>((arg("self"), arg("src"), arg("dest")), "Construct a Quat between two vectors")) .def(init<V3D, V3D, V3D>((arg("self"), arg("rX"), arg("rY"), arg("rZ")), @@ -55,17 +56,21 @@ void export_Quat() { "Returns the 'length' of the quaternion") .def("len2", &Quat::len2, arg("self"), "Returns the square of the 'length' of the quaternion") - .def("__add__", &Quat::operator +,(arg("left"),arg("right"))) - .def("__iadd__",&Quat::operator +=,boost::python::return_self<>(),(arg("self"),arg("other"))) - .def("__sub__", &Quat::operator -,(arg("left"),arg("right"))) - .def("__isub__",&Quat::operator -=,boost::python::return_self<>(),(arg("self"),arg("other"))) - .def("__mul__", &Quat::operator *,(arg("left"),arg("right"))) - .def("__imul__",&Quat::operator *=,boost::python::return_self<>(),(arg("self"),arg("other"))) - .def("__eq__", &Quat::operator ==,(arg("self"),arg("other"))) - .def("__ne__", &Quat::operator !=,(arg("self"),arg("other"))) + .def("__add__", &Quat::operator+, (arg("left"), arg("right"))) + .def("__iadd__", &Quat::operator+=, boost::python::return_self<>(), + (arg("self"), arg("other"))) + .def("__sub__", &Quat::operator-, (arg("left"), arg("right"))) + .def("__isub__", &Quat::operator-=, boost::python::return_self<>(), + (arg("self"), arg("other"))) + .def("__mul__", &Quat::operator*, (arg("left"), arg("right"))) + .def("__imul__", &Quat::operator*=, boost::python::return_self<>(), + (arg("self"), arg("other"))) + .def("__eq__", &Quat::operator==, (arg("self"), arg("other"))) + .def("__ne__", &Quat::operator!=, (arg("self"), arg("other"))) .def("__getitem__", (const double &(Quat::*)(int) const) & Quat::operator[], - return_value_policy<copy_const_reference>(),(arg("self"),arg("index"))) - .def("__str__", &Quat::toString,arg("self")); - //.def(boost::python::self_ns::str(self)); + return_value_policy<copy_const_reference>(), + (arg("self"), arg("index"))) + .def("__str__", &Quat::toString, arg("self")); + //.def(boost::python::self_ns::str(self)); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp index 7509465c45dadb2b45e53ff8a322ae43e7fc1fd2..3cfaf72e9ec1d44d7e3816714d8a8d30c5f98de4 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp @@ -239,7 +239,8 @@ void export_Statistics() { .def("getZscore", &getZscoreNumpy, arg("data"), "Determine the Z score for an array of data") - .def("getZscore", &getZscoreNumpyDeprecated, (arg("data"), arg("sorted")), + .def("getZscore", &getZscoreNumpyDeprecated, + (arg("data"), arg("sorted")), "Determine the Z score for an array of " "data (deprecated sorted argument)") .staticmethod("getZscore") diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp index 9efb139514828a11b262a3895d39ac9ea1836a1e..7311d4ac1c2e826d66a3f4692a7a2cfa91317106 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp @@ -23,7 +23,8 @@ using Mantid::PythonInterface::Policies::VectorToNumpy; register_ptr_to_python<TimeSeriesProperty<TYPE> *>(); \ \ class_<TimeSeriesProperty<TYPE>, bases<Property>, boost::noncopyable>( \ - #Prefix "TimeSeriesProperty", init<const std::string &>((arg("self"),arg("value")))) \ + #Prefix "TimeSeriesProperty", \ + init<const std::string &>((arg("self"), arg("value")))) \ .add_property( \ "value", \ make_function( \ @@ -33,20 +34,26 @@ using Mantid::PythonInterface::Policies::VectorToNumpy; &Mantid::Kernel::TimeSeriesProperty<TYPE>::timesAsVector) \ .def("addValue", (void (TimeSeriesProperty<TYPE>::*)( \ const DateAndTime &, const TYPE)) & \ - TimeSeriesProperty<TYPE>::addValue, (arg("self"),arg("time"),arg("value"))) \ + TimeSeriesProperty<TYPE>::addValue, \ + (arg("self"), arg("time"), arg("value"))) \ .def("addValue", (void (TimeSeriesProperty<TYPE>::*)( \ const std::string &, const TYPE)) & \ - TimeSeriesProperty<TYPE>::addValue, (arg("self"),arg("time"),arg("value"))) \ - .def("valueAsString", &TimeSeriesProperty<TYPE>::value, arg("self")) \ - .def("size", &TimeSeriesProperty<TYPE>::size, arg("self")) \ - .def("firstTime", &TimeSeriesProperty<TYPE>::firstTime, arg("self")) \ - .def("firstValue", &TimeSeriesProperty<TYPE>::firstValue, arg("self")) \ - .def("lastTime", &TimeSeriesProperty<TYPE>::lastTime, arg("self")) \ - .def("lastValue", &TimeSeriesProperty<TYPE>::lastValue, arg("self")) \ - .def("nthValue", &TimeSeriesProperty<TYPE>::nthValue, (arg("self"),arg("index"))) \ - .def("nthTime", &TimeSeriesProperty<TYPE>::nthTime, (arg("self"),arg("index"))) \ - .def("getStatistics", &TimeSeriesProperty<TYPE>::getStatistics, arg("self")) \ - .def("timeAverageValue", &TimeSeriesProperty<TYPE>::timeAverageValue, arg("self")); + TimeSeriesProperty<TYPE>::addValue, \ + (arg("self"), arg("time"), arg("value"))) \ + .def("valueAsString", &TimeSeriesProperty<TYPE>::value, arg("self")) \ + .def("size", &TimeSeriesProperty<TYPE>::size, arg("self")) \ + .def("firstTime", &TimeSeriesProperty<TYPE>::firstTime, arg("self")) \ + .def("firstValue", &TimeSeriesProperty<TYPE>::firstValue, arg("self")) \ + .def("lastTime", &TimeSeriesProperty<TYPE>::lastTime, arg("self")) \ + .def("lastValue", &TimeSeriesProperty<TYPE>::lastValue, arg("self")) \ + .def("nthValue", &TimeSeriesProperty<TYPE>::nthValue, \ + (arg("self"), arg("index"))) \ + .def("nthTime", &TimeSeriesProperty<TYPE>::nthTime, \ + (arg("self"), arg("index"))) \ + .def("getStatistics", &TimeSeriesProperty<TYPE>::getStatistics, \ + arg("self")) \ + .def("timeAverageValue", &TimeSeriesProperty<TYPE>::timeAverageValue, \ + arg("self")); } void export_TimeSeriesProperty_Double() { diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Unit.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Unit.cpp index 9594bc46221670093ad2f96375da0bf134441131..ff85cee044ec2791322b67118a6bbf0a7a9aaf84 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Unit.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Unit.cpp @@ -33,15 +33,18 @@ void export_Unit() { register_ptr_to_python<boost::shared_ptr<Unit>>(); class_<Unit, boost::noncopyable>("Unit", no_init) - .def("name", &deprecatedName,arg("self"), + .def("name", &deprecatedName, arg("self"), "Return the full name of the unit (deprecated, use caption)") - .def("caption", &Unit::caption, arg("self"),"Return the full name of the unit") - .def("label", &deprecatedLabel,arg("self"), "Returns a plain-text label to be used " - "as the symbol for the unit (deprecated, " - "use symbol())") - .def("symbol", &Unit::label, arg("self"),"Returns a UnitLabel object that holds " - "information on the symbol to use for unit") + .def("caption", &Unit::caption, arg("self"), + "Return the full name of the unit") + .def("label", &deprecatedLabel, arg("self"), + "Returns a plain-text label to be used " + "as the symbol for the unit (deprecated, " + "use symbol())") + .def("symbol", &Unit::label, arg("self"), + "Returns a UnitLabel object that holds " + "information on the symbol to use for unit") .def( - "unitID", &Unit::unitID,arg("self"), + "unitID", &Unit::unitID, arg("self"), "Returns the string ID of the unit. This may/may not match its name"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/UnitFactory.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/UnitFactory.cpp index d80e14c089b797fe711e37c7e1f25ba1ee743b81..361e6b1a50e6df26d75f66c7a7af9e43a7701585 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/UnitFactory.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/UnitFactory.cpp @@ -14,10 +14,10 @@ using namespace boost::python; void export_UnitFactory() { class_<UnitFactoryImpl, boost::noncopyable>("UnitFactoryImpl", no_init) - .def("create", &UnitFactoryImpl::create,(arg("self"),arg("className")), + .def("create", &UnitFactoryImpl::create, (arg("self"), arg("className")), "Creates a named unit if it exists in the factory") - .def("getKeys", &UnitFactoryImpl::getKeys,arg("self"), + .def("getKeys", &UnitFactoryImpl::getKeys, arg("self"), return_value_policy<Policies::VectorToNumpy>(), "Returns a list of units available from the factory") diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/UnitLabel.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/UnitLabel.cpp index ac384aa643e3f2863119ba5e64ecd591c2ed8ec8..c85ced6900046f9cf9250cbaf3bc4687583b4779 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/UnitLabel.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/UnitLabel.cpp @@ -52,18 +52,19 @@ void export_UnitLabel() { .def(init<UnitLabel::AsciiString>( (arg("ascii")), "Construct a label from a plain-text string")) - .def("ascii", &UnitLabel::ascii,arg("self"), + .def("ascii", &UnitLabel::ascii, arg("self"), return_value_policy<copy_const_reference>(), "Return the label as a plain-text string") - .def("utf8", &utf8ToUnicode, arg("self"),"Return the label as a unicode string") + .def("utf8", &utf8ToUnicode, arg("self"), + "Return the label as a unicode string") .def("latex", &UnitLabel::latex, - return_value_policy<copy_const_reference>(),arg("self"), + return_value_policy<copy_const_reference>(), arg("self"), "Return the label as a plain-text string with latex formatting") // special functions .def("__str__", &UnitLabel::ascii, - return_value_policy<copy_const_reference>(),arg("self")) - .def("__unicode__", &utf8ToUnicode,arg("self")); + return_value_policy<copy_const_reference>(), arg("self")) + .def("__unicode__", &utf8ToUnicode, arg("self")); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Units.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Units.cpp index 27f2c3e688c8b20512f3c84b292492ee9f8c5b4e..54888c959e00c8a0dd44c6306045505598c7afc1 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Units.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Units.cpp @@ -25,13 +25,15 @@ void setLabelFromStdString(Label &self, const std::string &caption, // have additional functionality over the base class void export_Label() { class_<Label, bases<Unit>, boost::noncopyable>("Label", no_init) - .def("setLabel", &setLabelFromStdString, (arg("self"),arg("caption"), arg("label")), + .def("setLabel", &setLabelFromStdString, + (arg("self"), arg("caption"), arg("label")), "Set the caption (e.g.Temperature) & label (K) on the unit") .def("setLabel", (void (Label::*)(const std::string &, const UnitLabel &)) & Label::setLabel, - (arg("self"),arg("caption"), arg("label")), "Set the caption (e.g.Temperature) " - "& label (K) on the unit, See the " - "UnitLabel class"); + (arg("self"), arg("caption"), arg("label")), + "Set the caption (e.g.Temperature) " + "& label (K) on the unit, See the " + "UnitLabel class"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/V3D.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/V3D.cpp index a3e8509425435f0a42c47fdd1fdceeaca799f0f9..3b9f94dd6291bd7e797c990899758ee229354495 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/V3D.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/V3D.cpp @@ -28,30 +28,38 @@ void export_V3D() { class_<V3D>("V3D", init<>("Construct a V3D at the origin")) .def(init<double, double, double>( "Construct a V3D with X,Y,Z coordinates")) - .def("X", &V3D::X, arg("self"), return_value_policy<copy_const_reference>(), + .def("X", &V3D::X, arg("self"), + return_value_policy<copy_const_reference>(), "Returns the X coordinate") - .def("Y", &V3D::Y, arg("self"), return_value_policy<copy_const_reference>(), + .def("Y", &V3D::Y, arg("self"), + return_value_policy<copy_const_reference>(), "Returns the Y coordinate") - .def("Z", &V3D::Z, arg("self"), return_value_policy<copy_const_reference>(), + .def("Z", &V3D::Z, arg("self"), + return_value_policy<copy_const_reference>(), "Returns the Z coordinate") - .def("getX", &V3D::X,arg("self"), return_value_policy<copy_const_reference>(), + .def("getX", &V3D::X, arg("self"), + return_value_policy<copy_const_reference>(), "Returns the X coordinate") // Traditional name - .def("getY", &V3D::Y, arg("self"), return_value_policy<copy_const_reference>(), + .def("getY", &V3D::Y, arg("self"), + return_value_policy<copy_const_reference>(), "Returns the Y coordinate") // Traditional name - .def("getZ", &V3D::Z, arg("self"), return_value_policy<copy_const_reference>(), + .def("getZ", &V3D::Z, arg("self"), + return_value_policy<copy_const_reference>(), "Returns the Z coordinate") // Traditional name - .def("distance", &V3D::distance, (arg("self"),arg("other")), + .def("distance", &V3D::distance, (arg("self"), arg("other")), "Returns the distance between this vector and another") - .def("angle", &V3D::angle, (arg("self"),arg("other")), + .def("angle", &V3D::angle, (arg("self"), arg("other")), "Returns the angle between this vector and another") - .def("zenith", &V3D::zenith, (arg("self"),arg("other")), + .def("zenith", &V3D::zenith, (arg("self"), arg("other")), "Returns the zenith between this vector and another") - .def("scalar_prod", &V3D::scalar_prod, (arg("self"),arg("other")), + .def("scalar_prod", &V3D::scalar_prod, (arg("self"), arg("other")), "Computes the scalar product between this and another vector") - .def("cross_prod", &V3D::cross_prod, (arg("self"),arg("other")), + .def("cross_prod", &V3D::cross_prod, (arg("self"), arg("other")), "Computes the cross product between this and another vector") - .def("norm", &V3D::norm,arg("self"), "Calculates the length of the vector") - .def("norm2", &V3D::norm2, arg("self"),"Calculates the squared length of the vector") + .def("norm", &V3D::norm, arg("self"), + "Calculates the length of the vector") + .def("norm2", &V3D::norm2, arg("self"), + "Calculates the squared length of the vector") .def(self + self) .def(self += self) .def(self - self) @@ -72,8 +80,9 @@ void export_V3D() { .def(self_ns::str(self)) .def(self_ns::repr(self)) .def("__hash__", &hashV3D) - .def("directionAngles", &V3D::directionAngles, (arg("self"),arg("inDegrees")), + .def("directionAngles", &V3D::directionAngles, + (arg("self"), arg("inDegrees")), "Calculate direction angles from direction cosines") - .def("directionAngles", &directionAnglesDefault,arg("self"), + .def("directionAngles", &directionAnglesDefault, arg("self"), "Calculate direction angles from direction cosines"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/VMD.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/VMD.cpp index 1ab2ebbdd74c72f7d6d059780fe51a52339ae927..aafd51e6176cf9bcbc87faac5768a7d8c560dd90 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/VMD.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/VMD.cpp @@ -48,50 +48,56 @@ void setItem(VMD &self, const size_t index, const VMD_t value) { void export_VMD() { class_<VMD>("VMD", - init<>(arg("self"),"Default constructor gives an object with 1 dimension")) + init<>(arg("self"), + "Default constructor gives an object with 1 dimension")) .def(init<VMD_t, VMD_t>( "Constructs a 2 dimensional vector at the point given", - (arg("self"),arg("val0"), arg("val1")))) + (arg("self"), arg("val0"), arg("val1")))) .def(init<VMD_t, VMD_t, VMD_t>( "Constructs a 3 dimensional vector at the point given", - (arg("self"),arg("val0"), arg("val1"), arg("val2")))) + (arg("self"), arg("val0"), arg("val1"), arg("val2")))) .def(init<VMD_t, VMD_t, VMD_t, VMD_t>( "Constructs a 4 dimensional vector at the point given", - (arg("self"),arg("val0"), arg("val1"), arg("val2"), arg("val3")))) + (arg("self"), arg("val0"), arg("val1"), arg("val2"), arg("val3")))) .def(init<VMD_t, VMD_t, VMD_t, VMD_t, VMD_t>( "Constructs a 5 dimensional vector at the point given", - (arg("self"),arg("val0"), arg("val1"), arg("val2"), arg("val3"), arg("val4")))) + (arg("self"), arg("val0"), arg("val1"), arg("val2"), arg("val3"), + arg("val4")))) .def(init<VMD_t, VMD_t, VMD_t, VMD_t, VMD_t, VMD_t>( "Constructs a 6 dimensional vector at the point given", - (arg("self"),arg("val0"), arg("val1"), arg("val2"), arg("val3"), arg("val4"), arg("val5")))) + (arg("self"), arg("val0"), arg("val1"), arg("val2"), arg("val3"), + arg("val4"), arg("val5")))) - .def("getNumDims", &VMD::getNumDims,arg("self"), + .def("getNumDims", &VMD::getNumDims, arg("self"), "Returns the number of dimensions the contained in the vector") - .def("scalar_prod", &VMD::scalar_prod,(arg("self"),arg("other")), + .def("scalar_prod", &VMD::scalar_prod, (arg("self"), arg("other")), "Returns the scalar product of this vector with another. If the " "number of dimensions do not match a RuntimeError is raised") - .def("cross_prod", &VMD::cross_prod,(arg("self"),arg("other")), + .def("cross_prod", &VMD::cross_prod, (arg("self"), arg("other")), "Returns the cross product of this vector with another. If the " "number of dimensions do not match a RuntimeError is raised") - .def("norm", &VMD::norm, arg("self"),"Returns the length of the vector") + .def("norm", &VMD::norm, arg("self"), "Returns the length of the vector") - .def("norm2", &VMD::norm2, arg("self"),"Returns the the squared length of the vector") + .def("norm2", &VMD::norm2, arg("self"), + "Returns the the squared length of the vector") - .def("normalize", &VMD::normalize,arg("self"), "Normalizes the length of the vector " - "to unity and returns the length " - "before it was normalized") + .def("normalize", &VMD::normalize, arg("self"), + "Normalizes the length of the vector " + "to unity and returns the length " + "before it was normalized") - .def("angle", &VMD::angle, (arg("self"),arg("other")),"Returns the angle between the vectors in " - "radians (0 < theta < pi). If the dimensions " - "do not match a RuntimeError is raised") + .def("angle", &VMD::angle, (arg("self"), arg("other")), + "Returns the angle between the vectors in " + "radians (0 < theta < pi). If the dimensions " + "do not match a RuntimeError is raised") //----------------------------- special methods //-------------------------------- - .def("__getitem__", &getItem,(arg("self"),arg("value"))) - .def("__setitem__", &setItem,(arg("self"),arg("index"),arg("value"))) + .def("__getitem__", &getItem, (arg("self"), arg("value"))) + .def("__setitem__", &setItem, (arg("self"), arg("index"), arg("value"))) .def(self == self) .def(self != self) // must define != as Python's default is to compare // object address diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/VisibleWhenProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/VisibleWhenProperty.cpp index 6345f3a42cb1ad490a9cd4e93200fd3d8e1bea24..c1797a4e592052d345362a0ccc444f0821d495c3 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/VisibleWhenProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/VisibleWhenProperty.cpp @@ -8,12 +8,12 @@ void export_VisibleWhenProperty() { class_<VisibleWhenProperty, bases<EnabledWhenProperty>, boost::noncopyable>( "VisibleWhenProperty", no_init) .def(init<std::string, ePropertyCriterion, std::string>( - (arg("self"),arg("otherPropName"), arg("when"), arg("value")), + (arg("self"), arg("otherPropName"), arg("when"), arg("value")), "Enabled otherPropName property when value criterion meets that " "given by the 'when' argument")) .def(init<std::string, ePropertyCriterion>( - (arg("self"),arg("otherPropName"), arg("when")), + (arg("self"), arg("otherPropName"), arg("when")), "Enabled otherPropName property when criterion does not require a " "value, i.e isDefault")); }