[Kstars-devel] KDE/kdeedu/kstars/kstars
Alexey Khudyakov
alexey.skladnoy at gmail.com
Tue Jul 28 18:26:38 CEST 2009
SVN commit 1003690 by khudyakov:
Convert KSutils class to namespace.
This class contain only static functions so it natural to convert to namespace.
Also namespaces are open so new functions/class/whatever could be added elsewhere.
CCMAIL: kstars-devel at kde.org
M +5 -11 ksutils.h
--- trunk/KDE/kdeedu/kstars/kstars/ksutils.h #1003689:1003690
@@ -31,8 +31,7 @@
class QFile;
class QString;
-class KSUtils {
-public:
+namespace KSUtils {
/**Attempt to open the data file named filename, using the QFile object "file".
*First look in the standard KDE directories, then look in a local "data"
*subdirectory. If the data file cannot be found or opened, display a warning
@@ -43,22 +42,17 @@
*@returns bool Returns true if data file was opened successfully.
*@returns a reference to the opened file.
*/
- static bool openDataFile( QFile &file, const QString &filename );
+ bool openDataFile( QFile &file, const QString &filename );
+ // FIXME: function does not used anywhere. Maybe it should be removed.
/** Lagrange interpolation using a maximum number of 10 points.
*@param x[] double array with x values
*@param v[] double array with y values
*@param n number of points to use for interpolation
*@param xval value for which we are looking for the y value.
*/
- static long double lagrangeInterpolation(const long double x[], const long double v[], int n, long double xval);
+ long double lagrangeInterpolation(const long double x[], const long double v[], int n, long double xval);
-private:
- /**Constructor. This class is just a collection of static functions, so
- *we have made the constructor private (so it is not possible to
- *instantiate a KSUtils object).
- */
- KSUtils();
-};
+}
#endif
More information about the Kstars-devel
mailing list