Commit Graph

301 Commits

Author SHA1 Message Date
Lee Thomason cd011bc1b7 start working through memory bugs 2014-12-17 10:41:34 -08:00
Dmitry-Me abb2d046d0 More pointers pre-asserts 2014-12-09 12:59:31 +03:00
Dmitry-Me a317bd66a6 Resolve issue 176 2014-12-08 10:35:37 +03:00
Dmitry-Me 1227d51ed0 Reuse const FindAttribute for non-const version thereof 2014-12-05 13:41:45 +03:00
Lee Thomason 2114e47453 Merge pull request #230 from antonindrawan/master
Compile TinyXml2 with the Dinkum C++ of QNX 6.5 and QNX 6.6.
2014-11-27 22:34:34 -08:00
Lee Thomason 2965880447 switch to using pointer, not reference 2014-11-27 22:31:11 -08:00
Anton Indrawan f59e2d6a89 Compile TinyXml2 with the Dinkum C++ of QNX 6.5 and QNX 6.6.
When we include c++ headers, we have to use explicit std::
2014-11-18 20:50:42 +01:00
Lee Thomason 03494b189c Merge remote-tracking branch 'origin/master' into Dmitry-Me-properStrPairAssignment 2014-11-15 17:50:17 -08:00
Lee Thomason 575f190412 fix merge of operator= 2014-11-15 17:50:15 -08:00
Lee Thomason 327d5c142e Merge branch 'properStrPairAssignment' of https://github.com/Dmitry-Me/tinyxml2 into Dmitry-Me-properStrPairAssignment 2014-11-15 17:46:23 -08:00
Lee Thomason 92e521b431 add simple test for not-crashing 2014-11-15 17:45:51 -08:00
Dmitry-Me 08b40dd8a5 Implement "move" equivalent of assignment operator for StrPair 2014-11-10 11:17:21 +03:00
Dmitry-Me 66d2a84715 Add pre-assert, fix comment 2014-11-08 15:24:52 +03:00
Dmitry-Me fa20b227a3 Reuse IsWhiteSpace(), move comment. 2014-10-31 12:53:04 +03:00
Tolga Cakir 78eee7299f removing accidentally added newline 2014-10-30 23:08:39 +01:00
Lee Thomason f07b952296 fix issue 184. clean up xcode project. 2014-10-30 13:25:12 -07:00
Lee Thomason 853de8169b Merge pull request #213 from Dmitry-Me/likelyWrongSignature
Function signature is most likely wrong
2014-09-27 15:57:53 -07:00
Dmitry-Me 72bb0ecc39 Function signature is most likely wrong 2014-09-24 16:14:24 +04:00
Dmitry-Me 9de541f465 Reuse const version for non-const one 2014-09-24 14:21:36 +04:00
Lee Thomason 5321a0e21f setting the version to 2.2.0 2014-09-14 12:47:24 -07:00
Lee Thomason 331596e83c clean up the scope and names of the error code. 2014-09-11 14:56:43 -07:00
numatrumpet cd8550c29c Without using preprocessor 2014-09-08 16:59:39 +09:00
numatrumpet 003368429f ErrorNames is not implemented by vector<string> but *char[] 2014-09-08 16:36:28 +09:00
numatrumpet bb5ffac22d Using C++11, XMLUtil::ToErrorName(XMLError) returns the name of error type 2014-09-06 22:56:46 +09:00
Dmitry-Me e3225b1c64 Convert DELETE_X macros into functions 2014-09-03 11:03:11 +04:00
Lee Thomason 30152836da Merge pull request #202 from Dmitry-Me/removeRepeatedVirtualCalls
Remove repeated virtual calls
2014-08-28 04:53:51 -07:00
Lee Thomason d526944e3c removed unused _accumulator 2014-08-27 14:45:35 -07:00
Dmitry-Me b6b4e82626 Remove repeated virtual calls 2014-08-27 17:17:47 +04:00
Dmitry-Me 5657176b61 Replace C-style cast with static_cast 2014-08-15 11:03:47 +04:00
pffang 91d34a0989 WinCE Compatibility Fix 2014-07-10 10:02:35 +08:00
Alexander Mai d740b64044 Fix compiler warning: extra ';' after member function definition 2014-05-20 22:04:42 +02:00
Lee Thomason 6ee53e7d49 setting the version to 2.1.0 2014-04-06 14:43:37 -07:00
Lee Thomason 256adb6371 missing default parameter for compact mode in XMLPrinter 2014-04-06 14:41:46 -07:00
Lee Thomason b59ac45131 setting the version to 2.0.2 2014-03-16 20:18:41 -07:00
Lee Thomason 686ef404b8 improve setversion script. set version 2.0.1 2014-03-16 10:16:49 -07:00
Lee Thomason 85afe9c5c7 setting version consistent with new guidelines. (not tagging...yet). 2014-02-23 21:42:16 -08:00
Lee Thomason e693488742 fix compilation warning. 2014-02-22 16:27:27 -08:00
Uli Kusterer 613410095c Provide finer control over indentation inside the XMLPrinter. You'll have to subclass it to override its standard behaviour by overwriting CompactMode(). 2014-02-22 17:19:08 +01:00
Lee Thomason c18eb23326 spelling fixes and make PrintSpace() virtual and protected. 2014-02-21 17:31:17 -08:00
Uli Kusterer 5d1d27e88b Keep indentation control fully inside the XMLPrinter. You'll have to subclass it to override its standard behaviour by overwriting CompactMode(). 2014-02-20 11:50:22 +01:00
Uli Kusterer b85b4e0a60 Merge branch 'pernodecompactwhitespace'
* pernodecompactwhitespace:
  SetForceCompactMode() now also handles case of a single tag inside another correctly.
  Give tests a few more chances to fail, e.g. on tag sequences or attributes.
  Added SetForceCompactMode() for overriding the compact setting on a per-node level. All sub-nodes will be printed compact as well.

