Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::StringStream Class Reference

Core class that represents a stream of strings. More...

Public Member Functions

 StringStream (String str)
 Constructs a StringStream object with a string. More...
 
 StringStream (const StringStream &)=default
 
 StringStream (StringStream &&) noexcept=default
 
void Clear ()
 Resets the state of the stream, erasing every contained text.
 
std::size_t GetBufferSize () const
 Get the current buffer size. More...
 
String ToString () const
 Gives a string representation. More...
 
StringStreamoperator= (const StringStream &)=default
 
StringStreamoperator= (StringStream &&) noexcept=default
 
StringStreamoperator<< (bool boolean)
 Adds the representation of the boolean. More...
 
StringStreamoperator<< (short number)
 Adds the representation of the short. More...
 
StringStreamoperator<< (unsigned short number)
 Adds the representation of the unsigned short. More...
 
StringStreamoperator<< (int number)
 Adds the representation of the int. More...
 
StringStreamoperator<< (unsigned int number)
 Adds the representation of the unsigned int. More...
 
StringStreamoperator<< (long number)
 Adds the representation of the long. More...
 
StringStreamoperator<< (unsigned long number)
 Adds the representation of the unsigned long. More...
 
StringStreamoperator<< (long long number)
 Adds the representation of the long long. More...
 
StringStreamoperator<< (unsigned long long number)
 Adds the representation of the unsigned long long. More...
 
StringStreamoperator<< (float number)
 Adds the representation of the float. More...
 
StringStreamoperator<< (double number)
 Adds the representation of the double. More...
 
StringStreamoperator<< (long double number)
 Adds the representation of the long double. More...
 
StringStreamoperator<< (char character)
 Adds the representation of the char. More...
 
StringStreamoperator<< (unsigned char character)
 Adds the representation of the unsigned char. More...
 
StringStreamoperator<< (const char *string)
 Adds the representation of the const char*. More...
 
StringStreamoperator<< (const std::string &string)
 Adds the representation of the std::string. More...
 
StringStreamoperator<< (const String &string)
 Adds the representation of the Nz::String. More...
 
StringStreamoperator<< (const void *ptr)
 Adds the representation of the pointer. More...
 
 operator String () const
 Converts this to Nz::String. More...
 

Detailed Description

Core class that represents a stream of strings.

Constructor & Destructor Documentation

◆ StringStream()

Nz::StringStream::StringStream ( String  str)

Constructs a StringStream object with a string.

Parameters
strFirst value of the stream

Member Function Documentation

◆ GetBufferSize()

std::size_t Nz::StringStream::GetBufferSize ( ) const

Get the current buffer size.

Returns
The internal accumulation buffer size, this is equivalent to the size of the final string

◆ operator String()

Nz::StringStream::operator String ( ) const

Converts this to Nz::String.

Returns
The string representation of the stream

◆ operator<<() [1/18]

StringStream & Nz::StringStream::operator<< ( bool  boolean)

Adds the representation of the boolean.

Returns
A reference to this
Parameters
booleanBoolean value

◆ operator<<() [2/18]

StringStream & Nz::StringStream::operator<< ( short  number)

Adds the representation of the short.

Returns
A reference to this
Parameters
numberShort value

◆ operator<<() [3/18]

StringStream & Nz::StringStream::operator<< ( unsigned short  number)

Adds the representation of the unsigned short.

Returns
A reference to this
Parameters
numberShort value

◆ operator<<() [4/18]

StringStream & Nz::StringStream::operator<< ( int  number)

Adds the representation of the int.

Returns
A reference to this
Parameters
numberInt value

◆ operator<<() [5/18]

StringStream & Nz::StringStream::operator<< ( unsigned int  number)

Adds the representation of the unsigned int.

Returns
A reference to this
Parameters
numberInt value

◆ operator<<() [6/18]

StringStream & Nz::StringStream::operator<< ( long  number)

Adds the representation of the long.

Returns
A reference to this
Parameters
numberLong value

◆ operator<<() [7/18]

StringStream & Nz::StringStream::operator<< ( unsigned long  number)

Adds the representation of the unsigned long.

Returns
A reference to this
Parameters
numberLong value

◆ operator<<() [8/18]

StringStream & Nz::StringStream::operator<< ( long long  number)

Adds the representation of the long long.

Returns
A reference to this
Parameters
numberLong long value

◆ operator<<() [9/18]

StringStream & Nz::StringStream::operator<< ( unsigned long long  number)

Adds the representation of the unsigned long long.

Returns
A reference to this
Parameters
numberLong long value

◆ operator<<() [10/18]

StringStream & Nz::StringStream::operator<< ( float  number)

Adds the representation of the float.

Returns
A reference to this
Parameters
numberFloat value

◆ operator<<() [11/18]

StringStream & Nz::StringStream::operator<< ( double  number)

Adds the representation of the double.

Returns
A reference to this
Parameters
numberDouble value

◆ operator<<() [12/18]

StringStream & Nz::StringStream::operator<< ( long double  number)

Adds the representation of the long double.

Returns
A reference to this
Parameters
numberLong double value

◆ operator<<() [13/18]

StringStream & Nz::StringStream::operator<< ( char  character)

Adds the representation of the char.

Returns
A reference to this
Parameters
characterChar value

◆ operator<<() [14/18]

StringStream & Nz::StringStream::operator<< ( unsigned char  character)

Adds the representation of the unsigned char.

Returns
A reference to this
Parameters
characterChar value

◆ operator<<() [15/18]

StringStream & Nz::StringStream::operator<< ( const char *  string)

Adds the representation of the const char*.

Returns
A reference to this
Parameters
stringString value

◆ operator<<() [16/18]

StringStream & Nz::StringStream::operator<< ( const std::string &  string)

Adds the representation of the std::string.

Returns
A reference to this
Parameters
stringString value

◆ operator<<() [17/18]

StringStream & Nz::StringStream::operator<< ( const String string)

Adds the representation of the Nz::String.

Returns
A reference to this
Parameters
stringString value

◆ operator<<() [18/18]

StringStream & Nz::StringStream::operator<< ( const void *  ptr)

Adds the representation of the pointer.

Returns
A reference to this
Parameters
ptrPointer value

◆ ToString()

String Nz::StringStream::ToString ( ) const

Gives a string representation.

Returns
A string representation of the object where every objects of the stream has been converted with Nz::String

The documentation for this class was generated from the following files: