Browse Source

Removed CmStringConversion

Marko Pintera 13 years ago
parent
commit
d05fb0b009
41 changed files with 532 additions and 832 deletions
  1. 0 1
      CamelotRenderer/CamelotRenderer.cpp
  2. 2 2
      CamelotRenderer/CmD3D9Device.cpp
  3. 0 1
      CamelotRenderer/CmD3D9HLSLProgram.cpp
  4. 0 1
      CamelotRenderer/CmD3D9HardwareBufferManager.cpp
  5. 1 2
      CamelotRenderer/CmD3D9HardwarePixelBuffer.cpp
  6. 0 1
      CamelotRenderer/CmD3D9Mappings.cpp
  7. 0 1
      CamelotRenderer/CmD3D9MultiRenderTarget.cpp
  8. 16 16
      CamelotRenderer/CmD3D9RenderSystem.cpp
  9. 0 1
      CamelotRenderer/CmD3D9RenderSystem.h
  10. 14 15
      CamelotRenderer/CmD3D9RenderWindow.cpp
  11. 0 1
      CamelotRenderer/CmD3D9Texture.cpp
  12. 0 1
      CamelotRenderer/CmD3D9TextureManager.cpp
  13. 0 1
      CamelotRenderer/CmGpuProgram.cpp
  14. 2 3
      CamelotRenderer/CmGpuProgramParams.cpp
  15. 1 2
      CamelotRenderer/CmHardwareVertexBuffer.cpp
  16. 0 1
      CamelotRenderer/CmRenderSystemCapabilities.cpp
  17. 4 5
      CamelotRenderer/CmRenderSystemCapabilities.h
  18. 1 2
      CamelotRenderer/CmRenderTarget.cpp
  19. 0 1
      CamelotRenderer/CmWindowEventUtilities.cpp
  20. 0 1
      CamelotRenderer/RenderSystemGL/Source/CmGLFBOMultiRenderTarget.cpp
  21. 0 1
      CamelotRenderer/RenderSystemGL/Source/CmGLFBORenderTexture.cpp
  22. 0 1
      CamelotRenderer/RenderSystemGL/Source/CmGLFrameBufferObject.cpp
  23. 1 2
      CamelotRenderer/RenderSystemGL/Source/CmGLGpuProgram.cpp
  24. 1 2
      CamelotRenderer/RenderSystemGL/Source/CmGLHardwarePixelBuffer.cpp
  25. 0 1
      CamelotRenderer/RenderSystemGL/Source/CmGLPBRenderTexture.cpp
  26. 3 4
      CamelotRenderer/RenderSystemGL/Source/CmGLRenderSystem.cpp
  27. 0 1
      CamelotRenderer/RenderSystemGL/Source/CmGLRenderTexture.cpp
  28. 2 3
      CamelotRenderer/RenderSystemGL/Source/CmGLTexture.cpp
  29. 19 20
      CamelotRenderer/RenderSystemGL/Source/CmWin32GLSupport.cpp
  30. 0 1
      CamelotRenderer/RenderSystemGL/Source/CmWin32RenderTexture.cpp
  31. 16 17
      CamelotRenderer/RenderSystemGL/Source/CmWin32Window.cpp
  32. 0 1
      CamelotRenderer/RenderSystemGL/Source/GLSL/src/CmGLSLLinkProgram.cpp
  33. 1 2
      CamelotRenderer/RenderSystemGL/Source/GLSL/src/CmGLSLLinkProgramManager.cpp
  34. 0 1
      CamelotRenderer/RenderSystemGL/Source/GLSL/src/CmGLSLProgram.cpp
  35. 0 2
      CamelotUtility/CamelotUtility.vcxproj
  36. 0 6
      CamelotUtility/CamelotUtility.vcxproj.filters
  37. 1 0
      CamelotUtility/Include/CmFwdDeclUtil.h
  38. 138 0
      CamelotUtility/Include/CmString.h
  39. 0 270
      CamelotUtility/Include/CmStringConverter.h
  40. 309 0
      CamelotUtility/Source/CmString.cpp
  41. 0 438
      CamelotUtility/Source/CmStringConverter.cpp

+ 0 - 1
CamelotRenderer/CamelotRenderer.cpp

@@ -13,7 +13,6 @@
 #include "CmPrerequisites.h"
 #include "CmPrerequisites.h"
 #include "CmQuaternion.h"
 #include "CmQuaternion.h"
 #include "CmString.h"
 #include "CmString.h"
-#include "CmStringConverter.h"
 #include "CmVector2.h"
 #include "CmVector2.h"
 #include "CmVector3.h"
 #include "CmVector3.h"
 #include "CmVector4.h"
 #include "CmVector4.h"

+ 2 - 2
CamelotRenderer/CmD3D9Device.cpp

@@ -597,7 +597,7 @@ namespace CamelotEngine
 			hr = mpDevice->SetTexture(stage, NULL);
 			hr = mpDevice->SetTexture(stage, NULL);
 			if( hr != S_OK )
 			if( hr != S_OK )
 			{
 			{
-				String str = "Unable to disable texture '" + StringConverter::toString((unsigned int)stage) + "' in D3D9";
+				String str = "Unable to disable texture '" + toString((unsigned int)stage) + "' in D3D9";
 				OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9Device::clearDeviceStreams" );
 				OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9Device::clearDeviceStreams" );
 			}
 			}
 		
 		
@@ -608,7 +608,7 @@ namespace CamelotEngine
 				hr = mpDevice->SetTextureStageState(static_cast<DWORD>(stage), D3DTSS_COLOROP, D3DTOP_DISABLE);
 				hr = mpDevice->SetTextureStageState(static_cast<DWORD>(stage), D3DTSS_COLOROP, D3DTOP_DISABLE);
 				if( hr != S_OK )
 				if( hr != S_OK )
 				{
 				{
-					String str = "Unable to disable texture '" + StringConverter::toString((unsigned)stage) + "' in D3D9";
+					String str = "Unable to disable texture '" + toString((unsigned)stage) + "' in D3D9";
 					OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9Device::clearDeviceStreams" );
 					OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9Device::clearDeviceStreams" );
 				}
 				}
 			}			
 			}			

+ 0 - 1
CamelotRenderer/CmD3D9HLSLProgram.cpp

@@ -27,7 +27,6 @@ THE SOFTWARE.
 */
 */
 #include "CmD3D9HLSLProgram.h"
 #include "CmD3D9HLSLProgram.h"
 #include "CmGpuProgramManager.h"
 #include "CmGpuProgramManager.h"
-#include "CmStringConverter.h"
 #include "CmD3D9GpuProgram.h"
 #include "CmD3D9GpuProgram.h"
 #include "CmException.h"
 #include "CmException.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystem.h"

+ 0 - 1
CamelotRenderer/CmD3D9HardwareBufferManager.cpp

@@ -29,7 +29,6 @@ THE SOFTWARE.
 #include "CmD3D9HardwareVertexBuffer.h"
 #include "CmD3D9HardwareVertexBuffer.h"
 #include "CmD3D9HardwareIndexBuffer.h"
 #include "CmD3D9HardwareIndexBuffer.h"
 #include "CmD3D9VertexDeclaration.h"
 #include "CmD3D9VertexDeclaration.h"