Conflicts:
	xmltest.cpp
2014-02-01 13:38:04 +01:00
Uli Kusterer ca412e87f2 SetForceCompactMode() now also handles case of a single tag inside another correctly. 2014-02-01 13:35:05 +01:00
Uli Kusterer d5c9e8b81d Added SetForceCompactMode() for overriding the compact setting on a per-node level. All sub-nodes will be printed compact as well. 2014-02-01 12:57:57 +01:00
Uli Kusterer 593a33d061 Added SetForceCompactMode() for overriding the compact setting on a per-node level. All sub-nodes will be printed compact as well. 2014-02-01 12:48:51 +01:00
Uli Kusterer 53fe47c74e Remove long long stuff again. 2014-01-27 01:47:30 +01:00
Uli Kusterer 35ce309f73 Urk, forgot to build this one after merging and goofed a bit. 2014-01-25 03:37:16 +01:00
Uli Kusterer 2861a7e63a Merge branch 'master' of https://github.com/leethomason/tinyxml2
Conflicts:
	tinyxml2.cpp
	xmltest.cpp
2014-01-25 03:12:21 +01:00
Lee Thomason 5bb2d8079b add variants of SetText() to support types 2014-01-24 10:42:57 -08:00
Uli Kusterer 664d05662e Support for 'long long' number values. 2014-01-21 12:24:47 +01:00
Uli Kusterer 4cd1f269c2 Added IntText(), UnsignedText(), DoubleText() and FloatText() convenience wrappers. 2014-01-21 02:54:36 +01:00
Uli Kusterer ff8e2041dd To bring BoolFirstChild() more in line with the other methods, reimplemented it in terms of a new QueryBoolFirstChild(). 2014-01-21 02:53:47 +01:00
Uli Kusterer c1c20bb196 Bools should really be implemented as self-closing <true /> and <false /> tags, not as 0/1 inside a tag, so removing those SetText variants again, in favor of SetBoolFirstChild() and BoolFirstChild() methods. 2014-01-21 02:23:20 +01:00
Uli Kusterer dcefa0e43f Add typed convenience setters for SetText(). 2014-01-21 01:36:41 +01:00
Uli Kusterer 85fff5e50a Add comment for SetText(). 2014-01-21 01:35:30 +01:00
Uli Kusterer 8fe342a872 Add SetText() as analog to GetText(). 2014-01-21 01:12:47 +01:00
Lee Thomason c3708ccf08 implement a fix to floating point precision as proposed by schuellc. 2014-01-14 12:30:03 -08:00
Lee Thomason ce0510ba2d rename Reset to Clear to be consistent with XMLDocument 2013-11-26 21:29:37 -08:00
Reinhard Klambauer 3bc3d4e24c Added a method to reset the memory buffer to the XMLPrinter class.
This enables to reset the printer memory to start again from the beginning.
2013-11-22 14:05:21 +01:00
Reinhard Klambauer 4e74b13e7a Added a method to reset the memory buffer of the DynArray class.
The the allocated memory will not be touched so the capacity keeps its current level.
2013-11-22 14:01:58 +01:00
Lee Thomason 5613cb9237 up the version 2013-10-26 21:52:35 -07:00
Michael Daumling ed52328ced Insert() methods check for inserted XML to be in the same doc, and remove XML from old location if already inserted. 2013-10-23 07:47:29 +02:00
Michael Daumling 2162688ad3 Issue #134: Change 3 methods to not being inlined. They reference the StrPair class, which is not exported, thus creating linker problems with tinyxml2 in a DLL. 2013-10-22 17:03:37 +02:00
Dennis Jenkins 59c75d3322 Added method DynArray::PeekTop(), provides useful abstraction in tinyxml2::XMLPrinterHTML5::CloseElement(). Made tinyxml2::CloseElement() and destructor virtual. Made tinyxml2::_SealElement(), _elementJustOpened and _stack all protected instead of private (needed in XMLPrinterHTML5 to selective prevent some elements from being self-closing). 2013-10-08 13:10:07 -05:00
Lee Thomason 03238517b3 Merge pull request #125 from PKEuS/master
Added depth as constructor argument to XMLPrinter
2013-08-05 13:04:27 -07:00
PKEuS 1bfb95488f Added depth as constructor argument to XMLPrinter. This way, XML files that are not written with XMLDocument can be properly indented.
Removed unused forward declaration
2013-08-04 14:04:09 +02:00
Lee Thomason (grinliz) db304256bb clean up the pass/fail logic, still return the same value from test if it fails 2013-07-31 12:24:52 -07:00
PKEuS 95060350bd Removed dllexport/import attribute from private class, disable related warning C4251 2013-07-26 10:42:44 +02:00
PKEuS 16ed47dc14 Added support for building TinyXML as a .lib or .dll 2013-07-12 21:16:33 +02:00
PKEuS 1c5f99e37c Fixed two cppcheck messages 2013-07-06 11:28:39 +02:00
Vasily Biryukov 9a975b7bdb Small fixes in documentation 2013-05-19 17:01:05 +06:00
Thomas Roß 6189231187 Initialize pointers to satisfy static code analyser. 2013-05-12 14:07:38 +02:00
selfpoised 4dd59bcdf4 Update tinyxml2.h
*end != 0 => *_end != 0
2013-03-13 16:54:15 +08:00
selfpoised e77e19553d Update tinyxml2.h
format spaces
2013-03-13 14:08:29 +08:00
Andrew C. Martin 0fd8746f64 correct typos in comments / documentation 2013-03-09 20:09:45 -07:00
Lee Thomason (grinliz) 374c25e2a6 up the version to build 11 2013-02-01 19:45:01 -08:00
Lee Thomason (grinliz) 5efaa5f6bb Add the (very handy) QueryAttribute 2013-02-01 19:26:30 -08:00
Lee Thomason (grinliz) ac83b4e278 adjust the size of the memory pools 2013-02-01 09:02:34 -08:00
Martinsh Shaiters a9d42b0dd3 Replace InitDocument() with Clear() and make it part of the API. 2013-01-30 11:19:39 +02:00
Lee Thomason 86ca9dc1ee correctly set version via script 2013-01-28 07:31:59 -08:00
Lee Thomason 63339bcd7d up the version 2013-01-28 07:28:46 -08:00
Martinsh Shaiters c6d02f48d5 Implement new utility functions for testing validity of name and token characters. 2013-01-26 22:43:54 +02:00
MortenMacFly 4ee49f1690 Eliminate warnings with GCC/MinGW 2013-01-14 20:03:14 +01:00
Jerome Martinez 242c3eaa33 Reverting std lib is in std:: namespace and using .h versions instead 2013-01-06 12:20:04 +01:00
Lee Thomason 5b0a677712 fix incorrect assert on unused memory 2012-11-19 13:54:42 -08:00
Lee Thomason 998116e587 up the version 2012-11-12 13:04:56 -08:00
Lee Thomason 2fa8172236 type XMLError. fix some comments 2012-11-09 12:37:46 -08:00
Jerome Martinez 7921df1b47 Moved COUNT from private to public 2012-10-24 11:45:44 +02:00
Lee Thomason (grinliz) 856da21652 fix duplicated COUNT logic 2012-10-19 09:08:15 -07:00
Jerome Martinez 7fbefab95d std lib is in std:: namespace only and array definition is not possible with an enum 2012-10-19 11:30:33 +02:00
Lee Thomason 624d43fc05 finish switching to _ for member vars 2012-10-12 10:58:48 -07:00
Lee Thomason ed5c879dfe switch StrPair() over to _ for member vars 2012-10-12 10:09:48 -07:00
Lee Thomason 120b3a62be switch StrPair() over to _ for member vars 2012-10-12 10:06:59 -07:00
Lee Thomason a9cf3f9f3f Switched to Artistic Style auto-formatting to allow integration of patches from other coding styles. 2012-10-11 16:56:51 -07:00
Lee Thomason (grinliz) fc6320e30a experimented with print f vs. g. increased version 2012-09-23 20:25:50 -07:00
Lee Thomason (grinliz) e2bcb32494 accept a nBytes argument for Parse() 2012-09-17 17:58:25 -07:00
Lee Thomason (grinliz) 2f1f6247e0 remove trailing spaces 2012-09-16 11:32:34 -07:00
Lee Thomason (grinliz) 491d587484 Merge branch 'master' into whitespace 2012-09-08 21:24:00 -07:00
Lee Thomason (grinliz) 4dbe869cd7 increase the version 2012-09-08 21:23:33 -07:00
Lee Thomason (grinliz) b476109083 Merge remote-tracking branch 'IOBYTE/master' 2012-09-08 21:15:11 -07:00
Lee Thomason (grinliz) 6020a01812 remove debug mem write when in release mode 2012-09-08 21:15:09 -07:00
Robert Reif 312a20fdd4 Add support to XMLDocument to save file in compact mode. 2012-09-08 19:33:57 -04:00
Lee Thomason (grinliz) bc1bfb7f27 added whitespace=collapse support. tests work. code needs review 2012-08-20 22:00:38 -07:00
PKEuS e736f294c5 XMLPrinter::accumulator is only needed if MSVC is used. 2012-07-16 03:27:55 -07:00
PKEuS c28ba3aeab Fixed cppcheck warnings 2012-07-16 03:08:47 -07:00
Lee Thomason 21be882810 Moving string in/out into XMLUtil. Using that across the API. Supporting text queries of primitive types. 2012-07-15 17:27:22 -07:00
Lee Thomason 78a773ddd9 Fix attribute parsing to correctly handle white space 2012-07-02 10:10:19 -07:00
Lee Thomason (grinliz) 390e978da1 Fix infinite loop bug in ShallowEqual. Fix a warning with a re-interpret cast. Up version to 1.0.4 2012-07-01 21:22:53 -07:00
Lee Thomason a3efec0449 clean up some warnings 2012-06-15 14:30:44 -07:00
Lee Thomason c78dc01bfd removed extra and incorrect 'const' 2012-06-12 13:12:15 -07:00
Lee Thomason 78d450b54e increase version 2012-06-04 17:05:58 -07:00
Lee Thomason 4cd8534a1e actually add comments 2012-06-04 17:02:37 -07:00
Lee Thomason 7b1b86a1c9 removed confusing getter/setter. cleaned up comments. 2012-06-04 17:01:38 -07:00
sniperbat 2590088631 Add compact mode to XMLPrinter, for printing without '\n' and space.
let output file smaller.
usage:
//------------------------------------------------
XMLPrinter printer;
printer->SetCompactMode( true ); //enable compact mode
doc->Print( &printer );
SomeFunction( printer.CStr() );
//------------------------------------------------
or
//------------------------------------------------
//enable at construction
XMLPrinter printer( file, true );         // to file
//XMLPrinter printer( NULL, true ); // to men
doc->Print( &printer );
SomeFunction( printer.CStr() );
//------------------------------------------------

