Commit Graph

12 Commits

Author SHA1 Message Date
Tomasz Sowa e24112b79b some work in Space API:
added: new GetValue() implementation
       Value * GetValue(const wchar_t * name)
       Value * GetValue(const std::wstring & name)
       const Value * GetValue(const wchar_t * name) const
       const Value * GetValue(const std::wstring & name) const
added: const correctness for Text() and TextA() methods
       std::wstring Text(...) const;
       std::string TextA(...) const;
added: TextA() with a wide second argument
       std::string TextA(const wchar_t * name, const wchar_t * def) const;
       std::string TextA(const std::wstring & name, const wchar_t * def) const;
       std::string TextA(const std::wstring & name, const std::wstring & def) const;
       




git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1067 e52654a7-88a9-db11-a3e9-0013d4bc506e
2017-12-07 11:35:12 +00:00
Tomasz Sowa 7d51372844 added: functions for dealing with white characters:
bool IsWhite(wchar_t c, bool check_additional_chars, bool treat_new_line_as_white) (checking unicode white characters too)
       CharType * SkipWhite(CharType * str, bool check_additional_chars = true, bool treat_new_line_as_white = true)
       IsDigit(wchar_t c, int base, int * digit)

added: functions to converting from a string to an integer:
       unsigned long long Toull(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
       long long Toll(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
       unsigned long Toul(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
       unsigned int  Toui(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
       long          Tol(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)
       int           Toi(const CharType * str, int base = 10, const CharType ** after_str = 0, bool * was_overflow = 0)

changed: some work in Space (new Api)       
       now Text() methods returns std::wstring by value (before they were returned by reference)
       added std::wstring & TextRef() methods
       added unsigned int UInt(), unsigned long ULong() and LongLong() and ULongLong()
       GetValue() renamed to GetFirstValue()
       AText() renamed to TextA() and they return std::string by value now
       



git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1066 e52654a7-88a9-db11-a3e9-0013d4bc506e
2017-12-05 16:32:21 +00:00
Tomasz Sowa cde990ba82 start changing the Space API
removed table_single from Space



git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1065 e52654a7-88a9-db11-a3e9-0013d4bc506e
2017-06-27 16:51:55 +00:00
Tomasz Sowa d655c7c872 removed: svn:executable attribute from files
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@985 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-11-01 17:11:00 +00:00
Tomasz Sowa 1e48455942 added: to Space:
bool HasValue(const wchar_t * name, const wchar_t * value);
       bool HasValue(const wchar_t * name, const std::wstring & value);
       bool HasValue(const std::wstring & name, const wchar_t * value);
       bool HasValue(const std::wstring & name, const std::wstring & value);
       useful when testing whether a value is in a list (or in simple table too)



git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@433 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-17 19:55:16 +00:00
Tomasz Sowa 5ad48470b6 added: to Space:
std::wstring & FindAdd(const WTextStream & name);
       std::wstring & Add(const wchar_t * name,        const WTextStream & value);
       std::wstring & Add(const std::wstring & name,   const WTextStream & value);
       std::wstring & Add(const WTextStream & name,    const WTextStream & value);




git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@430 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-07-25 10:27:20 +00:00
Tomasz Sowa 2af6c28a54 added: JSONToSpaceParser -- a parser for JSON format to Space structure
added: SpaceToJSON -- a serializer from Space structure to JSON (not finished yet)



git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@427 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-07-12 15:01:15 +00:00
Tomasz Sowa bff2ecb147 added: to Space:
const std::wstring * GetValue(const std::wstring & name) const;
       std::wstring & Add(const wchar_t * name,        size_t value);
       std::wstring & Add(const std::wstring & name,   size_t value);




git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@418 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-26 23:20:59 +00:00
Tomasz Sowa 11ddf0f6d9 fixed: in Space serializer: we have to escape more characters
fixed: in SpaceParser::ReadTokenSingle
       the delimiter can be only if the character was not escaped


git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@409 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-12 15:54:20 +00:00
Tomasz Sowa e620c8f95d changed: SpaceParser -- parser's engine has been rewritten
now we can map all strings to all strings
         documentation in space.h need to be updated yet


git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@407 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-10 21:16:19 +00:00
Tomasz Sowa cd3a1b853f changed: class name: ConfParser -> SpaceParser
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@402 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-04-30 13:10:55 +00:00
Tomasz Sowa 02645de1f6 changed: directory name: confparser -> space
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@401 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-04-30 12:38:20 +00:00