etk/etk/Stream.hpp

46 lines
1.1 KiB
C++
Raw Normal View History

2017-08-28 00:02:11 +02:00
/**
* @author Edouard DUPIN
* @copyright 2011, Edouard DUPIN, all right reserved
* @license MPL-2 (see license file)
*/
#pragma once
#include <etk/types.hpp>
namespace etk {
class String;
/**
* @brief string class ...
*/
class Stream {
private:
2017-09-14 00:59:21 +02:00
// remove dependency of etk::String and vector
2017-08-28 00:02:11 +02:00
etk::String* m_data;
public:
Stream(size_t _basicSize=0);
~Stream();
Stream& operator<< (const char* _data);
Stream& operator<< (bool _data);
Stream& operator<< (int8_t _data);
Stream& operator<< (int16_t _data);
Stream& operator<< (int32_t _data);
Stream& operator<< (int64_t _data);
Stream& operator<< (uint8_t _data);
Stream& operator<< (uint16_t _data);
Stream& operator<< (uint32_t _data);
Stream& operator<< (uint64_t _data);
2017-08-30 21:42:07 +02:00
#if defined(__TARGET_OS__MacOs) \
|| defined(__TARGET_OS__IOs)
Stream& operator<< (size_t _data);
#endif
2017-08-28 00:02:11 +02:00
Stream& operator<< (float _data);
Stream& operator<< (double _data);
2017-09-07 23:38:26 +02:00
Stream& operator<< (etk::NullPtr _data);
2017-08-28 00:02:11 +02:00
const char* c_str() const;
2017-09-07 23:38:26 +02:00
const etk::String& str() const;
2017-08-28 00:02:11 +02:00
const size_t size() const;
};
2017-09-14 00:59:21 +02:00
2017-08-28 00:02:11 +02:00
}