wx/msgout.h \
wx/msgqueue.h \
wx/mstream.h \
+ wx/numformatter.h \
wx/object.h \
wx/platform.h \
wx/platinfo.h \
wx/msgout.h \
wx/msgqueue.h \
wx/mstream.h \
+ wx/numformatter.h \
wx/object.h \
wx/platform.h \
wx/platinfo.h \
src/common/mimecmn.cpp \
src/common/module.cpp \
src/common/mstream.cpp \
+ src/common/numformatter.cpp \
src/common/object.cpp \
src/common/platinfo.cpp \
src/common/powercmn.cpp \
monodll_mimecmn.o \
monodll_module.o \
monodll_mstream.o \
+ monodll_numformatter.o \
monodll_object.o \
monodll_platinfo.o \
monodll_powercmn.o \
monolib_mimecmn.o \
monolib_module.o \
monolib_mstream.o \
+ monolib_numformatter.o \
monolib_object.o \
monolib_platinfo.o \
monolib_powercmn.o \
basedll_mimecmn.o \
basedll_module.o \
basedll_mstream.o \
+ basedll_numformatter.o \
basedll_object.o \
basedll_platinfo.o \
basedll_powercmn.o \
baselib_mimecmn.o \
baselib_module.o \
baselib_mstream.o \
+ baselib_numformatter.o \
baselib_object.o \
baselib_platinfo.o \
baselib_powercmn.o \
monodll_mstream.o: $(srcdir)/src/common/mstream.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/mstream.cpp
+monodll_numformatter.o: $(srcdir)/src/common/numformatter.cpp $(MONODLL_ODEP)
+ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/numformatter.cpp
+
monodll_object.o: $(srcdir)/src/common/object.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/object.cpp
monolib_mstream.o: $(srcdir)/src/common/mstream.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/mstream.cpp
+monolib_numformatter.o: $(srcdir)/src/common/numformatter.cpp $(MONOLIB_ODEP)
+ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/numformatter.cpp
+
monolib_object.o: $(srcdir)/src/common/object.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/object.cpp
basedll_mstream.o: $(srcdir)/src/common/mstream.cpp $(BASEDLL_ODEP)
$(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/mstream.cpp
+basedll_numformatter.o: $(srcdir)/src/common/numformatter.cpp $(BASEDLL_ODEP)
+ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/numformatter.cpp
+
basedll_object.o: $(srcdir)/src/common/object.cpp $(BASEDLL_ODEP)
$(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/object.cpp
baselib_mstream.o: $(srcdir)/src/common/mstream.cpp $(BASELIB_ODEP)
$(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/mstream.cpp
+baselib_numformatter.o: $(srcdir)/src/common/numformatter.cpp $(BASELIB_ODEP)
+ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/numformatter.cpp
+
baselib_object.o: $(srcdir)/src/common/object.cpp $(BASELIB_ODEP)
$(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/object.cpp
src/common/mimecmn.cpp
src/common/module.cpp
src/common/mstream.cpp
+ src/common/numformatter.cpp
src/common/object.cpp
src/common/platinfo.cpp
src/common/powercmn.cpp
wx/msgout.h
wx/msgqueue.h
wx/mstream.h
+ wx/numformatter.h
wx/object.h
wx/platform.h
wx/platinfo.h
$(OBJS)\monodll_mimecmn.obj \\r
$(OBJS)\monodll_module.obj \\r
$(OBJS)\monodll_mstream.obj \\r
+ $(OBJS)\monodll_numformatter.obj \
$(OBJS)\monodll_object.obj \\r
$(OBJS)\monodll_platinfo.obj \\r
$(OBJS)\monodll_powercmn.obj \\r
$(OBJS)\monolib_mimecmn.obj \\r
$(OBJS)\monolib_module.obj \\r
$(OBJS)\monolib_mstream.obj \\r
+ $(OBJS)\monolib_numformatter.obj \
$(OBJS)\monolib_object.obj \\r
$(OBJS)\monolib_platinfo.obj \\r
$(OBJS)\monolib_powercmn.obj \\r
$(OBJS)\basedll_mimecmn.obj \\r
$(OBJS)\basedll_module.obj \\r
$(OBJS)\basedll_mstream.obj \\r
+ $(OBJS)\basedll_numformatter.obj \
$(OBJS)\basedll_object.obj \\r
$(OBJS)\basedll_platinfo.obj \\r
$(OBJS)\basedll_powercmn.obj \\r
$(OBJS)\baselib_mimecmn.obj \\r
$(OBJS)\baselib_module.obj \\r
$(OBJS)\baselib_mstream.obj \\r
+ $(OBJS)\baselib_numformatter.obj \
$(OBJS)\baselib_object.obj \\r
$(OBJS)\baselib_platinfo.obj \\r
$(OBJS)\baselib_powercmn.obj \\r
$(OBJS)\monodll_mstream.obj: ..\..\src\common\mstream.cpp\r
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mstream.cpp\r
\r
+$(OBJS)\monodll_numformatter.obj: ..\..\src\common\numformatter.cpp
+ $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\numformatter.cpp
+
$(OBJS)\monodll_object.obj: ..\..\src\common\object.cpp\r
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\object.cpp\r
\r
$(OBJS)\monolib_mstream.obj: ..\..\src\common\mstream.cpp\r
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mstream.cpp\r
\r
+$(OBJS)\monolib_numformatter.obj: ..\..\src\common\numformatter.cpp
+ $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\numformatter.cpp
+
$(OBJS)\monolib_object.obj: ..\..\src\common\object.cpp\r
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\object.cpp\r
\r
$(OBJS)\basedll_mstream.obj: ..\..\src\common\mstream.cpp\r
$(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\mstream.cpp\r
\r
+$(OBJS)\basedll_numformatter.obj: ..\..\src\common\numformatter.cpp
+ $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\numformatter.cpp
+
$(OBJS)\basedll_object.obj: ..\..\src\common\object.cpp\r
$(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\object.cpp\r
\r
$(OBJS)\baselib_mstream.obj: ..\..\src\common\mstream.cpp\r
$(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\mstream.cpp\r
\r
+$(OBJS)\baselib_numformatter.obj: ..\..\src\common\numformatter.cpp
+ $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\numformatter.cpp
+
$(OBJS)\baselib_object.obj: ..\..\src\common\object.cpp\r
$(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\object.cpp\r
\r
$(OBJS)\monodll_mimecmn.o \\r
$(OBJS)\monodll_module.o \\r
$(OBJS)\monodll_mstream.o \\r
+ $(OBJS)\monodll_numformatter.o \
$(OBJS)\monodll_object.o \\r
$(OBJS)\monodll_platinfo.o \\r
$(OBJS)\monodll_powercmn.o \\r
$(OBJS)\monolib_mimecmn.o \\r
$(OBJS)\monolib_module.o \\r
$(OBJS)\monolib_mstream.o \\r
+ $(OBJS)\monolib_numformatter.o \
$(OBJS)\monolib_object.o \\r
$(OBJS)\monolib_platinfo.o \\r
$(OBJS)\monolib_powercmn.o \\r
$(OBJS)\basedll_mimecmn.o \\r
$(OBJS)\basedll_module.o \\r
$(OBJS)\basedll_mstream.o \\r
+ $(OBJS)\basedll_numformatter.o \
$(OBJS)\basedll_object.o \\r
$(OBJS)\basedll_platinfo.o \\r
$(OBJS)\basedll_powercmn.o \\r
$(OBJS)\baselib_mimecmn.o \\r
$(OBJS)\baselib_module.o \\r
$(OBJS)\baselib_mstream.o \\r
+ $(OBJS)\baselib_numformatter.o \
$(OBJS)\baselib_object.o \\r
$(OBJS)\baselib_platinfo.o \\r
$(OBJS)\baselib_powercmn.o \\r
$(OBJS)\monodll_mstream.o: ../../src/common/mstream.cpp\r
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<\r
\r
+$(OBJS)\monodll_numformatter.o: ../../src/common/numformatter.cpp
+ $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\monodll_object.o: ../../src/common/object.cpp\r
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<\r
\r
$(OBJS)\monolib_mstream.o: ../../src/common/mstream.cpp\r
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<\r
\r
+$(OBJS)\monolib_numformatter.o: ../../src/common/numformatter.cpp
+ $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\monolib_object.o: ../../src/common/object.cpp\r
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<\r
\r
$(OBJS)\basedll_mstream.o: ../../src/common/mstream.cpp\r
$(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $<\r
\r
+$(OBJS)\basedll_numformatter.o: ../../src/common/numformatter.cpp
+ $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\basedll_object.o: ../../src/common/object.cpp\r
$(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $<\r
\r
$(OBJS)\baselib_mstream.o: ../../src/common/mstream.cpp\r
$(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $<\r
\r
+$(OBJS)\baselib_numformatter.o: ../../src/common/numformatter.cpp
+ $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\baselib_object.o: ../../src/common/object.cpp\r
$(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $<\r
\r
$(OBJS)\monodll_mimecmn.obj \\r
$(OBJS)\monodll_module.obj \\r
$(OBJS)\monodll_mstream.obj \\r
+ $(OBJS)\monodll_numformatter.obj \
$(OBJS)\monodll_object.obj \\r
$(OBJS)\monodll_platinfo.obj \\r
$(OBJS)\monodll_powercmn.obj \\r
$(OBJS)\monolib_mimecmn.obj \\r
$(OBJS)\monolib_module.obj \\r
$(OBJS)\monolib_mstream.obj \\r
+ $(OBJS)\monolib_numformatter.obj \
$(OBJS)\monolib_object.obj \\r
$(OBJS)\monolib_platinfo.obj \\r
$(OBJS)\monolib_powercmn.obj \\r
$(OBJS)\basedll_mimecmn.obj \\r
$(OBJS)\basedll_module.obj \\r
$(OBJS)\basedll_mstream.obj \\r
+ $(OBJS)\basedll_numformatter.obj \
$(OBJS)\basedll_object.obj \\r
$(OBJS)\basedll_platinfo.obj \\r
$(OBJS)\basedll_powercmn.obj \\r
$(OBJS)\baselib_mimecmn.obj \\r
$(OBJS)\baselib_module.obj \\r
$(OBJS)\baselib_mstream.obj \\r
+ $(OBJS)\baselib_numformatter.obj \
$(OBJS)\baselib_object.obj \\r
$(OBJS)\baselib_platinfo.obj \\r
$(OBJS)\baselib_powercmn.obj \\r
$(OBJS)\monodll_mstream.obj: ..\..\src\common\mstream.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mstream.cpp\r
\r
+$(OBJS)\monodll_numformatter.obj: ..\..\src\common\numformatter.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\numformatter.cpp
+
$(OBJS)\monodll_object.obj: ..\..\src\common\object.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\object.cpp\r
\r
$(OBJS)\monolib_mstream.obj: ..\..\src\common\mstream.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mstream.cpp\r
\r
+$(OBJS)\monolib_numformatter.obj: ..\..\src\common\numformatter.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\numformatter.cpp
+
$(OBJS)\monolib_object.obj: ..\..\src\common\object.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\object.cpp\r
\r
$(OBJS)\basedll_mstream.obj: ..\..\src\common\mstream.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\mstream.cpp\r
\r
+$(OBJS)\basedll_numformatter.obj: ..\..\src\common\numformatter.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\numformatter.cpp
+
$(OBJS)\basedll_object.obj: ..\..\src\common\object.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\object.cpp\r
\r
$(OBJS)\baselib_mstream.obj: ..\..\src\common\mstream.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\mstream.cpp\r
\r
+$(OBJS)\baselib_numformatter.obj: ..\..\src\common\numformatter.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\numformatter.cpp
+
$(OBJS)\baselib_object.obj: ..\..\src\common\object.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\object.cpp\r
\r
$(OBJS)\monodll_mimecmn.obj &\r
$(OBJS)\monodll_module.obj &\r
$(OBJS)\monodll_mstream.obj &\r
+ $(OBJS)\monodll_numformatter.obj &
$(OBJS)\monodll_object.obj &\r
$(OBJS)\monodll_platinfo.obj &\r
$(OBJS)\monodll_powercmn.obj &\r
$(OBJS)\monolib_mimecmn.obj &\r
$(OBJS)\monolib_module.obj &\r
$(OBJS)\monolib_mstream.obj &\r
+ $(OBJS)\monolib_numformatter.obj &
$(OBJS)\monolib_object.obj &\r
$(OBJS)\monolib_platinfo.obj &\r
$(OBJS)\monolib_powercmn.obj &\r
$(OBJS)\basedll_mimecmn.obj &\r
$(OBJS)\basedll_module.obj &\r
$(OBJS)\basedll_mstream.obj &\r
+ $(OBJS)\basedll_numformatter.obj &
$(OBJS)\basedll_object.obj &\r
$(OBJS)\basedll_platinfo.obj &\r
$(OBJS)\basedll_powercmn.obj &\r
$(OBJS)\baselib_mimecmn.obj &\r
$(OBJS)\baselib_module.obj &\r
$(OBJS)\baselib_mstream.obj &\r
+ $(OBJS)\baselib_numformatter.obj &
$(OBJS)\baselib_object.obj &\r
$(OBJS)\baselib_platinfo.obj &\r
$(OBJS)\baselib_powercmn.obj &\r
$(OBJS)\monodll_mstream.obj : .AUTODEPEND ..\..\src\common\mstream.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<\r
\r
+$(OBJS)\monodll_numformatter.obj : .AUTODEPEND ..\..\src\common\numformatter.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
+
$(OBJS)\monodll_object.obj : .AUTODEPEND ..\..\src\common\object.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<\r
\r
$(OBJS)\monolib_mstream.obj : .AUTODEPEND ..\..\src\common\mstream.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<\r
\r
+$(OBJS)\monolib_numformatter.obj : .AUTODEPEND ..\..\src\common\numformatter.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
+
$(OBJS)\monolib_object.obj : .AUTODEPEND ..\..\src\common\object.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<\r
\r
$(OBJS)\basedll_mstream.obj : .AUTODEPEND ..\..\src\common\mstream.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $<\r
\r
+$(OBJS)\basedll_numformatter.obj : .AUTODEPEND ..\..\src\common\numformatter.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $<
+
$(OBJS)\basedll_object.obj : .AUTODEPEND ..\..\src\common\object.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $<\r
\r
$(OBJS)\baselib_mstream.obj : .AUTODEPEND ..\..\src\common\mstream.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $<\r
\r
+$(OBJS)\baselib_numformatter.obj : .AUTODEPEND ..\..\src\common\numformatter.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $<
+
$(OBJS)\baselib_object.obj : .AUTODEPEND ..\..\src\common\object.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $<\r
\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\..\src\common\numformatter.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\common\object.cpp\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\..\include\wx\numformatter.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\wx\object.h\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\..\include\wx\xti2.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\wx\xtictor.h\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\..\include\wx\range.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\wx\rawbmp.h\r
# End Source File\r
# Begin Source File\r
RelativePath="..\..\src\common\mstream.cpp">\r
</File>\r
<File\r
+ RelativePath="..\..\src\common\numformatter.cpp">
+ </File>
+ <File
RelativePath="..\..\src\common\object.cpp">\r
</File>\r
<File\r
RelativePath="..\..\include\wx\mstream.h">\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\numformatter.h">
+ </File>
+ <File
RelativePath="..\..\include\wx\object.h">\r
</File>\r
<File\r
RelativePath="..\..\include\wx\xti.h">\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\xti2.h">
+ </File>
+ <File
RelativePath="..\..\include\wx\xtictor.h">\r
</File>\r
<File\r
RelativePath="..\..\include\wx\radiobut.h">\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\range.h">
+ </File>
+ <File
RelativePath="..\..\include\wx\rawbmp.h">\r
</File>\r
<File\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\src\common\numformatter.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\src\common\object.cpp"\r
>\r
</File>\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\numformatter.h"
+ >
+ </File>
+ <File
RelativePath="..\..\include\wx\object.h"\r
>\r
</File>\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\xti2.h"
+ >
+ </File>
+ <File
RelativePath="..\..\include\wx\xtictor.h"\r
>\r
</File>\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\range.h"
+ >
+ </File>
+ <File
RelativePath="..\..\include\wx\rawbmp.h"\r
>\r
</File>\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\src\common\numformatter.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\src\common\object.cpp"\r
>\r
</File>\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\numformatter.h"
+ >
+ </File>
+ <File
RelativePath="..\..\include\wx\object.h"\r
>\r
</File>\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\xti2.h"
+ >
+ </File>
+ <File
RelativePath="..\..\include\wx\xtictor.h"\r
>\r
</File>\r
>\r
</File>\r
<File\r
+ RelativePath="..\..\include\wx\range.h"
+ >
+ </File>
+ <File
RelativePath="..\..\include\wx\rawbmp.h"\r
>\r
</File>\r
- Added wxFile::GetLastError() and ClearLastError() (ryazanov).
- Added negatable command line switches (Armel Asselin).
- Added wxVersionInfo and various GetLibraryVersionInfo() functions (troelsk).
+- Added wxNumberFormatter for dealing with thousands separators.
Unix:
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/numformatter.h
+// Purpose: wxNumberFormatter class
+// Author: Fulvio Senore, Vadim Zeitlin
+// Created: 2010-11-06
+// Copyright: (c) 2010 wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_NUMFORMATTER_H_
+#define _WX_NUMFORMATTER_H_
+
+#include "wx/string.h"
+
+// Helper class for formatting numbers with thousands separators which also
+// supports parsing the numbers formatted by it.
+class WXDLLIMPEXP_BASE wxNumberFormatter
+{
+public:
+ // Bit masks for ToString()
+ enum Style
+ {
+ Style_None = 0x00,
+ Style_WithThousandsSep = 0x01,
+ Style_NoTrailingZeroes = 0x02 // Only for floating point numbers
+ };
+
+ // Format a number as a string. By default, the thousands separator is
+ // used, specify Style_None to prevent this. For floating point numbers,
+ // precision can also be specified.
+ static wxString ToString(long val,
+ int style = Style_WithThousandsSep);
+
+ static wxString ToString(double val,
+ int precision,
+ int style = Style_WithThousandsSep);
+
+ // Parse a string representing a number, possibly with thousands separator.
+ //
+ // Return true on success and stores the result in the provided location
+ // which must be a valid non-NULL pointer.
+ static bool FromString(wxString s, long *val);
+ static bool FromString(wxString s, double *val);
+
+
+ // Get the decimal separator for the current locale. It is always defined
+ // and we fall back to returning '.' in case of an error.
+ static wxChar GetDecimalSeparator();
+
+ // Get the thousands separator if grouping of the digits is used by the
+ // current locale. The value returned in sep should be only used if the
+ // function returns true.
+ static bool GetThousandsSeparatorIfUsed(wxChar *sep);
+
+private:
+ // Add the thousands separators to a string representing a number without
+ // the separators. This is used by ToString(Style_WithThousandsSep).
+ static void AddThousandsSeparators(wxString& s);
+
+ // Remove trailing zeroes and, if there is nothing left after it, the
+ // decimal separator itself from a string representing a floating point
+ // number. Also used by ToString().
+ static void RemoveTrailingZeroes(wxString& s);
+
+ // Remove all thousands separators from a string representing a number.
+ static void RemoveThousandsSeparators(wxString& s);
+};
+
+#endif // _WX_NUMFORMATTER_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/numformatter.h
+// Purpose: interface to wxNumberFormatter
+// Author: Fulvio Senore, Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ @class wxNumberFormatter
+
+ Helper class for formatting and parsing numbers with thousands separators.
+
+ This class contains only static functions, so users must not create instances
+ but directly call the member functions.
+
+ @since 2.9.2
+
+ @library{wxbase}
+*/
+class wxNumberFormatter
+{
+public:
+ /**
+ Bit masks used with ToString().
+ */
+ enum Style
+ {
+ /**
+ This flag cab be used to indicate absence of any other flags below.
+ */
+ Style_None = 0x00,
+
+ /**
+ If this flag is given, thousands separators will be inserted in the
+ number string representation as defined by the current locale.
+ */
+ Style_WithThousandsSep = 0x01,
+
+ /**
+ If this flag is given, trailing zeroes in a floating point number
+ string representation will be omitted.
+
+ If the number is actually integer, the decimal separator will be
+ omitted as well. To give an example, formatting the number @c 1.23
+ with precision 5 will normally yield "1.23000" but with this flag
+ it would return "1.23". And formatting @c 123 with this flag will
+ return just "123" for any precision.
+
+ This flag can't be used with ToString() overload taking the integer
+ value.
+ */
+ Style_NoTrailingZeroes = 0x02
+ };
+
+ /**
+ Returns string representation of an integer number.
+
+ By default, the string will use thousands separators if appropriate for
+ the current locale. This can be avoided by passing Style_None as @a
+ flags in which case the call to the function has exactly the same
+ effect as <code>wxString::Format("%ld", val)</code>.
+
+ Notice that calling ToString() with a value of type @c int and
+ non-default flags results in ambiguity between this overload and the
+ one below. To resolve it, you need to cast the value to @c long.
+
+ @param val
+ The variable to convert to a string.
+ @param flags
+ Combination of values from the Style enumeration (except for
+ Style_NoTrailingZeroes which can't be used with this overload).
+ */
+ static wxString ToString(long val, int flags = Style_WithThousandsSep);
+
+ /**
+ Returns string representation of a floating point number.
+
+ @param val
+ The variable to convert to a string.
+ @param precision
+ Number of decimals to write in formatted string.
+ @param flags
+ Combination of values from the Style enumeration.
+ */
+ static wxString
+ ToString(double val, int precision, int flags = Style_WithThousandsSep);
+
+
+ /**
+ Parse a string representation of a number possibly including thousands
+ separators.
+
+ These functions parse number representation in the current locale. On
+ success they return @true and store the result at the location pointed
+ to by @a val (which can't be @NULL), otherwise @false is returned.
+
+ @see wxString::ToLong(), wxString::ToDouble()
+ */
+ //@{
+ static bool FromString(wxString s, long *val);
+ static bool FromString(wxString s, double *val);
+ //@}
+
+ /**
+ Get the decimal separator for the current locale.
+
+ Decimal separators is always defined and we fall back to returning '.'
+ in case of an error.
+ */
+ static wxChar GetDecimalSeparator();
+
+ /**
+ Get the thousands separator if grouping of the digits is used by the
+ current locale.
+
+ The value returned in @a sep should be only used if the function
+ returns @true, otherwise no thousands separator should be used at all.
+
+ @param sep
+ Points to the variable receiving the thousands separator character
+ if it is used by the current locale. May be @NULL if only the
+ function return value is needed.
+ */
+ static bool GetThousandsSeparatorIfUsed(wxChar *sep);
+
+};
you are sure that this string contains a floating point number formatted with
the rules of the locale currently in use (see wxLocale).
- Refer to the docs of the standard function @c strtod() for more details about
- the supported syntax.
+ Also notice that even this function is locale-specific it does not
+ support strings with thousands separators in them, even if the current
+ locale uses digits grouping. You may use wxNumberFormatter::FromString()
+ to parse such strings.
+
+ Please refer to the documentation of the standard function @c strtod()
+ for more details about the supported syntax.
@see ToCDouble(), ToLong(), ToULong()
*/
that this string contains an integer number formatted with
the rules of the locale currently in use (see wxLocale).
- Refer to the docs of the standard function @c strtol() for more details about
- the supported syntax.
+ As with ToDouble(), this function does not support strings containing
+ thousands separators even if the current locale uses digits grouping.
+ You may use wxNumberFormatter::FromString() to parse such strings.
+
+ Please refer to the documentation of the standard function @c strtol()
+ for more details about the supported syntax.
@see ToCDouble(), ToDouble(), ToULong()
*/
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: numformatter.cpp
+// Purpose: wxNumberFormatter
+// Author: Fulvio Senore, Vadim Zeitlin
+// Created: 2010-11-06
+// Copyright: (c) 2010 wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#include "wx/numformatter.h"
+#include "wx/intl.h"
+
+// ============================================================================
+// wxNumberFormatter implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Locale information accessors
+// ----------------------------------------------------------------------------
+
+wxChar wxNumberFormatter::GetDecimalSeparator()
+{
+ // Notice that while using static variable here is not MT-safe, the worst
+ // that can happen is that we redo the initialization if we're called
+ // concurrently from more than one thread so it's not a real problem.
+ static wxChar s_decimalSeparator = 0;
+
+ if ( !s_decimalSeparator )
+ {
+ const wxString
+ s = wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER);
+ if ( s.empty() )
+ {
+ // We really must have something for decimal separator, so fall
+ // back to the C locale default.
+ s_decimalSeparator = '.';
+ }
+ else
+ {
+ // To the best of my knowledge there are no locales like this.
+ wxASSERT_MSG( s.length() == 1,
+ "Multi-character decimal separator?" );
+
+ s_decimalSeparator = s[0];
+ }
+ }
+
+ return s_decimalSeparator;
+}
+
+bool wxNumberFormatter::GetThousandsSeparatorIfUsed(wxChar *sep)
+{
+ static wxChar s_thousandsSeparator = 0;
+ static bool s_initialized = false;
+
+ if ( !s_initialized )
+ {
+ const wxString
+ s = wxLocale::GetInfo(wxLOCALE_THOUSANDS_SEP, wxLOCALE_CAT_NUMBER);
+ if ( !s.empty() )
+ {
+ wxASSERT_MSG( s.length() == 1,
+ "Multi-character thousands separator?" );
+
+ s_thousandsSeparator = s[0];
+ }
+ //else: Unlike above it's perfectly fine for the thousands separator to
+ // be empty if grouping is not used, so just leave it as 0.
+
+ s_initialized = true;
+ }
+
+ if ( !s_thousandsSeparator )
+ return false;
+
+ if ( sep )
+ *sep = s_thousandsSeparator;
+
+ return true;
+}
+
+// ----------------------------------------------------------------------------
+// Conversion to string and helpers
+// ----------------------------------------------------------------------------
+
+wxString wxNumberFormatter::ToString(long val, int style)
+{
+ wxString s = wxString::Format("%ld", val);
+
+ if ( style & Style_WithThousandsSep )
+ AddThousandsSeparators(s);
+
+ wxASSERT_MSG( !(style & Style_NoTrailingZeroes),
+ "Style_NoTrailingZeroes can't be used with integer values" );
+
+ return s;
+}
+
+wxString wxNumberFormatter::ToString(double val, int precision, int style)
+{
+ const wxString fmt = wxString::Format("%%.%df", precision);
+ wxString s = wxString::Format(fmt, val);
+
+ if ( style & Style_WithThousandsSep )
+ AddThousandsSeparators(s);
+
+ if ( style & Style_NoTrailingZeroes )
+ RemoveTrailingZeroes(s);
+
+ return s;
+}
+
+void wxNumberFormatter::AddThousandsSeparators(wxString& s)
+{
+ wxChar thousandsSep;
+ if ( !GetThousandsSeparatorIfUsed(&thousandsSep) )
+ return;
+
+ size_t pos = s.find(GetDecimalSeparator());
+ if ( pos == wxString::npos )
+ {
+ // Start grouping at the end of an integer number.
+ pos = s.length();
+ }
+
+ // We currently group digits by 3 independently of the locale. This is not
+ // the right thing to do and we should use lconv::grouping (under POSIX)
+ // and GetLocaleInfo(LOCALE_SGROUPING) (under MSW) to get information about
+ // the correct grouping to use. This is something that needs to be done at
+ // wxLocale level first and then used here in the future (TODO).
+ const size_t GROUP_LEN = 3;
+
+ while ( pos > GROUP_LEN )
+ {
+ pos -= GROUP_LEN;
+ s.insert(pos, thousandsSep);
+ }
+}
+
+void wxNumberFormatter::RemoveTrailingZeroes(wxString& s)
+{
+ const size_t posDecSep = s.find(GetDecimalSeparator());
+ wxCHECK_RET( posDecSep != wxString::npos, "No decimal separator" );
+ wxCHECK_RET( posDecSep, "Can't start with decimal separator" );
+
+ // Find the last character to keep.
+ size_t posLastNonZero = s.find_last_not_of("0");
+
+ // If it's the decimal separator itself, don't keep it neither.
+ if ( posLastNonZero == posDecSep )
+ posLastNonZero--;
+
+ s.erase(posLastNonZero + 1);
+}
+
+// ----------------------------------------------------------------------------
+// Conversion from strings
+// ----------------------------------------------------------------------------
+
+void wxNumberFormatter::RemoveThousandsSeparators(wxString& s)
+{
+ wxChar thousandsSep;
+ if ( !GetThousandsSeparatorIfUsed(&thousandsSep) )
+ return;
+
+ s.Replace(wxString(thousandsSep), wxString());
+}
+
+bool wxNumberFormatter::FromString(wxString s, long *val)
+{
+ RemoveThousandsSeparators(s);
+ return s.ToLong(val);
+}
+
+bool wxNumberFormatter::FromString(wxString s, double *val)
+{
+ RemoveThousandsSeparators(s);
+ return s.ToDouble(val);
+}
test_wxregextest.o \
test_scopeguardtest.o \
test_iostream.o \
+ test_numformatter.o \
test_strings.o \
test_stdstrings.o \
test_tokenizer.o \
test_iostream.o: $(srcdir)/strings/iostream.cpp $(TEST_ODEP)
$(CXXC) -c -o $@ $(TEST_CXXFLAGS) $(srcdir)/strings/iostream.cpp
+test_numformatter.o: $(srcdir)/strings/numformatter.cpp $(TEST_ODEP)
+ $(CXXC) -c -o $@ $(TEST_CXXFLAGS) $(srcdir)/strings/numformatter.cpp
+
test_strings.o: $(srcdir)/strings/strings.cpp $(TEST_ODEP)
$(CXXC) -c -o $@ $(TEST_CXXFLAGS) $(srcdir)/strings/strings.cpp
$(OBJS)\test_wxregextest.obj \\r
$(OBJS)\test_scopeguardtest.obj \\r
$(OBJS)\test_iostream.obj \\r
+ $(OBJS)\test_numformatter.obj \
$(OBJS)\test_strings.obj \\r
$(OBJS)\test_stdstrings.obj \\r
$(OBJS)\test_tokenizer.obj \\r
$(OBJS)\test_iostream.obj: .\strings\iostream.cpp\r
$(CXX) -q -c -P -o$@ $(TEST_CXXFLAGS) .\strings\iostream.cpp\r
\r
+$(OBJS)\test_numformatter.obj: .\strings\numformatter.cpp
+ $(CXX) -q -c -P -o$@ $(TEST_CXXFLAGS) .\strings\numformatter.cpp
+
$(OBJS)\test_strings.obj: .\strings\strings.cpp\r
$(CXX) -q -c -P -o$@ $(TEST_CXXFLAGS) .\strings\strings.cpp\r
\r
$(OBJS)\test_wxregextest.o \\r
$(OBJS)\test_scopeguardtest.o \\r
$(OBJS)\test_iostream.o \\r
+ $(OBJS)\test_numformatter.o \
$(OBJS)\test_strings.o \\r
$(OBJS)\test_stdstrings.o \\r
$(OBJS)\test_tokenizer.o \\r
$(OBJS)\test_iostream.o: ./strings/iostream.cpp\r
$(CXX) -c -o $@ $(TEST_CXXFLAGS) $(CPPDEPS) $<\r
\r
+$(OBJS)\test_numformatter.o: ./strings/numformatter.cpp
+ $(CXX) -c -o $@ $(TEST_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\test_strings.o: ./strings/strings.cpp\r
$(CXX) -c -o $@ $(TEST_CXXFLAGS) $(CPPDEPS) $<\r
\r
$(OBJS)\test_wxregextest.obj \\r
$(OBJS)\test_scopeguardtest.obj \\r
$(OBJS)\test_iostream.obj \\r
+ $(OBJS)\test_numformatter.obj \
$(OBJS)\test_strings.obj \\r
$(OBJS)\test_stdstrings.obj \\r
$(OBJS)\test_tokenizer.obj \\r
$(OBJS)\test_iostream.obj: .\strings\iostream.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) .\strings\iostream.cpp\r
\r
+$(OBJS)\test_numformatter.obj: .\strings\numformatter.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) .\strings\numformatter.cpp
+
$(OBJS)\test_strings.obj: .\strings\strings.cpp\r
$(CXX) /c /nologo /TP /Fo$@ $(TEST_CXXFLAGS) .\strings\strings.cpp\r
\r
$(OBJS)\test_wxregextest.obj &\r
$(OBJS)\test_scopeguardtest.obj &\r
$(OBJS)\test_iostream.obj &\r
+ $(OBJS)\test_numformatter.obj &
$(OBJS)\test_strings.obj &\r
$(OBJS)\test_stdstrings.obj &\r
$(OBJS)\test_tokenizer.obj &\r
$(OBJS)\test_iostream.obj : .AUTODEPEND .\strings\iostream.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_CXXFLAGS) $<\r
\r
+$(OBJS)\test_numformatter.obj : .AUTODEPEND .\strings\numformatter.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(TEST_CXXFLAGS) $<
+
$(OBJS)\test_strings.obj : .AUTODEPEND .\strings\strings.cpp\r
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_CXXFLAGS) $<\r
\r
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Name: tests/strings/numformat.cpp
+// Purpose: wxNumberFormatter unit test
+// Author: Vadim Zeitlin
+// Created: 2011-01-15
+// RCS-ID: $Id$
+// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
+///////////////////////////////////////////////////////////////////////////////
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "testprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#include "wx/numformatter.h"
+#include "wx/intl.h"
+
+// ----------------------------------------------------------------------------
+// test class
+// ----------------------------------------------------------------------------
+
+class NumFormatterTestCase : public CppUnit::TestCase
+{
+public:
+ NumFormatterTestCase()
+ {
+ // We need to use a locale with known decimal point and which uses the
+ // thousands separator for the tests to make sense.
+ wxLanguage lang;
+ if ( wxLocale::IsAvailable(wxLANGUAGE_ENGLISH_US) )
+ lang = wxLANGUAGE_ENGLISH_US;
+ else if ( wxLocale::IsAvailable(wxLANGUAGE_ENGLISH_UK) )
+ lang = wxLANGUAGE_ENGLISH_UK;
+ else
+ {
+ m_locale = NULL;
+ return;
+ }
+
+ m_locale = new wxLocale(lang, wxLOCALE_DONT_LOAD_DEFAULT);
+ }
+
+ virtual ~NumFormatterTestCase()
+ {
+ delete m_locale;
+ }
+
+private:
+ CPPUNIT_TEST_SUITE( NumFormatterTestCase );
+ CPPUNIT_TEST( LongToString );
+ CPPUNIT_TEST( DoubleToString );
+ CPPUNIT_TEST( NoTrailingZeroes );
+ CPPUNIT_TEST( LongFromString );
+ CPPUNIT_TEST( DoubleFromString );
+ CPPUNIT_TEST_SUITE_END();
+
+ void LongToString();
+ void DoubleToString();
+ void NoTrailingZeroes();
+ void LongFromString();
+ void DoubleFromString();
+
+ wxLocale *m_locale;
+
+ wxDECLARE_NO_COPY_CLASS(NumFormatterTestCase);
+};
+
+// register in the unnamed registry so that these tests are run by default
+CPPUNIT_TEST_SUITE_REGISTRATION( NumFormatterTestCase );
+
+// also include in it's own registry so that these tests can be run alone
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( NumFormatterTestCase, "NumFormatterTestCase" );
+
+// ----------------------------------------------------------------------------
+// tests themselves
+// ----------------------------------------------------------------------------
+
+void NumFormatterTestCase::LongToString()
+{
+ if ( !m_locale )
+ return;
+
+ CPPUNIT_ASSERT_EQUAL( "1", wxNumberFormatter::ToString( 1));
+ CPPUNIT_ASSERT_EQUAL( "12", wxNumberFormatter::ToString( 12));
+ CPPUNIT_ASSERT_EQUAL( "123", wxNumberFormatter::ToString( 123));
+ CPPUNIT_ASSERT_EQUAL( "1,234", wxNumberFormatter::ToString( 1234));
+ CPPUNIT_ASSERT_EQUAL( "12,345", wxNumberFormatter::ToString( 12345));
+ CPPUNIT_ASSERT_EQUAL( "123,456", wxNumberFormatter::ToString( 123456));
+ CPPUNIT_ASSERT_EQUAL( "1,234,567", wxNumberFormatter::ToString( 1234567));
+ CPPUNIT_ASSERT_EQUAL( "12,345,678", wxNumberFormatter::ToString( 12345678));
+ CPPUNIT_ASSERT_EQUAL("123,456,789", wxNumberFormatter::ToString( 123456789));
+}
+
+void NumFormatterTestCase::DoubleToString()
+{
+ if ( !m_locale )
+ return;
+
+ CPPUNIT_ASSERT_EQUAL("1.0", wxNumberFormatter::ToString(1., 1));
+ CPPUNIT_ASSERT_EQUAL("0.123456", wxNumberFormatter::ToString(0.123456, 6));
+ CPPUNIT_ASSERT_EQUAL("1.234567", wxNumberFormatter::ToString(1.234567, 6));
+ CPPUNIT_ASSERT_EQUAL("12.34567", wxNumberFormatter::ToString(12.34567, 5));
+ CPPUNIT_ASSERT_EQUAL("123.4567", wxNumberFormatter::ToString(123.4567, 4));
+ CPPUNIT_ASSERT_EQUAL("1,234.56", wxNumberFormatter::ToString(1234.56, 2));
+ CPPUNIT_ASSERT_EQUAL("12,345.6", wxNumberFormatter::ToString(12345.6, 1));
+ CPPUNIT_ASSERT_EQUAL("12,345.6", wxNumberFormatter::ToString(12345.6, 1));
+ CPPUNIT_ASSERT_EQUAL("123,456,789.0",
+ wxNumberFormatter::ToString(123456789., 1));
+ CPPUNIT_ASSERT_EQUAL("123,456,789.012",
+ wxNumberFormatter::ToString(123456789.012, 3));
+}
+
+void NumFormatterTestCase::NoTrailingZeroes()
+{
+ WX_ASSERT_FAILS_WITH_ASSERT
+ (
+ wxNumberFormatter::ToString(123L, wxNumberFormatter::Style_NoTrailingZeroes)
+ );
+
+ if ( !m_locale )
+ return;
+
+ CPPUNIT_ASSERT_EQUAL
+ (
+ "123.000",
+ wxNumberFormatter::ToString(123., 3)
+ );
+
+ CPPUNIT_ASSERT_EQUAL
+ (
+ "123",
+ wxNumberFormatter::ToString(123., 3, wxNumberFormatter::Style_NoTrailingZeroes)
+ );
+
+ CPPUNIT_ASSERT_EQUAL
+ (
+ "123",
+ wxNumberFormatter::ToString(123., 9, wxNumberFormatter::Style_NoTrailingZeroes)
+ );
+
+ CPPUNIT_ASSERT_EQUAL
+ (
+ "123.456",
+ wxNumberFormatter::ToString(123.456, 3, wxNumberFormatter::Style_NoTrailingZeroes)
+ );
+
+ CPPUNIT_ASSERT_EQUAL
+ (
+ "123.456000000",
+ wxNumberFormatter::ToString(123.456, 9)
+ );
+
+ CPPUNIT_ASSERT_EQUAL
+ (
+ "123.456",
+ wxNumberFormatter::ToString(123.456, 9, wxNumberFormatter::Style_NoTrailingZeroes)
+ );
+}
+
+void NumFormatterTestCase::LongFromString()
+{
+ if ( !m_locale )
+ return;
+
+ WX_ASSERT_FAILS_WITH_ASSERT
+ (
+ wxNumberFormatter::FromString("123", static_cast<long *>(0))
+ );
+
+ long l;
+ CPPUNIT_ASSERT( !wxNumberFormatter::FromString("", &l) );
+ CPPUNIT_ASSERT( !wxNumberFormatter::FromString("foo", &l) );
+ CPPUNIT_ASSERT( !wxNumberFormatter::FromString("1.234", &l) );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("123", &l) );
+ CPPUNIT_ASSERT_EQUAL( 123, l );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("1234", &l) );
+ CPPUNIT_ASSERT_EQUAL( 1234, l );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("1,234", &l) );
+ CPPUNIT_ASSERT_EQUAL( 1234, l );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("12,345", &l) );
+ CPPUNIT_ASSERT_EQUAL( 12345, l );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("123,456", &l) );
+ CPPUNIT_ASSERT_EQUAL( 123456, l );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("1,234,567", &l) );
+ CPPUNIT_ASSERT_EQUAL( 1234567, l );
+}
+
+void NumFormatterTestCase::DoubleFromString()
+{
+ if ( !m_locale )
+ return;
+
+ WX_ASSERT_FAILS_WITH_ASSERT
+ (
+ wxNumberFormatter::FromString("123", static_cast<double *>(0))
+ );
+
+ double d;
+ CPPUNIT_ASSERT( !wxNumberFormatter::FromString("", &d) );
+ CPPUNIT_ASSERT( !wxNumberFormatter::FromString("bar", &d) );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("123", &d) );
+ CPPUNIT_ASSERT_EQUAL( 123., d );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("123.456789012", &d) );
+ CPPUNIT_ASSERT_EQUAL( 123.456789012, d );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("1,234.56789012", &d) );
+ CPPUNIT_ASSERT_EQUAL( 1234.56789012, d );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("12,345.6789012", &d) );
+ CPPUNIT_ASSERT_EQUAL( 12345.6789012, d );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("123,456.789012", &d) );
+ CPPUNIT_ASSERT_EQUAL( 123456.789012, d );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("1,234,567.89012", &d) );
+ CPPUNIT_ASSERT_EQUAL( 1234567.89012, d );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("12,345,678.9012", &d) );
+ CPPUNIT_ASSERT_EQUAL( 12345678.9012, d );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("123,456,789.012", &d) );
+ CPPUNIT_ASSERT_EQUAL( 123456789.012, d );
+
+ CPPUNIT_ASSERT( wxNumberFormatter::FromString("123456789.012", &d) );
+ CPPUNIT_ASSERT_EQUAL( 123456789.012, d );
+}
regex/wxregextest.cpp
scopeguard/scopeguardtest.cpp
strings/iostream.cpp
+ strings/numformatter.cpp
strings/strings.cpp
strings/stdstrings.cpp
strings/tokenizer.cpp
# End Source File\r
# Begin Source File\r
\r
+SOURCE=.\strings\numformatter.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\interactive\output.cpp\r
# End Source File\r
# Begin Source File\r
RelativePath=".\misc\module.cpp">\r
</File>\r
<File\r
+ RelativePath=".\strings\numformatter.cpp">
+ </File>
+ <File
RelativePath=".\interactive\output.cpp">\r
</File>\r
<File\r
>\r
</File>\r
<File\r
+ RelativePath=".\strings\numformatter.cpp"
+ >
+ </File>
+ <File
RelativePath=".\interactive\output.cpp"\r
>\r
</File>\r
>\r
</File>\r
<File\r
+ RelativePath=".\strings\numformatter.cpp"
+ >
+ </File>
+ <File
RelativePath=".\interactive\output.cpp"\r
>\r
</File>\r
wx/msgout.h
wx/msgqueue.h
wx/mstream.h
+wx/numformatter.h
wx/object.h
wx/platform.h
wx/platinfo.h
wx/msgout.h
wx/msgqueue.h
wx/mstream.h
+wx/numformatter.h
wx/object.h
wx/platform.h
wx/platinfo.h
wx/msgout.h
wx/msgqueue.h
wx/mstream.h
+wx/numformatter.h
wx/object.h
wx/platform.h
wx/platinfo.h