Commit Graph

6 Commits

Author SHA1 Message Date
Tomasz Sowa 74230d667b change headerfile_picotools_* macros to headerfile_pikotools_* 2022-06-30 12:45:08 +02:00
Tomasz Sowa cadba907b2 change licence from 3-Clause BSD to 2-Clause BSD 2022-06-30 12:09:22 +02:00
Tomasz Sowa 4d9f5f6c55 Log class has the Stream class as a base class now
- implemented some missing operators<<(...)
- removed Manipulators: l1, l2, l3, l4, lend, lsave
- PascalCase to snake_case in Log

added to Stream:
  virtual bool is_char_stream() const = 0;
  virtual bool is_wchar_stream() const = 0;
  virtual char get_char(size_t index) const = 0;
  virtual wchar_t get_wchar(size_t index) const = 0;
  virtual Stream & operator<<(const Stream & stream) = 0;
2021-06-24 20:52:48 +02:00
Tomasz Sowa 3c0b59e115 added to Space: long double to Space::Value and methods for converting from/to long double
added global methods for converting float/string double/string and long double/string (convert/double.h|cpp):
      float to_float(const char * str, const char ** after = nullptr);
      float to_float(const wchar_t * str, const wchar_t ** after = nullptr);
      double to_double(const char * str, const char ** after = nullptr);
      double to_double(const wchar_t * str, const wchar_t ** after = nullptr);
      long double to_long_double(const char * str, const char ** after = nullptr);
      long double to_long_double(const wchar_t * str, const wchar_t ** after = nullptr);
      float to_float(const std::string & str, const char ** after = nullptr);
      float to_float(const std::wstring & str, const wchar_t ** after = nullptr);
      double to_double(const std::string & str, const char ** after = nullptr);
      double to_double(const std::wstring & str, const wchar_t ** after = nullptr);
      long double to_long_double(const std::string & str, const char ** after = nullptr);
      long double to_long_double(const std::wstring & str, const wchar_t ** after = nullptr);
      std::string to_str(float val);
      std::wstring to_wstr(float val);
      std::string to_str(double val);
      std::wstring to_wstr(double val);
      std::string to_str(long double val);
      std::wstring to_wstr(long double val);
2021-06-23 17:01:43 +02:00
Tomasz Sowa ac407b2362 macro renamed: PT_HAS_MORM -> PT_HAS_MORM_LIBRARY
TextStream::to_string(...) is now TextStream::to_str(...)
added: std::string TextStream::to_str() const;
added: std::wstring TextStream::to_wstr() const;
2021-06-20 16:46:08 +02:00
Tomasz Sowa 819c49e638 added class Stream (textstream/stream.h) which acts as a base class for TextStream
TextStream is making conversions wide/utf8 now
2021-06-20 14:13:23 +02:00