diff --git a/etk/os/FSNode.cpp b/etk/os/FSNode.cpp index 03f5e83..3474d2b 100644 --- a/etk/os/FSNode.cpp +++ b/etk/os/FSNode.cpp @@ -1776,6 +1776,13 @@ etk::FSNode& etk::FSNode::operator<< (const uint32_t _data) { fileWrite(sss.c_str(), 1, sss.size()); return *this; } +etk::FSNode& etk::FSNode::operator<< (const float _data) { + std::stringstream tmp; + tmp << _data; + std::string sss = tmp.str(); + fileWrite(sss.c_str(), 1, sss.size()); + return *this; +} bool etk::FSNode::fileSeek(long int _offset, enum etk::seekNode _origin) { diff --git a/etk/os/FSNode.h b/etk/os/FSNode.h index ca30941..99f0b42 100644 --- a/etk/os/FSNode.h +++ b/etk/os/FSNode.h @@ -491,6 +491,7 @@ namespace etk { etk::FSNode& operator<< (const char* _data); etk::FSNode& operator<< (const int32_t _data); etk::FSNode& operator<< (const uint32_t _data); + etk::FSNode& operator<< (const float _data); /** * @brief Get the position in the file. * @return the requested position. diff --git a/etk/stdTools.h b/etk/stdTools.h index 5c770d5..7ebb37f 100644 --- a/etk/stdTools.h +++ b/etk/stdTools.h @@ -388,6 +388,17 @@ namespace std { namespace etk { // these declaration is to prevent some under template declaration of unknown type template std::string to_string(const TYPE& _variable); + template std::string to_string(const std::vector& _list) { + std::string out = "{"; + for (size_t iii=0; iii<_list.size(); ++iii) { + if (iii!=0) { + out += ";"; + } + out+= etk::to_string(_list[iii]); + } + out += "}"; + return out; + } #if __CPP_VERSION__ >= 2011 template std::u32string to_u32string(const TYPE& _variable); #endif