The '\n' and space in Text or Attribute will be kept.
2012-05-28 17:22:07 +08:00
Lee Thomason (grinliz) 48ea0bcf80 renamed function, added test case 2012-05-26 14:41:14 -07:00
sniperbat e01e786883 add a method to help get the size of the XML file in memory 2012-05-21 12:45:36 +08:00
Lee Thomason a2ae54e40d fix a missing [] in the delete call 2012-05-18 13:47:48 -07:00
Thomas Ro 08bdf50076 Fixed typos in code documentation. 2012-05-12 14:21:23 +02:00
Lee Thomason f68c438ee2 added new test for BOM, and added good defaults for NewDeclaration 2012-04-28 14:37:11 -07:00
Lee Thomason 0aa8a80fd7 Enough bake time. Up version to 1.0 2012-04-28 14:20:27 -07:00
Lee Thomason 5e3803cac3 Better attribute system. Removes redundant list searching of LinkAttribute. Faster parsing on initial read. Added badly needed missing test cases. 2012-04-16 08:57:05 -07:00
Lee Thomason d11cd169e6 minor whitespace cleanup 2012-04-12 08:35:36 -07:00
Ken Miller 81da1fb26b Made SaveFile symmetrical with LoadFile
Added overload taking a FILE pointer
Return error code (if any) instead of void
2012-04-09 23:32:26 -05:00
Lee Thomason (grinliz) 8712757389 merging handles to the master 2012-04-07 20:56:38 -07:00
Lee Thomason (grinliz) 8871cd8437 add xmltest.h as a place to put the example docs, so they don't pollute the main file' 2012-04-06 21:40:08 -07:00
Lee Thomason (grinliz) b9e791fa4e simplify safe logic 2012-04-06 21:27:10 -07:00
Lee Thomason (grinliz) 598c13efa8 fix the safe function behavior 2012-04-06 21:18:23 -07:00
Lee Thomason (grinliz) ae209f6aed added docs. basic handles tests 2012-04-04 22:00:07 -07:00
Lee Thomason (grinliz) 70e9c6b6a0 Merge branch 'master' into handles 2012-04-04 21:38:17 -07:00
Lee Thomason 8b89981989 gave up trying to be clever. split the handles into 2 classes. 2012-04-04 15:58:16 -07:00
Lee Thomason db0bbb60a1 handles work 2012-04-04 15:47:04 -07:00
Lee Thomason (grinliz) c8678e2fcc upped the version 2012-04-04 12:39:53 -07:00
Lee Thomason (grinliz) 6a22be220a Added proper examples, integrated them into xmltest, and make them part of the build. 2012-04-04 12:39:05 -07:00
Lee Thomason 5761203084 trying to get template to work 2012-04-03 16:43:22 -07:00
Lee Thomason 5708f814a6 handles wip. not happy with const behavior 2012-03-28 17:46:41 -07:00
Lee Thomason 3ffdd39dbf handles wip 2012-03-28 17:27:55 -07:00
Lee Thomason b411b8e3c1 Merge branch 'master' of https://github.com/gamaral/tinyxml2 2012-03-25 13:20:03 -07:00
Lee Thomason 3a68262c67 minor doc fix 2012-03-25 13:19:40 -07:00
Guillermo A. Amaral 9a6c6b84a1 Tackled more Clang analyzer warnings. 2012-03-24 17:13:25 -07:00
Lee Thomason e923c5c4c3 upped the version. 2012-03-24 13:07:06 -07:00
Lee Thomason 9225815378 cleaned up the documentation 2012-03-24 13:05:39 -07:00
Lee Thomason 8ba7f7d69b Added the improved attribute query 2012-03-24 13:04:04 -07:00
Lee Thomason 7f7b162b6f Add warning for the working directory. Verify win64 fix. 2012-03-24 12:49:03 -07:00
Guillermo A. Amaral 68b0c87640 Fix debug build (MSVC 2003-2010) 2012-03-24 11:07:19 -07:00
Lee Thomason 876b2476d5 updated the version 2012-03-20 13:28:02 -07:00
Lee Thomason 5ce8941553 a few formatting changes 2012-03-20 13:23:44 -07:00
Guillermo A. Amaral 2eb7003763 Misc adjustments and enum rename
Updated to use C++ headers
Fixed MSVC2010 collision
Added Makefile for xmltest (unix)
2012-03-20 11:51:40 -07:00
Guillermo A. Amaral b42ba366d8 Resolve Clang and GCC compiler warnings. 2012-03-20 00:17:15 -07:00
Lee Thomason 52913d12c9 add missing header for mac 2012-03-13 19:51:59 -07:00
Lee Thomason (grinliz) ea09bd065b fixed up headers. 2012-03-10 20:25:31 -08:00
Lee Thomason (grinliz) 7ca5558bca removed the pointer-diff 2012-03-07 21:54:57 -08:00