Go to the documentation of this file.
29 #ifndef __StringConverter_H__
30 #define __StringConverter_H__
74 unsigned short width = 0,
char fill =
' ',
75 std::ios::fmtflags flags = std::ios::fmtflags(0));
76 #if OGRE_DOUBLE_PRECISION == 1
78 static String toString(
float val,
unsigned short precision = 6,
79 unsigned short width = 0,
char fill =
' ',
80 std::ios::fmtflags flags = std::ios::fmtflags(0));
84 unsigned short width = 0,
char fill =
' ',
85 std::ios::fmtflags flags = std::ios::fmtflags(0));
89 unsigned short width = 0,
char fill =
' ',
90 std::ios::fmtflags flags = std::ios::fmtflags(0))
96 unsigned short width = 0,
char fill =
' ',
97 std::ios::fmtflags flags = std::ios::fmtflags(0))
104 std::ios::fmtflags flags = std::ios::fmtflags(0));
105 #if OGRE_PLATFORM != OGRE_PLATFORM_NACL && ( OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64 || OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS )
107 static String toString(
unsigned int val,
108 unsigned short width = 0,
char fill =
' ',
109 std::ios::fmtflags flags = std::ios::fmtflags(0));
111 static String toString(
size_t val,
112 unsigned short width = 0,
char fill =
' ',
113 std::ios::fmtflags flags = std::ios::fmtflags(0));
114 #if OGRE_COMPILER == OGRE_COMPILER_MSVC
116 static String toString(
unsigned long val,
117 unsigned short width = 0,
char fill =
' ',
118 std::ios::fmtflags flags = std::ios::fmtflags(0));
123 unsigned short width = 0,
char fill =
' ',
124 std::ios::fmtflags flags = std::ios::fmtflags(0));
127 unsigned short width = 0,
char fill =
' ',
128 std::ios::fmtflags flags = std::ios::fmtflags(0));
132 unsigned short width = 0,
char fill =
' ',
133 std::ios::fmtflags flags = std::ios::fmtflags(0));
191 return Angle(parseReal(val, defaultValue.valueRadians()));
279 msDefaultStringLocale = loc;
280 msLocale = std::locale(msDefaultStringLocale.c_str());
static Quaternion parseQuaternion(const String &val, const Quaternion &defaultValue=Quaternion::IDENTITY)
Parses a Quaternion out of a String.
static const Vector4 ZERO
static const Vector3 ZERO
Real valueAngleUnits() const
static String toString(double val, unsigned short precision=6, unsigned short width=0, char fill=' ', std::ios::fmtflags flags=std::ios::fmtflags(0))
Converts a double to a String.
vector< String >::type StringVector
static String toString(const Quaternion &val)
Converts a Quaternion to a String.
static String getDefaultStringLocale(void)
A 3x3 matrix which can represent rotations around axes.
static void setDefaultStringLocale(String loc)
static String toString(size_t val, unsigned short width=0, char fill=' ', std::ios::fmtflags flags=std::ios::fmtflags(0))
Converts a size_t to a String.
static Vector4 parseVector4(const String &val, const Vector4 &defaultValue=Vector4::ZERO)
Parses a Vector4 out of a String.
static bool parseBool(const String &val, bool defaultValue=0)
Converts a String to a boolean.
static String toString(Real val, unsigned short precision=6, unsigned short width=0, char fill=' ', std::ios::fmtflags flags=std::ios::fmtflags(0))
Converts a Real to a String.
static String toString(const Vector4 &val)
Converts a Vector4 to a String.
static std::locale msLocale
static void setUseLocale(bool useLocale)
Wrapper class which indicates a given angle value is in Degrees.
static String toString(const Vector3 &val)
Converts a Vector3 to a String.
Implementation of a Quaternion, i.e.
static unsigned long parseUnsignedLong(const String &val, unsigned long defaultValue=0)
Converts a String to a whole number.
Wrapper class which identifies a value as the currently default angle type, as defined by Math::setAn...
Class encapsulating a standard 4x4 homogeneous matrix.
static const Vector2 ZERO
static String msDefaultStringLocale
static String toString(const ColourValue &val)
Converts a ColourValue to a String.
static int parseInt(const String &val, int defaultValue=0)
Converts a String to a whole number.
static String toString(Radian 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(int val, unsigned short width=0, char fill=' ', std::ios::fmtflags flags=std::ios::fmtflags(0))
Converts an int to a String.
static const Matrix4 IDENTITY
Wrapper class which indicates a given angle value is in Radians.
static String toString(const Vector2 &val)
Converts a Vector2 to a String.
static bool isNumber(const String &val)
Checks the String is a valid number value.
static long parseLong(const String &val, long defaultValue=0)
Converts a String to a whole number.
static Matrix4 parseMatrix4(const String &val, const Matrix4 &defaultValue=Matrix4::IDENTITY)
Parses a Matrix4 out of a String.
static Radian parseAngle(const String &val, Radian defaultValue=Radian(0))
Converts a String to a Angle.
static ColourValue parseColourValue(const String &val, const ColourValue &defaultValue=ColourValue::Black)
Parses a ColourValue out of a String.
static const Matrix3 IDENTITY
static StringVector parseStringVector(const String &val)
Parses a StringVector from a string.
static String toString(const Matrix4 &val)
Converts a Matrix4 to a String.
Class for converting the core Ogre data types to/from Strings.
static String toString(unsigned long val, unsigned short width=0, char fill=' ', std::ios::fmtflags flags=std::ios::fmtflags(0))
Converts an unsigned long to a String.
Class representing colour.
4-dimensional homogeneous vector.
static bool isUseLocale()
static Matrix3 parseMatrix3(const String &val, const Matrix3 &defaultValue=Matrix3::IDENTITY)
Parses a Matrix3 out of a String.
Standard 2-dimensional vector.
static String toString(long val, unsigned short width=0, char fill=' ', std::ios::fmtflags flags=std::ios::fmtflags(0))
Converts a long 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))
Converts a Degree to a String.
static const ColourValue Black
static Real parseReal(const String &val, Real defaultValue=0)
Converts a String to a Real.
static const Quaternion IDENTITY
static String toString(bool val, bool yesNo=false)
Converts a boolean to a String.
float Real
Software floating point type.
Real valueAngleUnits() const
static Vector3 parseVector3(const String &val, const Vector3 &defaultValue=Vector3::ZERO)
Parses a Vector3 out of a String.
static Vector2 parseVector2(const String &val, const Vector2 &defaultValue=Vector2::ZERO)
Parses a Vector2 out of a String.
static String toString(const Matrix3 &val)
Converts a Matrix3 to a String.
Standard 3-dimensional vector.
static String toString(const StringVector &val)
Converts a StringVector to a string.
static size_t parseSizeT(const String &val, size_t defaultValue=0)
Converts a String to size_t.
static unsigned int parseUnsignedInt(const String &val, unsigned int defaultValue=0)
Converts a String to a whole number.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.