-#include "CmStringConverter.h"
 #include "CmException.h"
 #include "CmException.h"
 
 
 namespace CamelotEngine {
 namespace CamelotEngine {

+ 1 - 2
CamelotRenderer/CmD3D9HardwarePixelBuffer.cpp

@@ -29,7 +29,6 @@ THE SOFTWARE.
 #include "CmD3D9Texture.h"
 #include "CmD3D9Texture.h"
 #include "CmD3D9Mappings.h"
 #include "CmD3D9Mappings.h"
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 #include "CmBitwise.h"
 #include "CmBitwise.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystemManager.h"
 #include "CmRenderSystemManager.h"
@@ -969,7 +968,7 @@ void D3D9HardwarePixelBuffer::updateRenderTexture(bool writeGamma, UINT32 fsaa,
 	if (mRenderTexture == NULL)
 	if (mRenderTexture == NULL)
 	{
 	{
 		String name;
 		String name;
-		name = "rtt/" +CamelotEngine::StringConverter::toString((size_t)this) + "/" + srcName;
+		name = "rtt/" +CamelotEngine::toString((size_t)this) + "/" + srcName;
 
 
 		mRenderTexture = new D3D9RenderTexture(name, this, writeGamma, fsaa);		
 		mRenderTexture = new D3D9RenderTexture(name, this, writeGamma, fsaa);		
 
 

+ 0 - 1
CamelotRenderer/CmD3D9Mappings.cpp

@@ -27,7 +27,6 @@ THE SOFTWARE.
 */
 */
 #include "CmD3D9Mappings.h"
 #include "CmD3D9Mappings.h"
 #include "CmString.h"
 #include "CmString.h"
-#include "CmStringConverter.h"
 #include "CmException.h"
 #include "CmException.h"
 
 
 namespace CamelotEngine 
 namespace CamelotEngine 

+ 0 - 1
CamelotRenderer/CmD3D9MultiRenderTarget.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 #include "CmD3D9MultiRenderTarget.h"
 #include "CmD3D9MultiRenderTarget.h"
 #include "CmD3D9HardwarePixelBuffer.h"
 #include "CmD3D9HardwarePixelBuffer.h"
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 #include "CmBitwise.h"
 #include "CmBitwise.h"
 #include "CmD3D9RenderSystem.h"
 #include "CmD3D9RenderSystem.h"
 #include "CmD3D9Device.h"
 #include "CmD3D9Device.h"

+ 16 - 16
CamelotRenderer/CmD3D9RenderSystem.cpp

@@ -358,7 +358,7 @@ namespace CamelotEngine
 		if( name == "FSAA" )
 		if( name == "FSAA" )
 		{
 		{
 			std::vector<CamelotEngine::String> values = StringUtil::split(value, " ", 1);
 			std::vector<CamelotEngine::String> values = StringUtil::split(value, " ", 1);
-			mFSAASamples = StringConverter::parseUnsignedInt(values[0]);
+			mFSAASamples = parseUnsignedInt(values[0]);
 			if (values.size() > 1)
 			if (values.size() > 1)
 				mFSAAHint = values[1];
 				mFSAAHint = values[1];
 
 
@@ -374,7 +374,7 @@ namespace CamelotEngine
 
 
 		if( name == "VSync Interval" )
 		if( name == "VSync Interval" )
 		{
 		{
-			mVSyncInterval = StringConverter::parseUnsignedInt(value);
+			mVSyncInterval = parseUnsignedInt(value);
 		}
 		}
 
 
 		if( name == "Allow NVPerfHUD" )
 		if( name == "Allow NVPerfHUD" )
@@ -428,9 +428,9 @@ namespace CamelotEngine
 						TRUE);
 						TRUE);
 					if (bOK)
 					if (bOK)
 					{
 					{
-						optFSAA->possibleValues.push_back(StringConverter::toString(n));
+						optFSAA->possibleValues.push_back(toString(n));
 						if (n >= 8)
 						if (n >= 8)
-							optFSAA->possibleValues.push_back(StringConverter::toString(n) + " [Quality]");
+							optFSAA->possibleValues.push_back(toString(n) + " [Quality]");
 					}
 					}
 				}
 				}
 
 
@@ -551,8 +551,8 @@ namespace CamelotEngine
 			// we know that the height starts 3 characters after the width and goes until the next space
 			// we know that the height starts 3 characters after the width and goes until the next space
 			String::size_type heightEnd = opt->second.currentValue.find(' ', widthEnd+3);
 			String::size_type heightEnd = opt->second.currentValue.find(' ', widthEnd+3);
 			// Now we can parse out the values
 			// Now we can parse out the values
-			width = StringConverter::parseInt(opt->second.currentValue.substr(0, widthEnd));
-			height = StringConverter::parseInt(opt->second.currentValue.substr(widthEnd+3, heightEnd));
+			width = parseInt(opt->second.currentValue.substr(0, widthEnd));
+			height = parseInt(opt->second.currentValue.substr(widthEnd+3, heightEnd));
 
 
 			for( unsigned j=0; j < mActiveD3DDriver->getVideoModeList()->count(); j++ )
 			for( unsigned j=0; j < mActiveD3DDriver->getVideoModeList()->count(); j++ )
 			{
 			{
@@ -581,14 +581,14 @@ namespace CamelotEngine
 			hwGamma = opt->second.currentValue == "Yes";
 			hwGamma = opt->second.currentValue == "Yes";
 
 
 			NameValuePairList miscParams;
 			NameValuePairList miscParams;
-			miscParams["colourDepth"] = StringConverter::toString(videoMode->getColourDepth());
-			miscParams["FSAA"] = StringConverter::toString(mFSAASamples);
+			miscParams["colourDepth"] = toString(videoMode->getColourDepth());
+			miscParams["FSAA"] = toString(mFSAASamples);
 			miscParams["FSAAHint"] = mFSAAHint;
 			miscParams["FSAAHint"] = mFSAAHint;
-			miscParams["vsync"] = StringConverter::toString(mVSync);
-			miscParams["vsyncInterval"] = StringConverter::toString(mVSyncInterval);
-			miscParams["useNVPerfHUD"] = StringConverter::toString(mUseNVPerfHUD);
-			miscParams["gamma"] = StringConverter::toString(hwGamma);
-			miscParams["monitorIndex"] = StringConverter::toString(static_cast<int>(mActiveD3DDriver->getAdapterNumber()));
+			miscParams["vsync"] = toString(mVSync);
+			miscParams["vsyncInterval"] = toString(mVSyncInterval);
+			miscParams["useNVPerfHUD"] = toString(mUseNVPerfHUD);
+			miscParams["gamma"] = toString(hwGamma);
+			miscParams["monitorIndex"] = toString(static_cast<int>(mActiveD3DDriver->getAdapterNumber()));
 
 
 			autoWindow = _createRenderWindow( windowTitle, width, height, 
 			autoWindow = _createRenderWindow( windowTitle, width, height, 
 				fullScreen, &miscParams );
 				fullScreen, &miscParams );
@@ -1726,7 +1726,7 @@ namespace CamelotEngine
 				hr = getActiveD3D9Device()->SetTexture(static_cast<DWORD>(stage), 0);
 				hr = getActiveD3D9Device()->SetTexture(static_cast<DWORD>(stage), 0);
 				if( hr != S_OK )
 				if( hr != S_OK )
 				{
 				{
-					String str = "Unable to disable texture '" + StringConverter::toString(stage) + "' in D3D9";
+					String str = "Unable to disable texture '" + toString(stage) + "' in D3D9";
 					OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9RenderSystem::_setTexture" );
 					OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9RenderSystem::_setTexture" );
 				}
 				}
 			}
 			}
@@ -1734,7 +1734,7 @@ namespace CamelotEngine
 			hr = __SetTextureStageState(static_cast<DWORD>(stage), D3DTSS_COLOROP, D3DTOP_DISABLE);
 			hr = __SetTextureStageState(static_cast<DWORD>(stage), D3DTSS_COLOROP, D3DTOP_DISABLE);
 			if( hr != S_OK )
 			if( hr != S_OK )
 			{
 			{
-				String str = "Unable to disable texture '" + StringConverter::toString(stage) + "' in D3D9";
+				String str = "Unable to disable texture '" + toString(stage) + "' in D3D9";
 				OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9RenderSystem::_setTexture" );
 				OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9RenderSystem::_setTexture" );
 			}
 			}
 
 
@@ -1757,7 +1757,7 @@ namespace CamelotEngine
 				if( hr != S_OK )
 				if( hr != S_OK )
 				{
 				{
 					String str = "Unable to disable vertex texture '" 
 					String str = "Unable to disable vertex texture '" 
-						+ StringConverter::toString(stage) + "' in D3D9";
+						+ toString(stage) + "' in D3D9";
 					OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9RenderSystem::_setVertexTexture" );
 					OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9RenderSystem::_setVertexTexture" );
 				}
 				}
 			}
 			}

+ 0 - 1
CamelotRenderer/CmD3D9RenderSystem.h

@@ -30,7 +30,6 @@ THE SOFTWARE.
 
 
 #include "CmD3D9Prerequisites.h"
 #include "CmD3D9Prerequisites.h"
 #include "CmString.h"
 #include "CmString.h"
-#include "CmStringConverter.h"
 #include "CmConfigOptionMap.h"
 #include "CmConfigOptionMap.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystemCapabilities.h"
 #include "CmRenderSystemCapabilities.h"

+ 14 - 15
CamelotRenderer/CmD3D9RenderWindow.cpp

@@ -31,7 +31,6 @@ THE SOFTWARE.
 #include "CmD3D9RenderSystem.h"
 #include "CmD3D9RenderSystem.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystem.h"
 #include "CmBitwise.h"
 #include "CmBitwise.h"
-#include "CmStringConverter.h"
 #include "CmWindowEventUtilities.h"
 #include "CmWindowEventUtilities.h"
 #include "CmD3D9DeviceManager.h"
 #include "CmD3D9DeviceManager.h"
 #include "CmRenderSystemManager.h"
 #include "CmRenderSystemManager.h"
@@ -89,11 +88,11 @@ namespace CamelotEngine
 			// left (x)
 			// left (x)
 			opt = miscParams->find("left");
 			opt = miscParams->find("left");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				left = StringConverter::parseInt(opt->second);
+				left = parseInt(opt->second);
 			// top (y)
 			// top (y)
 			opt = miscParams->find("top");
 			opt = miscParams->find("top");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				top = StringConverter::parseInt(opt->second);
+				top = parseInt(opt->second);
 			// Window title
 			// Window title
 			opt = miscParams->find("title");
 			opt = miscParams->find("title");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
@@ -101,36 +100,36 @@ namespace CamelotEngine
 			// parentWindowHandle		-> parentHWnd
 			// parentWindowHandle		-> parentHWnd
 			opt = miscParams->find("parentWindowHandle");
 			opt = miscParams->find("parentWindowHandle");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				parentHWnd = (HWND)StringConverter::parseUnsignedInt(opt->second);
+				parentHWnd = (HWND)parseUnsignedInt(opt->second);
 			// externalWindowHandle		-> externalHandle
 			// externalWindowHandle		-> externalHandle
 			opt = miscParams->find("externalWindowHandle");
 			opt = miscParams->find("externalWindowHandle");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				externalHandle = (HWND)StringConverter::parseUnsignedInt(opt->second);
+				externalHandle = (HWND)parseUnsignedInt(opt->second);
 			// vsync	[parseBool]
 			// vsync	[parseBool]
 			opt = miscParams->find("vsync");
 			opt = miscParams->find("vsync");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				mVSync = StringConverter::parseBool(opt->second);
+				mVSync = parseBool(opt->second);
 			// vsyncInterval	[parseUnsignedInt]
 			// vsyncInterval	[parseUnsignedInt]
 			opt = miscParams->find("vsyncInterval");
 			opt = miscParams->find("vsyncInterval");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				mVSyncInterval = StringConverter::parseUnsignedInt(opt->second);
+				mVSyncInterval = parseUnsignedInt(opt->second);
 			// displayFrequency
 			// displayFrequency
 			opt = miscParams->find("displayFrequency");
 			opt = miscParams->find("displayFrequency");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				mDisplayFrequency = StringConverter::parseUnsignedInt(opt->second);
+				mDisplayFrequency = parseUnsignedInt(opt->second);
 			// colourDepth
 			// colourDepth
 			opt = miscParams->find("colourDepth");
 			opt = miscParams->find("colourDepth");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				colourDepth = StringConverter::parseUnsignedInt(opt->second);
+				colourDepth = parseUnsignedInt(opt->second);
 			// depthBuffer [parseBool]
 			// depthBuffer [parseBool]
 			opt = miscParams->find("depthBuffer");
 			opt = miscParams->find("depthBuffer");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				depthBuffer = StringConverter::parseBool(opt->second);
+				depthBuffer = parseBool(opt->second);
 			// FSAA settings
 			// FSAA settings
 			opt = miscParams->find("FSAA");
 			opt = miscParams->find("FSAA");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
 			{
 			{
-				mFSAA = StringConverter::parseUnsignedInt(opt->second);
+				mFSAA = parseUnsignedInt(opt->second);
 			}
 			}
 			opt = miscParams->find("FSAAHint");
 			opt = miscParams->find("FSAAHint");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
@@ -145,19 +144,19 @@ namespace CamelotEngine
 			// set outer dimensions?
 			// set outer dimensions?
 			opt = miscParams->find("outerDimensions");
 			opt = miscParams->find("outerDimensions");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				outerSize = StringConverter::parseBool(opt->second);
+				outerSize = parseBool(opt->second);
 			// NV perf HUD?
 			// NV perf HUD?
 			opt = miscParams->find("useNVPerfHUD");
 			opt = miscParams->find("useNVPerfHUD");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				mUseNVPerfHUD = StringConverter::parseBool(opt->second);
+				mUseNVPerfHUD = parseBool(opt->second);
 			// sRGB?
 			// sRGB?
 			opt = miscParams->find("gamma");
 			opt = miscParams->find("gamma");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				mHwGamma = StringConverter::parseBool(opt->second);
+				mHwGamma = parseBool(opt->second);
 			// monitor index
 			// monitor index
 			opt = miscParams->find("monitorIndex");
 			opt = miscParams->find("monitorIndex");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				monitorIndex = StringConverter::parseInt(opt->second);
+				monitorIndex = parseInt(opt->second);
 
 
 		}
 		}
 
 

+ 0 - 1
CamelotRenderer/CmD3D9Texture.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 #include "CmD3D9Texture.h"
 #include "CmD3D9Texture.h"
 #include "CmD3D9HardwarePixelBuffer.h"
 #include "CmD3D9HardwarePixelBuffer.h"
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 #include "CmBitwise.h"
 #include "CmBitwise.h"
 #include "CmD3D9Mappings.h"
 #include "CmD3D9Mappings.h"
 #include "CmD3D9RenderSystem.h"
 #include "CmD3D9RenderSystem.h"

+ 0 - 1
CamelotRenderer/CmD3D9TextureManager.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 #include "CmD3D9TextureManager.h"
 #include "CmD3D9TextureManager.h"
 #include "CmD3D9Texture.h"
 #include "CmD3D9Texture.h"
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 #include "CmD3D9Mappings.h"
 #include "CmD3D9Mappings.h"
 #include "CmD3D9RenderSystem.h"
 #include "CmD3D9RenderSystem.h"
 #include "CmRenderSystemManager.h"
 #include "CmRenderSystemManager.h"

+ 0 - 1
CamelotRenderer/CmGpuProgram.cpp

@@ -30,7 +30,6 @@ THE SOFTWARE.
 #include "CmVector3.h"
 #include "CmVector3.h"
 #include "CmVector4.h"
 #include "CmVector4.h"
 #include "CmRenderSystemCapabilities.h"
 #include "CmRenderSystemCapabilities.h"
-#include "CmStringConverter.h"
 #include "CmException.h"
 #include "CmException.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystemManager.h"
 #include "CmRenderSystemManager.h"

+ 2 - 3
CamelotRenderer/CmGpuProgramParams.cpp

@@ -26,11 +26,10 @@ THE SOFTWARE.
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 */
 */
 #include "CmGpuProgramParams.h"
 #include "CmGpuProgramParams.h"
-//#include "CmHighLevelGpuProgram.h"
+#include "CmMatrix4.h"
 #include "CmVector3.h"
 #include "CmVector3.h"
 #include "CmVector4.h"
 #include "CmVector4.h"
 #include "CmRenderSystemCapabilities.h"
 #include "CmRenderSystemCapabilities.h"
-#include "CmStringConverter.h"
 #include "CmException.h"
 #include "CmException.h"
 
 
 
 
