Files
NazaraEngine/include/Nazara/Core/StringStream.hpp
Lynix 42c10268d2 Fixed thread-safety
Fixed huge mistake in Clock code (Allocating a mutex everytime instead
of locking it)
HashDigest and StringStream class are no longer thread-safe (That was
stupid anyway)


Former-commit-id: d07a6859df27eac2c5171e75720b3963b6a5fbbb
2014-03-06 09:49:39 +01:00

50 lines
1.5 KiB
C++

// Copyright (C) 2014 Jérôme Leclercq
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_STRINGSTREAM_HPP
#define NAZARA_STRINGSTREAM_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/String.hpp>
#include <string>
#include <vector>
class NAZARA_API NzStringStream
{
public:
NzStringStream();
NzStringStream(const NzString& str);
NzString ToString() const;
NzStringStream& operator<<(bool boolean);
NzStringStream& operator<<(short number);
NzStringStream& operator<<(unsigned short number);
NzStringStream& operator<<(int number);
NzStringStream& operator<<(unsigned int number);
NzStringStream& operator<<(long number);
NzStringStream& operator<<(unsigned long number);
NzStringStream& operator<<(long long number);
NzStringStream& operator<<(unsigned long long number);
NzStringStream& operator<<(float number);
NzStringStream& operator<<(double number);
NzStringStream& operator<<(long double number);
NzStringStream& operator<<(char character);
NzStringStream& operator<<(unsigned char character);
NzStringStream& operator<<(const char* string);
NzStringStream& operator<<(const std::string& string);
NzStringStream& operator<<(const NzString& string);
NzStringStream& operator<<(const void* ptr);
operator NzString() const;
private:
std::vector<NzString> m_strings;
unsigned int m_bufferSize;
};
#endif // NAZARA_STRINGSTREAM_HPP