49c2b478c0fixed return value from Space::add_child_space()Tomasz Sowa2021-05-21 17:32:10 +0200
5ce36ea844changed the way how child_spaces are created in Space class - removed child_spaces and name pointers - now a table with child spaces is created under "child_spaces" object field - a name of the child space is stored in "name" field of the child objectTomasz Sowa2021-05-21 17:13:11 +0200
c11aa78335changed: names of methods in SpaceParser: PascalCase to snake_caseTomasz Sowa2021-05-21 04:42:55 +0200
6e4a0f68b3removed from SpaceParser: SetDefault(), SkipEmpty(bool skip) and UseEscapeChar(bool escape) methodsTomasz Sowa2021-05-21 04:28:31 +0200
82a21f6d85removed: SpaceParser::SetSpace(...) methods, now ParseJSON/Space(...) methods take a space as an argumentTomasz Sowa2021-05-21 01:33:01 +0200
abeca010ccfixed: SpaceParser was using space->set_empty_object() when parsing a space and it cleared all values if not an empty object was provided to the set_space() methodTomasz Sowa2021-05-21 00:26:19 +0200
59d4c9a9c8changed utf8 functions: PascalCase to snake_caseTomasz Sowa2021-05-21 00:24:56 +0200
fe82f63efbchanged the way of building in MakefilesTomasz Sowa2021-05-17 03:20:51 +0200
da6a36a205start creating tests for MainSpaceParserTomasz Sowa2021-05-17 03:19:47 +0200
ac691bccb7updated MainSpaceParser to the new Space format, changed api to snake case now we can: - parse short options, those beginning with a hypnen '-' - parse long options, those beginning with two hyphens '--' - long options can have arguments in two forms: - either with an equal sign, e.g.: --opion-name=argument - or with a space, e.g: --option argument in the latter case we can have more than one argument, e.g: --option argument1 argument2 - parse non-option arguments, those after two hyphens to the end of a string, e.g: -- arg1 arg2Tomasz Sowa2021-05-17 03:09:21 +0200
77d7bb5e64fixed in Space: set_empty_string(), set_empty_wstring(), set_empty_table() and set_empty_object() didn't clear its object if the same kind of object already existedTomasz Sowa2021-05-17 03:08:32 +0200
ce81670bb6added 'tests' directory with tests for the pikotools library currently only tests for convert/text functionsTomasz Sowa2021-05-10 20:08:50 +0200
b3cd4d5f7fremoved definition of CXX and CXXFLAGS from MakefileTomasz Sowa2021-05-10 20:07:08 +0200
adee7d134fadded macro PT_HAS_MORM in Log class where operator<<(morm::Model & model) is usedTomasz Sowa2021-05-10 20:05:55 +0200
7abe4b340achanges in convert/text functions - changed function names: PascalCase to snake_case - templates functions moved to a seperate file (text_private.h) - as a public api only available functions with char/wchar_t/std::string/std::wstring - ToLower(...) changed to to_lower_emplace(...), similar ToUpper(...) to to_upper_emplace(...) - added functions: std::string to_lower(const std::string & str); std::string to_upper(const std::string & str); and with std::wstring too - functions with postfix 'NoCase' changed to 'nc'Tomasz Sowa2021-05-10 20:04:12 +0200
3984c29fbfmoved all directories to src subdirectoryTomasz Sowa2021-05-09 20:11:37 +0200
b055c46ae8fixed#3: CompareNoCase incorrectly returned that string1 is greater than string2 for some characters when converting from 'char' to 'int' we should first convert to 'unsigned char' and then to 'int'Tomasz Sowa2021-05-08 22:37:31 +0200
463cec3283fixed#2: Procedures for reading an utf8 string incorrectly read some utf-8 characters. Those characters were treated as invalid characters.Tomasz Sowa2021-05-07 15:53:19 +0200
96eedd9be9added support for morm::Model to Log: Log & operator<<(morm::Model & model); but we need some kind of a macro to allow thisTomasz Sowa2021-04-30 01:17:47 +0200
297940ff7cfix in SpaceParser when parsing json format: floating point values such as 1.123e+01 where not correctly parsed ('+' character was not correctly parsed)Tomasz Sowa2021-04-12 18:49:34 +0200
5d34db5fcfadded to Space: - methods for testing a string value if a Space is a string or a table: bool has_value(const char * val) const; bool has_value(const std::string & val) const; bool has_value(const wchar_t * val) const; bool has_value(const std::wstring & val) const; - methods for testing a string value in an object (testing a string or a table): bool has_value(const wchar_t * field, const char * val) const; bool has_value(const wchar_t * field, const std::string & val) const; bool has_value(const wchar_t * field, const wchar_t * val) const; bool has_value(const wchar_t * field, const std::wstring & val) const; - methods for removing a child space: void remove_child_space(const wchar_t * name); void remove_child_space(const std::wstring & name); void remove_child_space(size_t index);Tomasz Sowa2021-04-09 17:49:44 +0200
a2339eed34fixed: in Space: pointers 'name' and 'child_spaces' were not correctly initialized in cctors added in Space: - some methods for adding values to an object, such as: Space & Space::add(const std::wstring & field, bool val) (bool, short, int, long, long long etc.) - methods for creating lists: void Space::to_list(std::list<std::string> & output_list, bool clear_list) const bool Space::to_list(const wchar_t * field, std::list<std::string> & output_list, bool clear_list) const - methods for converting a value from an object field: bool Space::to_bool(const wchar_t * field, bool default_value) const - methods for testing strings: bool Space::is_equal(const char * val) const bool Space::is_equal(const std::string & val) const bool Space::is_equal(const wchar_t * val) const bool Space::is_equal(const std::wstring & val) const - methods to get the raw pointer to a value from an object, such as: bool * Space::get_bool(const wchar_t * field) float * Space::get_float(const wchar_t * field) - methods for finding a child space (used in Space format only) Space * Space::find_child_space(const wchar_t * name) Space & Space::find_add_child_space(const wchar_t * name)Tomasz Sowa2021-04-08 17:16:37 +0200
1c643a08b0added a test whether we have reach the end of the input string without this such an input json (incorrect json string as there is no {} characters): "key": "value" would be parsed correctly: "key" would be parsed and the rest would be skippedTomasz Sowa2021-03-18 17:55:30 +0100
539faa4976changed the indentation algorithm when pretty printing the space format (no visual changes)Tomasz Sowa2021-03-18 17:28:11 +0100
679b9e6173added some indentation when printing 'pretty Space format'Tomasz Sowa2021-03-18 17:19:36 +0100
4119461f8efixed: when reading a non-escaped space token we should check whether a delimiter was escaped or not also a '#' was not testedTomasz Sowa2021-03-18 16:26:56 +0100
db5e516564added to Space: serialization do Space formatTomasz Sowa2021-03-18 15:33:43 +0100
6e169f7650added to JSONToSpaceParser: possibility to parse the Space format renamed: ParseFile() -> ParseJSONFile() added: ParseSpaceFile(), ParseJSON(), ParseSpace()Tomasz Sowa2021-03-17 18:24:50 +0100
31f7bdb857added to Space: child_spaces and a name of a SpaceTomasz Sowa2021-03-17 18:09:47 +0100
5b5a1dfbb6changed the way how the library is built - now there is only one Makefile in the root directory and we have only one pikotools.a lib file - removed: mainparserTomasz Sowa2021-03-17 13:16:01 +0100
0c0f15ab8achanged: JSONToSpaceParser can parse json string/file to the new Space format now (some minor chars escaping not ready yet)Tomasz Sowa2021-03-16 18:40:14 +0100
ba7fa1c195fixed: in serialize_json_double(): the buffer length was calculated incorrectly: sizeof(char) changed to sizeof(wchar_t) added to Space struct: void set_null(); void set_empty_string(); void set_empty_wstring(); void set_empty_table(); void set_empty_object(); void clear();Tomasz Sowa2021-03-16 18:36:59 +0100
bc9e4a3844use PT::WideStreamToUTF8() instead of PT::WideToUTF8() for a momentTomasz Sowa2021-03-16 18:35:08 +0100
f65d934e8cstart working on a new version of Space struct - better support for JSON format now we have a correct model, some methods for setting/getting values and serialization to json (no serialization to Space yet)Tomasz Sowa2021-03-15 19:36:49 +0100
fac3a7eb71reorganization in utf8 - utf8 auxiliary functions moved to utf8_private.h file - in utf8.h are shown only functions available for consumers - template functions has been moved to utf8_template.h (in utf8.h are only declarations) utf8_template.h is included at the end of utf8.h - functions which take std::ostream changed to template (the stream is a template argument now)Tomasz Sowa2021-03-15 19:34:51 +0100
effe9be0a3added: typedef with char_type to TextStreamBaseTomasz Sowa2021-03-15 19:27:03 +0100
448ad42961added: Toa() methods for converting to a string (new file convert/inttostr.cpp): template<class StringType> void Toa(unsigned long long value, StringType & res, bool clear_string = true, int base = 10); template<class StringType> void Toa(long long value, StringType & res, bool clear_string = true, int base = 10); template<class StringType> void Toa(unsigned long value, StringType & res, bool clear_string = true, int base = 10); template<class StringType> void Toa(long value, StringType & res, bool clear_string = true, int base = 10); template<class StringType> void Toa(unsigned int value, StringType & res, bool clear_string = true, int base = 10); template<class StringType> void Toa(int value, StringType & res, bool clear_string = true, int base = 10); template<class StringType> void Toa(unsigned short value, StringType & res, bool clear_string = true, int base = 10); template<class StringType> void Toa(short value, StringType & res, bool clear_string = true, int base = 10); std::wstring Toa(unsigned long long value, int base); std::wstring Toa(long long value, int base); std::wstring Toa(unsigned long value, int base); std::wstring Toa(long value, int base); std::wstring Toa(unsigned int value, int base); std::wstring Toa(int value, int base); std::wstring Toa(unsigned short value, int base); std::wstring Toa(short value, int base);Tomasz Sowa2021-03-03 02:24:30 +0100
49e49d1246fixed: operator==() and operator!=() in iterators in MemBuffer<> template did not have 'const' modifier and there was an error when compiling with clang with -std=c++20 flagTomasz Sowa2021-02-17 16:53:19 +0100
aff698d155a comment added in Log::~Log(), we have to consider whether calling save_log_and_clear() in ~Log() should be removedTomasz Sowa2021-02-17 16:51:06 +0100
a29cb45f6aadded: in FileLog::save_log(): test whether synchro_lock() has returned trueTomasz Sowa2019-09-25 16:12:10 +0000
7309c7817din spacetojson: if there is only one item then do not put it in the tableTomasz Sowa2019-02-19 13:08:07 +0000
c2e63f9290added: to Date: support for parsing timezone offsetsTomasz Sowa2019-01-31 20:56:40 +0000
5a63a8c0ecadded: to Log: IntMinWidth(size_t min_width) minimal width for integers added: to Log: operator<<(long long s) added: to TextStreamBase: operator<<(long long); operator<<(unsigned long long); int_min_width(size_t min_width); // minimal width for integersTomasz Sowa2019-01-28 18:06:18 +0000
e9df044f9eadded to convert: PatternReplacer for replacing parameters in patterns e.g. Replace("param %0", "first param")Tomasz Sowa2019-01-07 03:29:34 +0000
6c4a76baadchanged in utf8: functions taking WTextStream now take a template TextStreamBaseTomasz Sowa2018-11-24 17:09:25 +0000
8b3ae14d9afixed: FileLog didn't save an utf8 sequenceTomasz Sowa2018-11-24 10:47:13 +0000
e971e1ef9bchanged in logger: renamed Logger -> Log this class has an api (<< operators) for taking what should be put to the log file as the buffer is used WTextStream which should be allocated elsewhere added: FileLog - this class saves to a file logTomasz Sowa2018-11-23 17:07:52 +0000
8e9f83e377changed: when parsing date skip 'Z' character if exists (iso format)Tomasz Sowa2018-09-19 21:24:23 +0000
239e1e4674added: CompareNoCase() to convert/text.hTomasz Sowa2018-08-11 17:37:35 +0000
040eb12c8badded: to convert/text wchar_t ToLower(wchar_t c) wchar_t ToUpper(wchar_t c) void ToLower(std::wstring & s) void ToUpper(std::wstring & s)Tomasz Sowa2018-05-25 17:12:28 +0000
72a510ce71fixed: JSONToSpaceParser incorrectly read the last character from an UTF8 string (a last character before terminating zero char) it caused a syntax error when parsingTomasz Sowa2018-04-26 16:36:15 +0000
bf4fdf6da7added: Toa() for long long, int, short and unsigned as well fixed: when serializing Date the year has at least 4 digits e.g. 0001 when the year is equal to oneTomasz Sowa2018-04-22 21:22:55 +0000
38355a2830added: method Date::SerializeISO(Stream & out) outputs to the given stream: YYYY-MM-DDTHH:MM:SSZ, eg: 1990-02-12T13:05:39Z added: parsing date in a format: YYYY-MM-DDTHH:MM:SS ('T' letter given)Tomasz Sowa2018-04-20 09:33:53 +0000
dc0cd13178some work in Space - default value returned from TextRef()Tomasz Sowa2018-04-16 22:55:58 +0000
c910e22c00temporarily commented 'current_nested_level' in JSONtoSpaceParserTomasz Sowa2018-04-16 22:51:14 +0000
cb23304885added: to methods Toull(), Toll(), Toul(), Toui(), Tol(), Toi() a new parameter: bool allow_skip_whitechars default true added: new methods: Toull_b(), Toll_b(), Toul_b(), Toui_b(), Tol_b(), Toi_b() automatically detects the base (radix): 4323 - base 10 0122 - base 8 (string starts with 0) #fff - base 16 (string starts with #) &101 - base 2 (string starts with &) added: CharType * SkipWhiteFromBack(CharType * str, bool check_additional_chars = true, bool treat_new_line_as_white = true) skipping white characters from the end of a string changed: Toll_b(), Toull_b(), Tol_b() and Toul_b() are used in Space now for methods ToInt() etc so we are able to use a different base now changed: some work in Space (const correctness)Tomasz Sowa2018-01-05 20:03:11 +0000
e24112b79bsome 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;Tomasz Sowa2017-12-07 11:35:12 +0000
7d51372844added: 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)Tomasz Sowa2017-12-05 16:32:21 +0000
cde990ba82start changing the Space API removed table_single from SpaceTomasz Sowa2017-06-27 16:51:55 +0000
62f16ecb1bchanged: using relative paths calculated with relative_path nowTomasz Sowa2016-03-18 09:27:40 +0000
9deb2ff2f2some work in MainSpaceParser: added reading long (--longname) parametersTomasz Sowa2016-02-08 18:00:17 +0000
7b4b576489added: MainSpaceParser - starting writing a parser for main(argc, argv) arguments (a Space object is returned)Tomasz Sowa2016-01-21 18:49:42 +0000
d9b583df76instead of directly using 'ar' program we are using the AR macro now (which defaults to 'ar' if you do not define it)Tomasz Sowa2014-11-12 04:11:28 +0000