@@ -205,7 +204,7 @@ namespace CamelotEngine
 
 
 		for (size_t i = 0; i < maxArrayIndex; i++)
 		for (size_t i = 0; i < maxArrayIndex; i++)
 		{
 		{
-			arrayName = paramName + "[" + StringConverter::toString(i) + "]";
+			arrayName = paramName + "[" + toString(i) + "]";
 			map.insert(GpuConstantDefinitionMap::value_type(arrayName, arrayDef));
 			map.insert(GpuConstantDefinitionMap::value_type(arrayName, arrayDef));
 			// increment location
 			// increment location
 			arrayDef.physicalIndex += arrayDef.elementSize;
 			arrayDef.physicalIndex += arrayDef.elementSize;

+ 1 - 2
CamelotRenderer/CmHardwareVertexBuffer.cpp

@@ -29,7 +29,6 @@ THE SOFTWARE.
 #include "CmHardwareVertexBuffer.h"
 #include "CmHardwareVertexBuffer.h"
 #include "CmColourValue.h"
 #include "CmColourValue.h"
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 #include "CmHardwareBufferManager.h"
 #include "CmHardwareBufferManager.h"
 #include "CmDefaultHardwareBufferManager.h"
 #include "CmDefaultHardwareBufferManager.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystem.h"
@@ -527,7 +526,7 @@ namespace CamelotEngine {
 		if (i == mBindingMap.end())
 		if (i == mBindingMap.end())
 		{
 		{
 			OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
 			OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
-				"Cannot find buffer binding for index " + StringConverter::toString(index),
+				"Cannot find buffer binding for index " + toString(index),
 				"VertexBufferBinding::unsetBinding");
 				"VertexBufferBinding::unsetBinding");
 		}
 		}
 		mBindingMap.erase(i);
 		mBindingMap.erase(i);

+ 0 - 1
CamelotRenderer/CmRenderSystemCapabilities.cpp

@@ -26,7 +26,6 @@ THE SOFTWARE.
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 */
 */
 #include "CmRenderSystemCapabilities.h"
 #include "CmRenderSystemCapabilities.h"
-#include "CmStringConverter.h"
 #include "CmException.h"
 #include "CmException.h"
 #include "CmString.h"
 #include "CmString.h"
 
 

+ 4 - 5
CamelotRenderer/CmRenderSystemCapabilities.h

@@ -31,7 +31,6 @@ THE SOFTWARE.
 // Precompiler options
 // Precompiler options
 #include "CmPrerequisites.h"
 #include "CmPrerequisites.h"
 #include "CmString.h"
 #include "CmString.h"
-#include "CmStringConverter.h"
 
 
 // Because there are more than 32 possible Capabilities, more than 1 int is needed to store them all.
 // Because there are more than 32 possible Capabilities, more than 1 int is needed to store them all.
 // In fact, an array of integers is used to store capabilities. However all the capabilities are defined in the single
 // In fact, an array of integers is used to store capabilities. However all the capabilities are defined in the single
@@ -192,13 +191,13 @@ namespace CamelotEngine
 			std::vector<CamelotEngine::String> tokens = StringUtil::split(versionString, ".");
 			std::vector<CamelotEngine::String> tokens = StringUtil::split(versionString, ".");
 			if(!tokens.empty())
 			if(!tokens.empty())
 			{
 			{
-				major = StringConverter::parseInt(tokens[0]);
+				major = parseInt(tokens[0]);
 				if (tokens.size() > 1)
 				if (tokens.size() > 1)
-					minor = StringConverter::parseInt(tokens[1]);
+					minor = parseInt(tokens[1]);
 				if (tokens.size() > 2)
 				if (tokens.size() > 2)
-					release = StringConverter::parseInt(tokens[2]);
+					release = parseInt(tokens[2]);
 				if (tokens.size() > 3)
 				if (tokens.size() > 3)
-					build = StringConverter::parseInt(tokens[3]);
+					build = parseInt(tokens[3]);
 			}
 			}
 
 
 		}
 		}

+ 1 - 2
CamelotRenderer/CmRenderTarget.cpp

@@ -26,7 +26,6 @@ THE SOFTWARE.
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 */
 */
 #include "CmRenderTarget.h"
 #include "CmRenderTarget.h"
-#include "CmStringConverter.h"
 
 
 #include "CmViewport.h"
 #include "CmViewport.h"
 #include "CmException.h"
 #include "CmException.h"
@@ -113,7 +112,7 @@ namespace CamelotEngine {
 		else
 		else
 		{
 		{
 			OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,"No viewport with given zorder : "
 			OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,"No viewport with given zorder : "
-				+ StringConverter::toString(zorder), "RenderTarget::_updateViewport");
+				+ toString(zorder), "RenderTarget::_updateViewport");
 		}
 		}
 	}
 	}
 
 

+ 0 - 1
CamelotRenderer/CmWindowEventUtilities.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 #include "CmWindowEventUtilities.h"
 #include "CmWindowEventUtilities.h"
 #include "CmRenderWindow.h"
 #include "CmRenderWindow.h"
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 #if CM_PLATFORM == CM_PLATFORM_LINUX
 #if CM_PLATFORM == CM_PLATFORM_LINUX
 #include <X11/Xlib.h>
 #include <X11/Xlib.h>
 void GLXProc( CamelotEngine::RenderWindow *win, const XEvent &event );
 void GLXProc( CamelotEngine::RenderWindow *win, const XEvent &event );

+ 0 - 1
CamelotRenderer/RenderSystemGL/Source/CmGLFBOMultiRenderTarget.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 
 
 #include "CmGLFBOMultiRenderTarget.h"
 #include "CmGLFBOMultiRenderTarget.h"
 #include "CmGLPixelFormat.h"
 #include "CmGLPixelFormat.h"
-#include "CmStringConverter.h"
 #include "CmGLHardwarePixelBuffer.h"
 #include "CmGLHardwarePixelBuffer.h"
 
 
 namespace CamelotEngine {
 namespace CamelotEngine {

+ 0 - 1
CamelotRenderer/RenderSystemGL/Source/CmGLFBORenderTexture.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 
 
 #include "CmGLFBORenderTexture.h"
 #include "CmGLFBORenderTexture.h"
 #include "CmGLPixelFormat.h"
 #include "CmGLPixelFormat.h"
-#include "CmStringConverter.h"
 #include "CmGLHardwarePixelBuffer.h"
 #include "CmGLHardwarePixelBuffer.h"
 #include "CmGLFBOMultiRenderTarget.h"
 #include "CmGLFBOMultiRenderTarget.h"
 
 

+ 0 - 1
CamelotRenderer/RenderSystemGL/Source/CmGLFrameBufferObject.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 
 
 #include "CmGLFrameBufferObject.h"
 #include "CmGLFrameBufferObject.h"
 #include "CmGLPixelFormat.h"
 #include "CmGLPixelFormat.h"
-#include "CmStringConverter.h"
 #include "CmGLHardwarePixelBuffer.h"
 #include "CmGLHardwarePixelBuffer.h"
 #include "CmGLFBORenderTexture.h"
 #include "CmGLFBORenderTexture.h"
 #include "CmRenderSystemManager.h"
 #include "CmRenderSystemManager.h"

+ 1 - 2
CamelotRenderer/RenderSystemGL/Source/CmGLGpuProgram.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 
 
 #include "CmGLGpuProgram.h"
 #include "CmGLGpuProgram.h"
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 
 
 using namespace CamelotEngine;
 using namespace CamelotEngine;
 
 
@@ -226,7 +225,7 @@ void GLArbGpuProgram::loadFromSource(void)
     {
     {
         GLint errPos;
         GLint errPos;
         glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos);
         glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos);
-		String errPosStr = StringConverter::toString(errPos);
+		String errPosStr = toString(errPos);
         char* errStr = (char*)glGetString(GL_PROGRAM_ERROR_STRING_ARB);
         char* errStr = (char*)glGetString(GL_PROGRAM_ERROR_STRING_ARB);
         // XXX New exception code?
         // XXX New exception code?
         OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, 
         OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, 

+ 1 - 2
CamelotRenderer/RenderSystemGL/Source/CmGLHardwarePixelBuffer.cpp

@@ -30,7 +30,6 @@ THE SOFTWARE.
 #include "CmGLSupport.h"
 #include "CmGLSupport.h"
 #include "CmGLPixelFormat.h"
 #include "CmGLPixelFormat.h"
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 #include "CmBitwise.h"
 #include "CmBitwise.h"
 #include "CmGLFBORenderTexture.h"
 #include "CmGLFBORenderTexture.h"
 #include "CmRenderSystemManager.h"
 #include "CmRenderSystemManager.h"
@@ -266,7 +265,7 @@ GLTextureBuffer::GLTextureBuffer(const String &baseName, GLenum target, GLuint i
         for(size_t zoffset=0; zoffset<mDepth; ++zoffset)
         for(size_t zoffset=0; zoffset<mDepth; ++zoffset)
         {
         {
             String name;
             String name;
-			name = "rtt/" + StringConverter::toString((size_t)this) + "/" + baseName;
+			name = "rtt/" + toString((size_t)this) + "/" + baseName;
             GLSurfaceDesc surface;
             GLSurfaceDesc surface;
             surface.buffer = this;
             surface.buffer = this;
             surface.zoffset = zoffset;
             surface.zoffset = zoffset;

+ 0 - 1
CamelotRenderer/RenderSystemGL/Source/CmGLPBRenderTexture.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 #include "CmGLPBRenderTexture.h"
 #include "CmGLPBRenderTexture.h"
 #include "CmGLContext.h"
 #include "CmGLContext.h"
 #include "CmGLPixelFormat.h"
 #include "CmGLPixelFormat.h"
-#include "CmStringConverter.h"
 #include "CmGLHardwarePixelBuffer.h"
 #include "CmGLHardwarePixelBuffer.h"
 
 
 namespace CamelotEngine {
 namespace CamelotEngine {

+ 3 - 4
CamelotRenderer/RenderSystemGL/Source/CmGLRenderSystem.cpp

@@ -29,7 +29,6 @@ THE SOFTWARE.s
 
 
 #include "CmGLRenderSystem.h"
 #include "CmGLRenderSystem.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystem.h"
-#include "CmStringConverter.h"
 #include "CmCamera.h"
 #include "CmCamera.h"
 #include "CmGLTextureManager.h"
 #include "CmGLTextureManager.h"
 #include "CmGLHardwareVertexBuffer.h"
 #include "CmGLHardwareVertexBuffer.h"
@@ -980,11 +979,11 @@ namespace CamelotEngine {
 
 
 			if (!tokens.empty())
 			if (!tokens.empty())
 			{
 			{
-				mDriverVersion.major = StringConverter::parseInt(tokens[0]);
+				mDriverVersion.major = parseInt(tokens[0]);
 				if (tokens.size() > 1)
 				if (tokens.size() > 1)
-					mDriverVersion.minor = StringConverter::parseInt(tokens[1]);
+					mDriverVersion.minor = parseInt(tokens[1]);
 				if (tokens.size() > 2)
 				if (tokens.size() > 2)
-					mDriverVersion.release = StringConverter::parseInt(tokens[2]); 
+					mDriverVersion.release = parseInt(tokens[2]); 
 			}
 			}
 			mDriverVersion.build = 0;
 			mDriverVersion.build = 0;
 			// Initialise GL after the first window has been created
 			// Initialise GL after the first window has been created

+ 0 - 1
CamelotRenderer/RenderSystemGL/Source/CmGLRenderTexture.cpp

@@ -27,7 +27,6 @@ THE SOFTWARE.
 */
 */
 #include "CmGLRenderTexture.h"
 #include "CmGLRenderTexture.h"
 #include "CmGLPixelFormat.h"
 #include "CmGLPixelFormat.h"
-#include "CmStringConverter.h"
 #include "CmGLHardwarePixelBuffer.h"
 #include "CmGLHardwarePixelBuffer.h"
 
 
 namespace CamelotEngine {
 namespace CamelotEngine {

+ 2 - 3
CamelotRenderer/RenderSystemGL/Source/CmGLTexture.cpp

@@ -34,7 +34,6 @@ THE SOFTWARE.
 //#include "CmTextureManager.h"
 //#include "CmTextureManager.h"
 #include "CmCamera.h"
 #include "CmCamera.h"
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 #include "CmBitwise.h"
 #include "CmBitwise.h"
 #include "CmTextureManager.h"
 #include "CmTextureManager.h"
 #include "CmRenderSystemManager.h"
 #include "CmRenderSystemManager.h"
@@ -390,8 +389,8 @@ namespace CamelotEngine {
                     OGRE_EXCEPT(
                     OGRE_EXCEPT(
                         Exception::ERR_RENDERINGAPI_ERROR, 
                         Exception::ERR_RENDERINGAPI_ERROR, 
                         "Zero sized texture surface on texture face "
                         "Zero sized texture surface on texture face "
-						+ StringConverter::toString(face) 
-						+ " mipmap "+StringConverter::toString(mip)
+						+ toString(face) 
+						+ " mipmap "+toString(mip)
 						+ ". Probably, the GL driver refused to create the texture.", 
 						+ ". Probably, the GL driver refused to create the texture.", 
                             "GLTexture::_createSurfaceList");
                             "GLTexture::_createSurfaceList");
                 }
                 }

+ 19 - 20
CamelotRenderer/RenderSystemGL/Source/CmWin32GLSupport.cpp

@@ -1,5 +1,4 @@
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 
 
 #include <algorithm>
 #include <algorithm>
 
 
@@ -106,7 +105,7 @@ namespace CamelotEngine {
 		optFSAA.possibleValues.push_back("0");
 		optFSAA.possibleValues.push_back("0");
 		for (vector<int>::type::iterator it = mFSAALevels.begin(); it != mFSAALevels.end(); ++it)
 		for (vector<int>::type::iterator it = mFSAALevels.begin(); it != mFSAALevels.end(); ++it)
 		{
 		{
-			String val = StringConverter::toString(*it);
+			String val = toString(*it);
 			optFSAA.possibleValues.push_back(val);
 			optFSAA.possibleValues.push_back(val);
 			/* not implementing CSAA in GL for now
 			/* not implementing CSAA in GL for now
 			if (*it >= 8)
 			if (*it >= 8)
@@ -159,15 +158,15 @@ namespace CamelotEngine {
 		String::size_type pos = val.find('x');
 		String::size_type pos = val.find('x');
 		if (pos == String::npos)
 		if (pos == String::npos)
 			OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid Video Mode provided", "Win32GLSupport::refreshConfig");
 			OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid Video Mode provided", "Win32GLSupport::refreshConfig");
-		DWORD width = StringConverter::parseUnsignedInt(val.substr(0, pos));
-		DWORD height = StringConverter::parseUnsignedInt(val.substr(pos+1, String::npos));
+		DWORD width = parseUnsignedInt(val.substr(0, pos));
+		DWORD height = parseUnsignedInt(val.substr(pos+1, String::npos));
 
 
 		for(vector<DEVMODE>::type::const_iterator i = mDevModes.begin(); i != mDevModes.end(); ++i)
 		for(vector<DEVMODE>::type::const_iterator i = mDevModes.begin(); i != mDevModes.end(); ++i)
 		{
 		{
 			if (i->dmPelsWidth != width || i->dmPelsHeight != height)
 			if (i->dmPelsWidth != width || i->dmPelsHeight != height)
 				continue;
 				continue;
-			optColourDepth->possibleValues.push_back(StringConverter::toString((unsigned int)i->dmBitsPerPel));
-			optDisplayFrequency->possibleValues.push_back(StringConverter::toString((unsigned int)i->dmDisplayFrequency));
+			optColourDepth->possibleValues.push_back(toString((unsigned int)i->dmBitsPerPel));
+			optDisplayFrequency->possibleValues.push_back(toString((unsigned int)i->dmDisplayFrequency));
 		}
 		}
 		remove_duplicates(optColourDepth->possibleValues);
 		remove_duplicates(optColourDepth->possibleValues);
 		remove_duplicates(optDisplayFrequency->possibleValues);
 		remove_duplicates(optDisplayFrequency->possibleValues);
@@ -237,8 +236,8 @@ namespace CamelotEngine {
             if (pos == String::npos)
             if (pos == String::npos)
                 OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid Video Mode provided", "Win32GLSupport::createWindow");
                 OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid Video Mode provided", "Win32GLSupport::createWindow");
 
 
-			unsigned int w = StringConverter::parseUnsignedInt(val.substr(0, pos));
-            unsigned int h = StringConverter::parseUnsignedInt(val.substr(pos + 1));
+			unsigned int w = parseUnsignedInt(val.substr(0, pos));
+            unsigned int h = parseUnsignedInt(val.substr(pos + 1));
 
 
 			// Parse optional parameters
 			// Parse optional parameters
 			NameValuePairList winOptions;
 			NameValuePairList winOptions;
@@ -246,14 +245,14 @@ namespace CamelotEngine {
 			if (opt == mOptions.end())
 			if (opt == mOptions.end())
 				OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Can't find Colour Depth options!", "Win32GLSupport::createWindow");
 				OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Can't find Colour Depth options!", "Win32GLSupport::createWindow");
 			unsigned int colourDepth =
 			unsigned int colourDepth =
-				StringConverter::parseUnsignedInt(opt->second.currentValue);
-			winOptions["colourDepth"] = StringConverter::toString(colourDepth);
+				parseUnsignedInt(opt->second.currentValue);
+			winOptions["colourDepth"] = toString(colourDepth);
 
 
 			opt = mOptions.find("VSync");
 			opt = mOptions.find("VSync");
 			if (opt == mOptions.end())
 			if (opt == mOptions.end())
 				OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Can't find VSync options!", "Win32GLSupport::createWindow");
 				OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Can't find VSync options!", "Win32GLSupport::createWindow");
 			bool vsync = (opt->second.currentValue == "Yes");
 			bool vsync = (opt->second.currentValue == "Yes");
-			winOptions["vsync"] = StringConverter::toString(vsync);
+			winOptions["vsync"] = toString(vsync);
 			renderSystem->setWaitForVerticalBlank(vsync);
 			renderSystem->setWaitForVerticalBlank(vsync);
 
 
 			opt = mOptions.find("VSync Interval");
 			opt = mOptions.find("VSync Interval");
@@ -266,27 +265,27 @@ namespace CamelotEngine {
 			if (opt != mOptions.end())
 			if (opt != mOptions.end())
 			{
 			{
 				unsigned int displayFrequency =
 				unsigned int displayFrequency =
-					StringConverter::parseUnsignedInt(opt->second.currentValue);
-				winOptions["displayFrequency"] = StringConverter::toString(displayFrequency);
+					parseUnsignedInt(opt->second.currentValue);
+				winOptions["displayFrequency"] = toString(displayFrequency);
 			}
 			}
 
 
 			opt = mOptions.find("FSAA");
 			opt = mOptions.find("FSAA");
 			if (opt == mOptions.end())
 			if (opt == mOptions.end())
 				OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Can't find FSAA options!", "Win32GLSupport::createWindow");
 				OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Can't find FSAA options!", "Win32GLSupport::createWindow");
 			std::vector<CamelotEngine::String> aavalues = StringUtil::split(opt->second.currentValue, " ", 1);
 			std::vector<CamelotEngine::String> aavalues = StringUtil::split(opt->second.currentValue, " ", 1);
-			unsigned int multisample = StringConverter::parseUnsignedInt(aavalues[0]);
+			unsigned int multisample = parseUnsignedInt(aavalues[0]);
 			String multisample_hint;
 			String multisample_hint;
 			if (aavalues.size() > 1)
 			if (aavalues.size() > 1)
 				multisample_hint = aavalues[1];
 				multisample_hint = aavalues[1];
 
 
-			winOptions["FSAA"] = StringConverter::toString(multisample);
+			winOptions["FSAA"] = toString(multisample);
 			winOptions["FSAAHint"] = multisample_hint;
 			winOptions["FSAAHint"] = multisample_hint;
 
 
 			opt = mOptions.find("sRGB Gamma Conversion");
 			opt = mOptions.find("sRGB Gamma Conversion");
 			if (opt == mOptions.end())
 			if (opt == mOptions.end())
 				OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Can't find sRGB options!", "Win32GLSupport::createWindow");
 				OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Can't find sRGB options!", "Win32GLSupport::createWindow");
 			bool hwGamma = (opt->second.currentValue == "Yes");
 			bool hwGamma = (opt->second.currentValue == "Yes");
-			winOptions["gamma"] = StringConverter::toString(hwGamma);
+			winOptions["gamma"] = toString(hwGamma);
 
 
             return renderSystem->_createRenderWindow(windowTitle, w, h, fullscreen, &winOptions);
             return renderSystem->_createRenderWindow(windowTitle, w, h, fullscreen, &winOptions);
         }
         }
@@ -342,7 +341,7 @@ namespace CamelotEngine {
 				if (mMonitorInfoList.empty())		
 				if (mMonitorInfoList.empty())		
 					EnumDisplayMonitors(NULL, NULL, sCreateMonitorsInfoEnumProc, (LPARAM)&mMonitorInfoList);			
 					EnumDisplayMonitors(NULL, NULL, sCreateMonitorsInfoEnumProc, (LPARAM)&mMonitorInfoList);			
 
 
-				monitorIndex = StringConverter::parseInt(monitorIndexIt->second);
+				monitorIndex = parseInt(monitorIndexIt->second);
 				if (monitorIndex < (int)mMonitorInfoList.size())
 				if (monitorIndex < (int)mMonitorInfoList.size())
 				{						
 				{						
 					hMonitor = mMonitorInfoList[monitorIndex].hMonitor;					
 					hMonitor = mMonitorInfoList[monitorIndex].hMonitor;					
@@ -358,10 +357,10 @@ namespace CamelotEngine {
 				int top  = -1;
 				int top  = -1;
 
 
 				if ((opt = newParams.find("left")) != newParams.end())
 				if ((opt = newParams.find("left")) != newParams.end())
-					left = StringConverter::parseInt(opt->second);
+					left = parseInt(opt->second);
 
 
 				if ((opt = newParams.find("top")) != newParams.end())
 				if ((opt = newParams.find("top")) != newParams.end())
-					top = StringConverter::parseInt(opt->second);
+					top = parseInt(opt->second);
 
 
 				// Fill in anchor point.
 				// Fill in anchor point.
 				windowAnchorPoint.x = left;
 				windowAnchorPoint.x = left;
@@ -372,7 +371,7 @@ namespace CamelotEngine {
 				hMonitor = MonitorFromPoint(windowAnchorPoint, MONITOR_DEFAULTTONEAREST);				
 				hMonitor = MonitorFromPoint(windowAnchorPoint, MONITOR_DEFAULTTONEAREST);				
 			}
 			}
 
 
-			newParams["monitorHandle"] = StringConverter::toString((size_t)hMonitor);																
+			newParams["monitorHandle"] = toString((size_t)hMonitor);																
 		}
 		}
 
 
 		window->create(name, width, height, fullScreen, miscParams);
 		window->create(name, width, height, fullScreen, miscParams);

+ 0 - 1
CamelotRenderer/RenderSystemGL/Source/CmWin32RenderTexture.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 
 
 #include "CmRenderSystem.h"
 #include "CmRenderSystem.h"
 #include "CmException.h"
 #include "CmException.h"
-#include "CmStringConverter.h"
 #include "CmWin32RenderTexture.h"
 #include "CmWin32RenderTexture.h"
 #include "CmWin32GLSupport.h"
 #include "CmWin32GLSupport.h"
 #include "CmWin32Context.h"
 #include "CmWin32Context.h"

+ 16 - 17
CamelotRenderer/RenderSystemGL/Source/CmWin32Window.cpp

@@ -31,7 +31,6 @@ THE SOFTWARE.
 #endif
 #endif
 #include "CmWin32Window.h"
 #include "CmWin32Window.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystem.h"
-#include "CmStringConverter.h"
 #include "CmException.h"
 #include "CmException.h"
 #include "CmWin32GLSupport.h"
 #include "CmWin32GLSupport.h"
 #include "CmWin32Context.h"
 #include "CmWin32Context.h"
@@ -111,32 +110,32 @@ namespace CamelotEngine {
 				title = opt->second;
 				title = opt->second;
 
 
 			if ((opt = miscParams->find("left")) != end)
 			if ((opt = miscParams->find("left")) != end)
-				left = StringConverter::parseInt(opt->second);
+				left = parseInt(opt->second);
 
 
 			if ((opt = miscParams->find("top")) != end)
 			if ((opt = miscParams->find("top")) != end)
-				top = StringConverter::parseInt(opt->second);
+				top = parseInt(opt->second);
 
 
 			if ((opt = miscParams->find("depthBuffer")) != end)
 			if ((opt = miscParams->find("depthBuffer")) != end)
-				mIsDepthBuffered = StringConverter::parseBool(opt->second);
+				mIsDepthBuffered = parseBool(opt->second);
 
 
 			if ((opt = miscParams->find("vsync")) != end)
 			if ((opt = miscParams->find("vsync")) != end)
-				vsync = StringConverter::parseBool(opt->second);
+				vsync = parseBool(opt->second);
 
 
 			if ((opt = miscParams->find("vsyncInterval")) != end)
 			if ((opt = miscParams->find("vsyncInterval")) != end)
-				vsyncInterval = StringConverter::parseUnsignedInt(opt->second);
+				vsyncInterval = parseUnsignedInt(opt->second);
 
 
 			if ((opt = miscParams->find("FSAA")) != end)
 			if ((opt = miscParams->find("FSAA")) != end)
-				mFSAA = StringConverter::parseUnsignedInt(opt->second);
+				mFSAA = parseUnsignedInt(opt->second);
 
 
 			if ((opt = miscParams->find("FSAAHint")) != end)
 			if ((opt = miscParams->find("FSAAHint")) != end)
 				mFSAAHint = opt->second;
 				mFSAAHint = opt->second;
 
 
 			if ((opt = miscParams->find("gamma")) != end)
 			if ((opt = miscParams->find("gamma")) != end)
-				hwGamma = StringConverter::parseBool(opt->second);
+				hwGamma = parseBool(opt->second);
 
 
 			if ((opt = miscParams->find("externalWindowHandle")) != end)
 			if ((opt = miscParams->find("externalWindowHandle")) != end)
 			{
 			{
-				mHWnd = (HWND)StringConverter::parseUnsignedInt(opt->second);
+				mHWnd = (HWND)parseUnsignedInt(opt->second);
 				if (mHWnd)
 				if (mHWnd)
 				{
 				{
 					mIsExternal = true;
 					mIsExternal = true;
@@ -144,12 +143,12 @@ namespace CamelotEngine {
 				}
 				}
 
 
 				if ((opt = miscParams->find("externalGLControl")) != end) {
 				if ((opt = miscParams->find("externalGLControl")) != end) {
-				  mIsExternalGLControl = StringConverter::parseBool(opt->second);
+				  mIsExternalGLControl = parseBool(opt->second);
 				}
 				}
 			}
 			}
 			if ((opt = miscParams->find("externalGLContext")) != end)
 			if ((opt = miscParams->find("externalGLContext")) != end)
 			{
 			{
-				mGlrc = (HGLRC)StringConverter::parseUnsignedLong(opt->second);
+				mGlrc = (HGLRC)parseUnsignedLong(opt->second);
 				if( mGlrc )
 				if( mGlrc )
 					mIsExternalGLContext = true;
 					mIsExternalGLContext = true;
 			}
 			}
@@ -161,14 +160,14 @@ namespace CamelotEngine {
 			// set outer dimensions?
 			// set outer dimensions?
 			opt = miscParams->find("outerDimensions");
 			opt = miscParams->find("outerDimensions");
 			if(opt != miscParams->end())
 			if(opt != miscParams->end())
-				outerSize = StringConverter::parseBool(opt->second);
+				outerSize = parseBool(opt->second);
 
 
 			// only available with fullscreen
 			// only available with fullscreen
 			if ((opt = miscParams->find("displayFrequency")) != end)
 			if ((opt = miscParams->find("displayFrequency")) != end)
-				mDisplayFrequency = StringConverter::parseUnsignedInt(opt->second);
+				mDisplayFrequency = parseUnsignedInt(opt->second);
 			if ((opt = miscParams->find("colourDepth")) != end)
 			if ((opt = miscParams->find("colourDepth")) != end)
 			{
 			{
-				mColourDepth = StringConverter::parseUnsignedInt(opt->second);
+				mColourDepth = parseUnsignedInt(opt->second);
 				if (!mIsFullScreen)
 				if (!mIsFullScreen)
 				{
 				{
 					// make sure we don't exceed desktop colour depth
 					// make sure we don't exceed desktop colour depth
@@ -179,16 +178,16 @@ namespace CamelotEngine {
 
 
 			// incompatible with fullscreen
 			// incompatible with fullscreen
 			if ((opt = miscParams->find("parentWindowHandle")) != end)
 			if ((opt = miscParams->find("parentWindowHandle")) != end)
-				parent = (HWND)StringConverter::parseUnsignedInt(opt->second);
+				parent = (HWND)parseUnsignedInt(opt->second);
 
 
 
 
 			// monitor index
 			// monitor index
 			if ((opt = miscParams->find("monitorIndex")) != end)
 			if ((opt = miscParams->find("monitorIndex")) != end)
-				monitorIndex = StringConverter::parseInt(opt->second);
+				monitorIndex = parseInt(opt->second);
 			
 			
 			// monitor handle
 			// monitor handle
 			if ((opt = miscParams->find("monitorHandle")) != end)
 			if ((opt = miscParams->find("monitorHandle")) != end)
-				hMonitor = (HMONITOR)StringConverter::parseInt(opt->second);			
+				hMonitor = (HMONITOR)parseInt(opt->second);			
 		}
 		}
 
 
 		if (!mIsExternal)
 		if (!mIsExternal)

+ 0 - 1
CamelotRenderer/RenderSystemGL/Source/GLSL/src/CmGLSLLinkProgram.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 
 
 #include "CmGLSLExtSupport.h"
 #include "CmGLSLExtSupport.h"
 #include "CmGLSLLinkProgram.h"
 #include "CmGLSLLinkProgram.h"
-#include "CmStringConverter.h"
 #include "CmGLSLGpuProgram.h"
 #include "CmGLSLGpuProgram.h"
 #include "CmGLSLProgram.h"
 #include "CmGLSLProgram.h"
 #include "CmGLSLLinkProgramManager.h"
 #include "CmGLSLLinkProgramManager.h"

+ 1 - 2
CamelotRenderer/RenderSystemGL/Source/GLSL/src/CmGLSLLinkProgramManager.cpp

@@ -29,7 +29,6 @@ THE SOFTWARE.
 #include "CmGLSLLinkProgramManager.h"
 #include "CmGLSLLinkProgramManager.h"
 #include "CmGLSLGpuProgram.h"
 #include "CmGLSLGpuProgram.h"
 #include "CmGLSLProgram.h"
 #include "CmGLSLProgram.h"
-#include "CmStringConverter.h"
 
 
 namespace CamelotEngine {
 namespace CamelotEngine {
 
 
@@ -472,7 +471,7 @@ namespace CamelotEngine {
 							// an expression (e.g. 24*3) or refer to a constant expression
 							// an expression (e.g. 24*3) or refer to a constant expression
 							// we'd have to evaluate the expression which could get nasty
 							// we'd have to evaluate the expression which could get nasty
 							// TODO
 							// TODO
-							def.arraySize = StringConverter::parseInt(arrayDimTerm);
+							def.arraySize = parseInt(arrayDimTerm);
 
 
 						}
 						}
 						else
 						else

+ 0 - 1
CamelotRenderer/RenderSystemGL/Source/GLSL/src/CmGLSLProgram.cpp

@@ -28,7 +28,6 @@ THE SOFTWARE.
 #include "CmGpuProgram.h"
 #include "CmGpuProgram.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystem.h"
 #include "CmRenderSystemCapabilities.h"
 #include "CmRenderSystemCapabilities.h"
-#include "CmStringConverter.h"
 #include "CmGpuProgramManager.h"
 #include "CmGpuProgramManager.h"
 #include "CmHighLevelGpuProgramManager.h"
 #include "CmHighLevelGpuProgramManager.h"
 #include "CmException.h"
 #include "CmException.h"

+ 0 - 2
CamelotUtility/CamelotUtility.vcxproj

@@ -75,7 +75,6 @@
     <ClInclude Include="Include\CmException.h" />
     <ClInclude Include="Include\CmException.h" />
     <ClInclude Include="Include\CmMathAsm.h" />
     <ClInclude Include="Include\CmMathAsm.h" />
     <ClInclude Include="Include\CmString.h" />
     <ClInclude Include="Include\CmString.h" />
-    <ClInclude Include="Include\CmStringConverter.h" />
     <ClInclude Include="Include\CmThreadDefines.h" />
     <ClInclude Include="Include\CmThreadDefines.h" />
     <ClInclude Include="Include\CmTypes.h" />
     <ClInclude Include="Include\CmTypes.h" />
     <ClInclude Include="Include\CmFwdDeclUtil.h" />
     <ClInclude Include="Include\CmFwdDeclUtil.h" />
@@ -105,7 +104,6 @@
     <ClCompile Include="Source\CmPlane.cpp" />
     <ClCompile Include="Source\CmPlane.cpp" />
     <ClCompile Include="Source\CmQuaternion.cpp" />
     <ClCompile Include="Source\CmQuaternion.cpp" />
     <ClCompile Include="Source\CmString.cpp" />
     <ClCompile Include="Source\CmString.cpp" />
-    <ClCompile Include="Source\CmStringConverter.cpp" />
     <ClCompile Include="Source\CmVector2.cpp" />
     <ClCompile Include="Source\CmVector2.cpp" />
     <ClCompile Include="Source\CmVector3.cpp" />
     <ClCompile Include="Source\CmVector3.cpp" />
     <ClCompile Include="Source\CmVector4.cpp" />
     <ClCompile Include="Source\CmVector4.cpp" />

+ 0 - 6
CamelotUtility/CamelotUtility.vcxproj.filters

@@ -90,9 +90,6 @@
     <ClInclude Include="Include\CmString.h">
     <ClInclude Include="Include\CmString.h">
       <Filter>Header Files</Filter>
       <Filter>Header Files</Filter>
     </ClInclude>
     </ClInclude>
-    <ClInclude Include="Include\CmStringConverter.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="Include\CmColourValue.h">
     <ClInclude Include="Include\CmColourValue.h">
       <Filter>Header Files</Filter>
       <Filter>Header Files</Filter>
     </ClInclude>
     </ClInclude>
@@ -134,9 +131,6 @@
     <ClCompile Include="Source\CmString.cpp">
     <ClCompile Include="Source\CmString.cpp">
       <Filter>Source Files</Filter>
       <Filter>Source Files</Filter>
     </ClCompile>
     </ClCompile>
-    <ClCompile Include="Source\CmStringConverter.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="Source\CmColourValue.cpp">
     <ClCompile Include="Source\CmColourValue.cpp">
       <Filter>Source Files</Filter>
       <Filter>Source Files</Filter>
     </ClCompile>
     </ClCompile>

+ 1 - 0
CamelotUtility/Include/CmFwdDeclUtil.h

@@ -18,4 +18,5 @@ namespace CamelotEngine {
 	class Vector2;
 	class Vector2;
 	class Vector3;
 	class Vector3;
 	class Vector4;
 	class Vector4;
+	class ColourValue;
 }
 }

+ 138 - 0
CamelotUtility/Include/CmString.h

@@ -214,6 +214,144 @@ namespace CamelotEngine {
 	/** @} */
 	/** @} */
 	/** @} */
 	/** @} */
 
 
+	    /** Converts a float to a String. */
+    CM_EXPORT String toString(float val, unsigned short precision = 6, 
+        unsigned short width = 0, char fill = ' ', 
+        std::ios::fmtflags flags = std::ios::fmtflags(0) );
+    /** Converts a Radian to a String. */
+    CM_EXPORT String toString(Radian val, unsigned short precision = 6, 
+        unsigned short width = 0, char fill = ' ', 
+        std::ios::fmtflags flags = std::ios::fmtflags(0) );
+    /** Converts a Degree to a String. */
+    CM_EXPORT String toString(Degree val, unsigned short precision = 6, 
+        unsigned short width = 0, char fill = ' ', 
+        std::ios::fmtflags flags = std::ios::fmtflags(0) );
+    /** Converts an int to a String. */
+    CM_EXPORT String toString(int val, unsigned short width = 0, 
+        char fill = ' ', 
+        std::ios::fmtflags flags = std::ios::fmtflags(0) );
+#if CM_ARCH_TYPE == CM_ARCHITECTURE_64 || CM_PLATFORM == CM_PLATFORM_APPLE
+    /** Converts an unsigned int to a String. */
+    CM_EXPORT String toString(unsigned int val, 
+        unsigned short width = 0, char fill = ' ', 
+        std::ios::fmtflags flags = std::ios::fmtflags(0) );
+    /** Converts a size_t to a String. */
+    CM_EXPORT String toString(size_t val, 
+        unsigned short width = 0, char fill = ' ', 
+        std::ios::fmtflags flags = std::ios::fmtflags(0) );
+    #if CM_COMPILER == CM_COMPILER_MSVC
+            /** Converts an unsigned long to a String. */
+            CM_EXPORT String toString(unsigned long val, 
+                unsigned short width = 0, char fill = ' ', 
+                std::ios::fmtflags flags = std::ios::fmtflags(0) );
+
+    #endif
+#else
+    /** Converts a size_t to a String. */
+    CM_EXPORT String toString(size_t val, 
+        unsigned short width = 0, char fill = ' ', 
+        std::ios::fmtflags flags = std::ios::fmtflags(0) );
+    /** Converts an unsigned long to a String. */
+    CM_EXPORT String toString(unsigned long val, 
+        unsigned short width = 0, char fill = ' ', 
+        std::ios::fmtflags flags = std::ios::fmtflags(0) );
+#endif
+    /** Converts a long to a String. */
+    CM_EXPORT String toString(long val, 
+        unsigned short width = 0, char fill = ' ', 
+        std::ios::fmtflags flags = std::ios::fmtflags(0) );
+
+	/** Global conversion methods **/
+
+    /** Converts a boolean to a String. 
+    @param yesNo If set to true, result is 'yes' or 'no' instead of 'true' or 'false'
+    */
+    CM_EXPORT String toString(bool val, bool yesNo = false);
+	/** Converts a Vector2 to a String. 
+    @remarks
+        Format is "x y" (i.e. 2x float values, space delimited)
+    */
+    CM_EXPORT String toString(const Vector2& val);
+    /** Converts a Vector3 to a String. 
+    @remarks
+        Format is "x y z" (i.e. 3x float values, space delimited)
+    */
+    CM_EXPORT String toString(const Vector3& val);
+	/** Converts a Vector4 to a String. 
+    @remarks
+        Format is "x y z w" (i.e. 4x float values, space delimited)
+    */
+    CM_EXPORT String toString(const Vector4& val);
+    /** Converts a Matrix3 to a String. 
+    @remarks
+        Format is "00 01 02 10 11 12 20 21 22" where '01' means row 0 column 1 etc.
+    */
+    CM_EXPORT String toString(const Matrix3& val);
+    /** Converts a Matrix4 to a String. 
+    @remarks
+        Format is "00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33" where 
+        '01' means row 0 column 1 etc.
+    */
+    CM_EXPORT String toString(const Matrix4& val);
+    /** Converts a Quaternion to a String. 
+    @remarks
+        Format is "w x y z" (i.e. 4x float values, space delimited)
+    */
+    CM_EXPORT String toString(const Quaternion& val);
+    /** Converts a ColourValue to a String. 
+    @remarks
+        Format is "r g b a" (i.e. 4x float values, space delimited). 
+    */
+    CM_EXPORT String toString(const ColourValue& val);
+    /** Converts a StringVector to a string.
+    @remarks
+        Strings must not contain spaces since space is used as a delimiter in
+        the output.
+    */
+    CM_EXPORT String toString(const std::vector<CamelotEngine::String>& val);
+
+    /** Converts a String to a float. 
+    @returns
+        0.0 if the value could not be parsed, otherwise the float version of the String.
+    */
+    CM_EXPORT float parseReal(const String& val, float defaultValue = 0);
+    /** Converts a String to a whole number. 
+    @returns
+        0.0 if the value could not be parsed, otherwise the numeric version of the String.
+    */
+    CM_EXPORT int parseInt(const String& val, int defaultValue = 0);
+    /** Converts a String to a whole number. 
+    @returns
+        0.0 if the value could not be parsed, otherwise the numeric version of the String.
+    */
+    CM_EXPORT unsigned int parseUnsignedInt(const String& val, unsigned int defaultValue = 0);
+    /** Converts a String to a whole number. 
+    @returns
+        0.0 if the value could not be parsed, otherwise the numeric version of the String.
+    */
+    CM_EXPORT long parseLong(const String& val, long defaultValue = 0);
+    /** Converts a String to a whole number. 
+    @returns
+        0.0 if the value could not be parsed, otherwise the numeric version of the String.
+    */
+    CM_EXPORT unsigned long parseUnsignedLong(const String& val, unsigned long defaultValue = 0);
+    /** Converts a String to a boolean. 
+    @remarks
+        Returns true if case-insensitive match of the start of the string
+		matches "true", "yes" or "1", false otherwise.
+    */
+    CM_EXPORT bool parseBool(const String& val, bool defaultValue = 0);
+
+    /** Pareses a StringVector from a string.
+    @remarks
+        Strings must not contain spaces since space is used as a delimiter in
+        the output.
+    */
+    CM_EXPORT std::vector<CamelotEngine::String> parseStringVector(const String& val);
+    /** Checks the String is a valid number value. */
+    CM_EXPORT bool isNumber(const String& val);
+	/** @} */
+
 } // namespace CamelotEngine
 } // namespace CamelotEngine
 
 
 #endif // _String_H__
 #endif // _String_H__

+ 0 - 270
CamelotUtility/Include/CmStringConverter.h

@@ -1,270 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-    (Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-
-#ifndef __StringConverter_H__
-#define __StringConverter_H__
-
-#include "CmPrerequisitesUtil.h"
-#include "CmString.h"
-#include "CmColourValue.h"
-#include "CmMath.h"
-#include "CmMatrix3.h"
-#include "CmMatrix4.h"
-#include "CmQuaternion.h"
-#include "CmVector2.h"
-#include "CmVector3.h"
-#include "CmVector4.h"
-
-namespace CamelotEngine {
-
-	/** \addtogroup Core
-	*  @{
-	*/
-	/** \addtogroup General
-	*  @{
-	*/
-	/** Class for converting the core Ogre data types to/from Strings.
-    @remarks
-        The code for converting values to and from strings is here as a separate
-        class to avoid coupling String to other datatypes (and vice-versa) which reduces
-        compilation dependency: important given how often the core types are used.
-    @par
-        This class is mainly used for parsing settings in text files. External applications
-        can also use it to interface with classes which use the StringInterface template
-        class.
-    @par
-        The String formats of each of the major types is listed with the methods. The basic types
-        like int and float just use the underlying C runtime library atof and atoi family methods,
-        however custom types like Vector3, ColourValue and Matrix4 are also supported by this class
-        using custom formats.
-    @author
-        Steve Streeting
-    */
-    class CM_EXPORT StringConverter
-    {
-    public:
-
-        /** Converts a float to a String. */
-        static String toString(float val, unsigned short precision = 6, 
-            unsigned short width = 0, char fill = ' ', 
-            std::ios::fmtflags flags = std::ios::fmtflags(0) );
-        /** Converts a Radian to a String. */
-        static String toString(Radian val, unsigned short precision = 6, 
-            unsigned short width = 0, char fill = ' ', 
-            std::ios::fmtflags flags = std::ios::fmtflags(0) )
-        {
-            return toString(val.valueAngleUnits(), precision, width, fill, flags);
-        }
-        /** Converts a Degree to a String. */
-        static String toString(Degree val, unsigned short precision = 6, 
-            unsigned short width = 0, char fill = ' ', 
-            std::ios::fmtflags flags = std::ios::fmtflags(0) )
-        {
-            return toString(val.valueAngleUnits(), precision, width, fill, flags);
-        }
-        /** Converts an int to a String. */
-        static String toString(int val, unsigned short width = 0, 
-            char fill = ' ', 
-            std::ios::fmtflags flags = std::ios::fmtflags(0) );
-#if CM_ARCH_TYPE == CM_ARCHITECTURE_64 || CM_PLATFORM == CM_PLATFORM_APPLE
-        /** Converts an unsigned int to a String. */
-        static String toString(unsigned int val, 
-            unsigned short width = 0, char fill = ' ', 
-            std::ios::fmtflags flags = std::ios::fmtflags(0) );
-        /** Converts a size_t to a String. */
-        static String toString(size_t val, 
-            unsigned short width = 0, char fill = ' ', 
-            std::ios::fmtflags flags = std::ios::fmtflags(0) );
-        #if CM_COMPILER == CM_COMPILER_MSVC
-                /** Converts an unsigned long to a String. */
-                static String toString(unsigned long val, 
-                    unsigned short width = 0, char fill = ' ', 
-                    std::ios::fmtflags flags = std::ios::fmtflags(0) );
-
-        #endif
-#else
-        /** Converts a size_t to a String. */
-        static String toString(size_t val, 
-            unsigned short width = 0, char fill = ' ', 
-            std::ios::fmtflags flags = std::ios::fmtflags(0) );
-        /** Converts an unsigned long to a String. */
-        static String toString(unsigned long val, 
-            unsigned short width = 0, char fill = ' ', 
-            std::ios::fmtflags flags = std::ios::fmtflags(0) );
-#endif
-        /** Converts a long to a String. */
-        static String toString(long val, 
-            unsigned short width = 0, char fill = ' ', 
-            std::ios::fmtflags flags = std::ios::fmtflags(0) );
-        /** Converts a boolean to a String. 
-        @param yesNo If set to true, result is 'yes' or 'no' instead of 'true' or 'false'
-        */
-        static String toString(bool val, bool yesNo = false);
-		/** Converts a Vector2 to a String. 
-        @remarks
-            Format is "x y" (i.e. 2x float values, space delimited)
-        */
-        static String toString(const Vector2& val);
-        /** Converts a Vector3 to a String. 
-        @remarks
-            Format is "x y z" (i.e. 3x float values, space delimited)
-        */
-        static String toString(const Vector3& val);
-		/** Converts a Vector4 to a String. 
-        @remarks
-            Format is "x y z w" (i.e. 4x float values, space delimited)
-        */
-        static String toString(const Vector4& val);
-        /** Converts a Matrix3 to a String. 
-        @remarks
-            Format is "00 01 02 10 11 12 20 21 22" where '01' means row 0 column 1 etc.
-        */
-        static String toString(const Matrix3& val);
-        /** Converts a Matrix4 to a String. 
-        @remarks
-            Format is "00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33" where 
-            '01' means row 0 column 1 etc.
-        */
-        static String toString(const Matrix4& val);
-        /** Converts a Quaternion to a String. 
-        @remarks
-            Format is "w x y z" (i.e. 4x float values, space delimited)
-        */
-        static String toString(const Quaternion& val);
-        /** Converts a ColourValue to a String. 
-        @remarks
-            Format is "r g b a" (i.e. 4x float values, space delimited). 
-        */
-        static String toString(const ColourValue& val);
-        /** Converts a StringVector to a string.
-        @remarks
-            Strings must not contain spaces since space is used as a delimiter in
-            the output.
-        */
-        static String toString(const std::vector<CamelotEngine::String>& val);
-
-        /** Converts a String to a float. 
-        @returns
-            0.0 if the value could not be parsed, otherwise the float version of the String.
-        */
-        static float parseReal(const String& val, float defaultValue = 0);
-        /** Converts a String to a Angle. 
-        @returns
-            0.0 if the value could not be parsed, otherwise the Angle version of the String.
-        */
-        static inline Radian parseAngle(const String& val, Radian defaultValue = Radian(0)) {
-			return Angle(parseReal(val, defaultValue.valueRadians()));
-		}
-        /** Converts a String to a whole number. 
-        @returns
-            0.0 if the value could not be parsed, otherwise the numeric version of the String.
-        */
-        static int parseInt(const String& val, int defaultValue = 0);
-        /** Converts a String to a whole number. 
-        @returns
-            0.0 if the value could not be parsed, otherwise the numeric version of the String.
-        */
-        static unsigned int parseUnsignedInt(const String& val, unsigned int defaultValue = 0);
-        /** Converts a String to a whole number. 
-        @returns
-            0.0 if the value could not be parsed, otherwise the numeric version of the String.
-        */
-        static long parseLong(const String& val, long defaultValue = 0);
-        /** Converts a String to a whole number. 
-        @returns
-            0.0 if the value could not be parsed, otherwise the numeric version of the String.
-        */
-        static unsigned long parseUnsignedLong(const String& val, unsigned long defaultValue = 0);
-        /** Converts a String to a boolean. 
-        @remarks
-            Returns true if case-insensitive match of the start of the string
-			matches "true", "yes" or "1", false otherwise.
-        */
-        static bool parseBool(const String& val, bool defaultValue = 0);
-		/** Parses a Vector2 out of a String.
-        @remarks
-            Format is "x y" ie. 2 float components, space delimited. Failure to parse returns
-            Vector2::ZERO.
-        */
-		static Vector2 parseVector2(const String& val, const Vector2& defaultValue = Vector2::ZERO);
-		/** Parses a Vector3 out of a String.
-        @remarks
-            Format is "x y z" ie. 3 float components, space delimited. Failure to parse returns
-            Vector3::ZERO.
-        */
-        static Vector3 parseVector3(const String& val, const Vector3& defaultValue = Vector3::ZERO);
-        /** Parses a Vector4 out of a String.
-        @remarks
-            Format is "x y z w" ie. 4 float components, space delimited. Failure to parse returns
-            Vector4::ZERO.
-        */
-        static Vector4 parseVector4(const String& val, const Vector4& defaultValue = Vector4::ZERO);
-        /** Parses a Matrix3 out of a String.
-        @remarks
-            Format is "00 01 02 10 11 12 20 21 22" where '01' means row 0 column 1 etc.
-            Failure to parse returns Matrix3::IDENTITY.
-        */
-        static Matrix3 parseMatrix3(const String& val, const Matrix3& defaultValue = Matrix3::IDENTITY);
-        /** Parses a Matrix4 out of a String.
-        @remarks
-            Format is "00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33" where 
-            '01' means row 0 column 1 etc. Failure to parse returns Matrix4::IDENTITY.
-        */
-        static Matrix4 parseMatrix4(const String& val, const Matrix4& defaultValue = Matrix4::IDENTITY);
-        /** Parses a Quaternion out of a String. 
-        @remarks
-            Format is "w x y z" (i.e. 4x float values, space delimited). 
-            Failure to parse returns Quaternion::IDENTITY.
-        */
-        static Quaternion parseQuaternion(const String& val, const Quaternion& defaultValue = Quaternion::IDENTITY);
-        /** Parses a ColourValue out of a String. 
-        @remarks
-            Format is "r g b a" (i.e. 4x float values, space delimited), or "r g b" which implies
-            an alpha value of 1.0 (opaque). Failure to parse returns ColourValue::Black.
-        */
-        static ColourValue parseColourValue(const String& val, const ColourValue& defaultValue = ColourValue::Black);
-
-        /** Pareses a StringVector from a string.
-        @remarks
-            Strings must not contain spaces since space is used as a delimiter in
-            the output.
-        */
-        static std::vector<CamelotEngine::String> parseStringVector(const String& val);
-        /** Checks the String is a valid number value. */
-        static bool isNumber(const String& val);
-    };
-
-	/** @} */
-	/** @} */
-
-}
-
-
-
-#endif
-

+ 309 - 0
CamelotUtility/Source/CmString.cpp

@@ -27,6 +27,14 @@ THE SOFTWARE.
 */
 */
 
 
 #include "CmString.h"
 #include "CmString.h"
+#include "CmColourValue.h"
+#include "CmMath.h"
+#include "CmMatrix3.h"
+#include "CmMatrix4.h"
+#include "CmQuaternion.h"
+#include "CmVector2.h"
+#include "CmVector3.h"
+#include "CmVector4.h"
 
 
 namespace CamelotEngine {
 namespace CamelotEngine {
 
 
@@ -362,5 +370,306 @@ namespace CamelotEngine {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
+	//-----------------------------------------------------------------------
+	String toString(float val, unsigned short precision, 
+		unsigned short width, char fill, std::ios::fmtflags flags)
+	{
+		stringstream stream;
+		stream.precision(precision);
+		stream.width(width);
+		stream.fill(fill);
+		if (flags)
+			stream.setf(flags);
+		stream << val;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(Radian val, unsigned short precision, 
+		unsigned short width, char fill, std::ios::fmtflags flags)
+	{
+		return toString(val.valueAngleUnits(), precision, width, fill, flags);
+	}
+	//-----------------------------------------------------------------------
+	String toString(Degree val, unsigned short precision, 
+		unsigned short width, char fill, std::ios::fmtflags flags)
+	{
+		return toString(val.valueAngleUnits(), precision, width, fill, flags);
+	}
+	//-----------------------------------------------------------------------
+	String toString(int val, 
+		unsigned short width, char fill, std::ios::fmtflags flags)
+	{
+		stringstream stream;
+		stream.width(width);
+		stream.fill(fill);
+		if (flags)
+			stream.setf(flags);
+		stream << val;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+#if CM_ARCH_TYPE == CM_ARCHITECTURE_64 || CM_PLATFORM == CM_PLATFORM_APPLE
+	String toString(unsigned int val, 
+		unsigned short width, char fill, std::ios::fmtflags flags)
+	{
+		stringstream stream;
+		stream.width(width);
+		stream.fill(fill);
+		if (flags)
+			stream.setf(flags);
+		stream << val;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(size_t val, 
+		unsigned short width, char fill, std::ios::fmtflags flags)
+	{
+		stringstream stream;
+		stream.width(width);
+		stream.fill(fill);
+		if (flags)
+			stream.setf(flags);
+		stream << val;
+		return stream.str();
+	}
+#if CM_COMPILER == CM_COMPILER_MSVC
+	//-----------------------------------------------------------------------
+	String toString(unsigned long val, 
+		unsigned short width, char fill, std::ios::fmtflags flags)
+	{
+		stringstream stream;
+		stream.width(width);
+		stream.fill(fill);
+		if (flags)
+			stream.setf(flags);
+		stream << val;
+		return stream.str();
+	}
+
+#endif
+	//-----------------------------------------------------------------------
+#else
+	String toString(size_t val, 
+		unsigned short width, char fill, std::ios::fmtflags flags)
+	{
+		stringstream stream;
+		stream.width(width);
+		stream.fill(fill);
+		if (flags)
+			stream.setf(flags);
+		stream << val;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(unsigned long val, 
+		unsigned short width, char fill, std::ios::fmtflags flags)
+	{
+		stringstream stream;
+		stream.width(width);
+		stream.fill(fill);
+		if (flags)
+			stream.setf(flags);
+		stream << val;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+#endif
+	String toString(long val, 
+		unsigned short width, char fill, std::ios::fmtflags flags)
+	{
+		stringstream stream;
+		stream.width(width);
+		stream.fill(fill);
+		if (flags)
+			stream.setf(flags);
+		stream << val;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(const Vector2& val)
+	{
+		stringstream stream;
+		stream << val.x << " " << val.y;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(const Vector3& val)
+	{
+		stringstream stream;
+		stream << val.x << " " << val.y << " " << val.z;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(const Vector4& val)
+	{
+		stringstream stream;
+		stream << val.x << " " << val.y << " " << val.z << " " << val.w;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(const Matrix3& val)
+	{
+		stringstream stream;
+		stream << val[0][0] << " " 
+			<< val[0][1] << " "             
+			<< val[0][2] << " "             
+			<< val[1][0] << " "             
+			<< val[1][1] << " "             
+			<< val[1][2] << " "             
+			<< val[2][0] << " "             
+			<< val[2][1] << " "             
+			<< val[2][2];
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(bool val, bool yesNo)
+	{
+		if (val)
+		{
+			if (yesNo)
+			{
+				return "yes";
+			}
+			else
+			{
+				return "true";
+			}
+		}
+		else
+			if (yesNo)
+			{
+				return "no";
+			}
+			else
+			{
+				return "false";
+			}
+	}
+	//-----------------------------------------------------------------------
+	String toString(const Matrix4& val)
+	{
+		stringstream stream;
+		stream << val[0][0] << " " 
+			<< val[0][1] << " "             
+			<< val[0][2] << " "             
+			<< val[0][3] << " "             
+			<< val[1][0] << " "             
+			<< val[1][1] << " "             
+			<< val[1][2] << " "             
+			<< val[1][3] << " "             
+			<< val[2][0] << " "             
+			<< val[2][1] << " "             
+			<< val[2][2] << " "             
+			<< val[2][3] << " "             
+			<< val[3][0] << " "             
+			<< val[3][1] << " "             
+			<< val[3][2] << " "             
+			<< val[3][3];
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(const Quaternion& val)
+	{
+		stringstream stream;
+		stream  << val.w << " " << val.x << " " << val.y << " " << val.z;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(const ColourValue& val)
+	{
+		stringstream stream;
+		stream << val.r << " " << val.g << " " << val.b << " " << val.a;
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	String toString(const std::vector<CamelotEngine::String>& val)
+	{
+		stringstream stream;
+		std::vector<CamelotEngine::String>::const_iterator i, iend, ibegin;
+		ibegin = val.begin();
+		iend = val.end();
+		for (i = ibegin; i != iend; ++i)
+		{
+			if (i != ibegin)
+				stream << " ";
+
+			stream << *i; 
+		}
+		return stream.str();
+	}
+	//-----------------------------------------------------------------------
+	float parseReal(const String& val, float defaultValue)
+	{
+		// Use istringstream for direct correspondence with toString
+		StringStream str(val);
+		float ret = defaultValue;
+		str >> ret;
+
+		return ret;
+	}
+	//-----------------------------------------------------------------------
+	int parseInt(const String& val, int defaultValue)
+	{
+		// Use istringstream for direct correspondence with toString
+		StringStream str(val);
+		int ret = defaultValue;
+		str >> ret;
+
+		return ret;
+	}
+	//-----------------------------------------------------------------------
+	unsigned int parseUnsignedInt(const String& val, unsigned int defaultValue)
+	{
+		// Use istringstream for direct correspondence with toString
+		StringStream str(val);
+		unsigned int ret = defaultValue;
+		str >> ret;
+
+		return ret;
+	}
+	//-----------------------------------------------------------------------
+	long parseLong(const String& val, long defaultValue)
+	{
+		// Use istringstream for direct correspondence with toString
+		StringStream str(val);
+		long ret = defaultValue;
+		str >> ret;
+
+		return ret;
+	}
+	//-----------------------------------------------------------------------
+	unsigned long parseUnsignedLong(const String& val, unsigned long defaultValue)
+	{
+		// Use istringstream for direct correspondence with toString
+		StringStream str(val);
+		unsigned long ret = defaultValue;
+		str >> ret;
 
 
+		return ret;
+	}
+	//-----------------------------------------------------------------------
+	bool parseBool(const String& val, bool defaultValue)
+	{
+		if ((StringUtil::startsWith(val, "true") || StringUtil::startsWith(val, "yes")
+			|| StringUtil::startsWith(val, "1")))
+			return true;
+		else if ((StringUtil::startsWith(val, "false") || StringUtil::startsWith(val, "no")
+			|| StringUtil::startsWith(val, "0")))
+			return false;
+		else
+			return defaultValue;
+	}
+	//-----------------------------------------------------------------------
+	std::vector<CamelotEngine::String> parseStringVector(const String& val)
+	{
+		return StringUtil::split(val);
+	}
+	//-----------------------------------------------------------------------
+	bool isNumber(const String& val)
+	{
+		StringStream str(val);
+		float tst;
+		str >> tst;
+		return !str.fail() && str.eof();
+	}
 }
 }

+ 0 - 438
CamelotUtility/Source/CmStringConverter.cpp

@@ -1,438 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-    (Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include "CmStringConverter.h"
-
-namespace CamelotEngine {
-
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(float val, unsigned short precision, 
-        unsigned short width, char fill, std::ios::fmtflags flags)
-    {
-        stringstream stream;
-        stream.precision(precision);
-        stream.width(width);
-        stream.fill(fill);
-        if (flags)
-            stream.setf(flags);
-        stream << val;
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(int val, 
-        unsigned short width, char fill, std::ios::fmtflags flags)
-    {
-        stringstream stream;
-		stream.width(width);
-        stream.fill(fill);
-        if (flags)
-            stream.setf(flags);
-        stream << val;
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-#if CM_ARCH_TYPE == CM_ARCHITECTURE_64 || CM_PLATFORM == CM_PLATFORM_APPLE || CM_PLATFORM == OGRE_PLATFORM_IPHONE
-    String StringConverter::toString(unsigned int val, 
-        unsigned short width, char fill, std::ios::fmtflags flags)
-    {
-        stringstream stream;
-        stream.width(width);
-        stream.fill(fill);
-        if (flags)
-            stream.setf(flags);
-        stream << val;
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(size_t val, 
-        unsigned short width, char fill, std::ios::fmtflags flags)
-    {
-        stringstream stream;
-        stream.width(width);
-        stream.fill(fill);
-        if (flags)
-            stream.setf(flags);
-        stream << val;
-        return stream.str();
-    }
-#if CM_COMPILER == CM_COMPILER_MSVC
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(unsigned long val, 
-        unsigned short width, char fill, std::ios::fmtflags flags)
-    {
-        stringstream stream;
-        stream.width(width);
-        stream.fill(fill);
-        if (flags)
-            stream.setf(flags);
-        stream << val;
-        return stream.str();
-    }
-
-#endif
-    //-----------------------------------------------------------------------
-#else
-    String StringConverter::toString(size_t val, 
-        unsigned short width, char fill, std::ios::fmtflags flags)
-    {
-        stringstream stream;
-		stream.width(width);
-        stream.fill(fill);
-        if (flags)
-            stream.setf(flags);
-        stream << val;
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(unsigned long val, 
-        unsigned short width, char fill, std::ios::fmtflags flags)
-    {
-        stringstream stream;
-		stream.width(width);
-        stream.fill(fill);
-        if (flags)
-            stream.setf(flags);
-        stream << val;
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-#endif
-    String StringConverter::toString(long val, 
-        unsigned short width, char fill, std::ios::fmtflags flags)
-    {
-        stringstream stream;
-		stream.width(width);
-        stream.fill(fill);
-        if (flags)
-            stream.setf(flags);
-        stream << val;
-        return stream.str();
-    }
-	//-----------------------------------------------------------------------
-    String StringConverter::toString(const Vector2& val)
-    {
-        stringstream stream;
-		stream << val.x << " " << val.y;
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(const Vector3& val)
-    {
-        stringstream stream;
-		stream << val.x << " " << val.y << " " << val.z;
-        return stream.str();
-    }
-	//-----------------------------------------------------------------------
-    String StringConverter::toString(const Vector4& val)
-    {
-        stringstream stream;
-		stream << val.x << " " << val.y << " " << val.z << " " << val.w;
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(const Matrix3& val)
-    {
-		stringstream stream;
-        stream << val[0][0] << " " 
-            << val[0][1] << " "             
-            << val[0][2] << " "             
-            << val[1][0] << " "             
-            << val[1][1] << " "             
-            << val[1][2] << " "             
-            << val[2][0] << " "             
-            << val[2][1] << " "             
-            << val[2][2];
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(bool val, bool yesNo)
-    {
-        if (val)
-        {
-            if (yesNo)
-            {
-                return "yes";
-            }
-            else
-            {
-                return "true";
-            }
-        }
-        else
-            if (yesNo)
-            {
-                return "no";
-            }
-            else
-            {
-                return "false";
-            }
-    }
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(const Matrix4& val)
-    {
-		stringstream stream;
-        stream << val[0][0] << " " 
-            << val[0][1] << " "             
-            << val[0][2] << " "             
-            << val[0][3] << " "             
-            << val[1][0] << " "             
-            << val[1][1] << " "             
-            << val[1][2] << " "             
-            << val[1][3] << " "             
-            << val[2][0] << " "             
-            << val[2][1] << " "             
-            << val[2][2] << " "             
-            << val[2][3] << " "             
-            << val[3][0] << " "             
-            << val[3][1] << " "             
-            << val[3][2] << " "             
-            << val[3][3];
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(const Quaternion& val)
-    {
-		stringstream stream;
-        stream  << val.w << " " << val.x << " " << val.y << " " << val.z;
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(const ColourValue& val)
-    {
-		stringstream stream;
-        stream << val.r << " " << val.g << " " << val.b << " " << val.a;
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-    String StringConverter::toString(const std::vector<CamelotEngine::String>& val)
-    {
-		stringstream stream;
-        std::vector<CamelotEngine::String>::const_iterator i, iend, ibegin;
-        ibegin = val.begin();
-        iend = val.end();
-        for (i = ibegin; i != iend; ++i)
-        {
-            if (i != ibegin)
-                stream << " ";
-
-            stream << *i; 
-        }
-        return stream.str();
-    }
-    //-----------------------------------------------------------------------
-    float StringConverter::parseReal(const String& val, float defaultValue)
-    {
-		// Use istringstream for direct correspondence with toString
-		StringStream str(val);
-		float ret = defaultValue;
-		str >> ret;
-
-        return ret;
-    }
-    //-----------------------------------------------------------------------
-    int StringConverter::parseInt(const String& val, int defaultValue)
-    {
-		// Use istringstream for direct correspondence with toString
-		StringStream str(val);
-		int ret = defaultValue;
-		str >> ret;
-
-        return ret;
-    }
-    //-----------------------------------------------------------------------
-    unsigned int StringConverter::parseUnsignedInt(const String& val, unsigned int defaultValue)
-    {
-		// Use istringstream for direct correspondence with toString
-		StringStream str(val);
-		unsigned int ret = defaultValue;
-		str >> ret;
-
-		return ret;
-    }
-    //-----------------------------------------------------------------------
-    long StringConverter::parseLong(const String& val, long defaultValue)
-    {
-		// Use istringstream for direct correspondence with toString
-		StringStream str(val);
-		long ret = defaultValue;
-		str >> ret;
-
-		return ret;
-    }
-    //-----------------------------------------------------------------------
-    unsigned long StringConverter::parseUnsignedLong(const String& val, unsigned long defaultValue)
-    {
-		// Use istringstream for direct correspondence with toString
-		StringStream str(val);
-		unsigned long ret = defaultValue;
-		str >> ret;
-
-		return ret;
-    }
-    //-----------------------------------------------------------------------
-    bool StringConverter::parseBool(const String& val, bool defaultValue)
-    {
-		if ((StringUtil::startsWith(val, "true") || StringUtil::startsWith(val, "yes")
-			|| StringUtil::startsWith(val, "1")))
-			return true;
-		else if ((StringUtil::startsWith(val, "false") || StringUtil::startsWith(val, "no")
-			|| StringUtil::startsWith(val, "0")))
-			return false;
-		else
-			return defaultValue;
-    }
-    //-----------------------------------------------------------------------
-    Vector2 StringConverter::parseVector2(const String& val, const Vector2& defaultValue)
-    {
-        // Split on space
-        vector<String>::type vec = StringUtil::split(val);
-
-        if (vec.size() != 2)
-        {
-            return defaultValue;
-        }
-        else
-        {
-            return Vector2(parseReal(vec[0]),parseReal(vec[1]));
-        }
-    }
-	//-----------------------------------------------------------------------
-    Vector3 StringConverter::parseVector3(const String& val, const Vector3& defaultValue)
-    {
-        // Split on space
-        vector<String>::type vec = StringUtil::split(val);
-
-        if (vec.size() != 3)
-        {
-            return defaultValue;
-        }
-        else
-        {
-            return Vector3(parseReal(vec[0]),parseReal(vec[1]),parseReal(vec[2]));
-        }
-    }
-	//-----------------------------------------------------------------------
-    Vector4 StringConverter::parseVector4(const String& val, const Vector4& defaultValue)
-    {
-        // Split on space
-        vector<String>::type vec = StringUtil::split(val);
-
-        if (vec.size() != 4)
-        {
-            return defaultValue;
-        }
-        else
-        {
-            return Vector4(parseReal(vec[0]),parseReal(vec[1]),parseReal(vec[2]),parseReal(vec[3]));
-        }
-    }
-    //-----------------------------------------------------------------------
-    Matrix3 StringConverter::parseMatrix3(const String& val, const Matrix3& defaultValue)
-    {
-        // Split on space
-        vector<String>::type vec = StringUtil::split(val);
-
-        if (vec.size() != 9)
-        {
-            return defaultValue;
-        }
-        else
-        {
-            return Matrix3(parseReal(vec[0]),parseReal(vec[1]),parseReal(vec[2]),
-                parseReal(vec[3]),parseReal(vec[4]),parseReal(vec[5]),
-                parseReal(vec[6]),parseReal(vec[7]),parseReal(vec[8]));
-        }
-    }
-    //-----------------------------------------------------------------------
-    Matrix4 StringConverter::parseMatrix4(const String& val, const Matrix4& defaultValue)
-    {
-        // Split on space
-        vector<String>::type vec = StringUtil::split(val);
-
-        if (vec.size() != 16)
-        {
-            return defaultValue;
-        }
-        else
-        {
-            return Matrix4(parseReal(vec[0]),parseReal(vec[1]),parseReal(vec[2]), parseReal(vec[3]),
-                parseReal(vec[4]),parseReal(vec[5]), parseReal(vec[6]), parseReal(vec[7]),
-                parseReal(vec[8]),parseReal(vec[9]), parseReal(vec[10]), parseReal(vec[11]),
-                parseReal(vec[12]),parseReal(vec[13]), parseReal(vec[14]), parseReal(vec[15]));
-        }
-    }
-    //-----------------------------------------------------------------------
-    Quaternion StringConverter::parseQuaternion(const String& val, const Quaternion& defaultValue)
-    {
-        // Split on space
-        vector<String>::type vec = StringUtil::split(val);
-
-        if (vec.size() != 4)
-        {
-            return defaultValue;
-        }
-        else
-        {
-            return Quaternion(parseReal(vec[0]),parseReal(vec[1]),parseReal(vec[2]), parseReal(vec[3]));
-        }
-    }
-    //-----------------------------------------------------------------------
-    ColourValue StringConverter::parseColourValue(const String& val, const ColourValue& defaultValue)
-    {
-        // Split on space
-        vector<String>::type vec = StringUtil::split(val);
-
-        if (vec.size() == 4)
-        {
-            return ColourValue(parseReal(vec[0]),parseReal(vec[1]),parseReal(vec[2]), parseReal(vec[3]));
-        }
-        else if (vec.size() == 3)
-        {
-            return ColourValue(parseReal(vec[0]),parseReal(vec[1]),parseReal(vec[2]), 1.0f);
-        }
-        else
-        {
-            return defaultValue;
-        }
-    }
-    //-----------------------------------------------------------------------
-    std::vector<CamelotEngine::String> StringConverter::parseStringVector(const String& val)
-    {
-        return StringUtil::split(val);
-    }
-	//-----------------------------------------------------------------------
-	bool StringConverter::isNumber(const String& val)
-	{
-		StringStream str(val);
-		float tst;
-		str >> tst;
-		return !str.fail() && str.eof();
-	}
-}
-
-