From 560bd47842a537b5550645bf6d5070a950b4bca0 Mon Sep 17 00:00:00 2001 From: "U-Lama\\Lee" Date: Wed, 28 Dec 2011 19:42:49 -0800 Subject: [PATCH] initial thoughts --- tinyxml2.cpp | 31 ++++++++++++++++++++++++++++++- tinyxml2.h | 20 ++++++++++++++++++-- tinyxml2.suo | Bin 25600 -> 25600 bytes tinyxml2/tinyxml2.vcxproj | 2 +- 4 files changed, 49 insertions(+), 4 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index eac36f9..e923c48 100644 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -1,7 +1,36 @@ -#include "tinyxml2.h"; +#include "tinyxml2.h" + +#include +#include +#include + +using namespace tinyxml2; + +/*static*/ CharBuffer* CharBuffer::Construct( const char* in ) +{ + size_t len = strlen( in ); + size_t size = len + sizeof( CharBuffer ); + CharBuffer* cb = (CharBuffer*) malloc( size ); + cb->length = len; + strcpy( cb->mem, in ); + return cb; +} + + +/*static*/ void CharBuffer::Free( CharBuffer* cb ) +{ + free( cb ); +} + + +XMLDocument::XMLDocument() : + charBuffer( 0 ) +{ +} bool XMLDocument::Parse( const char* str ) { + return true; } diff --git a/tinyxml2.h b/tinyxml2.h index ce8b4a7..aa1fbba 100644 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -6,11 +6,26 @@ namespace tinyxml2 { + +// internal - move to separate namespace +struct CharBuffer +{ + size_t length; + char mem[1]; + + static CharBuffer* Construct( const char* in ); + static void Free( CharBuffer* ); +}; + + +/* class Element { public: Element }; +*/ + class XMLDocument @@ -22,12 +37,13 @@ public: private: XMLDocument( const XMLDocument& ); // not implemented + CharBuffer* charBuffer; }; - - }; // tinyxml2 + + #endif // TINYXML2_INCLUDED \ No newline at end of file diff --git a/tinyxml2.suo b/tinyxml2.suo index 05dfa1e4e28adca3ddcfc155da38435d99206c9b..345fd488d958a2bfef7449d0ae17aeed043095fa 100644 GIT binary patch delta 1971 zcmaJ?T})GF817+(9m;8UJl0aX4of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azeT=X5WMl9AQ{e8toCTKtGNI!ZH?pIt#0xUBj9o)J|2a;)r==e zKNejUcK?v>wQfHOttQmc18}?bEMq$&b|cP3b@;ti#AQ#EKZ&ccgZRW_qB>-M4Fr#q zpU0=tTe$4@QM54bd-asfPkUYX*ekM(7Oz6ARwhk{N81EO%#Kpng!%1x+Aftkl6W3be4lmr_``VY>4v}ChASN+>|K*9ZR%hx zuCyy9dvPHeEID<^c3P-cQJmdn#Ep=^7@Q30*Oa*<9>xlYYQ*g%1m zl*=JI^~_J9N;}21tLiz46GU;LwHbkkmGLEbELhq>L^xz$_!1gM-Er0nxsj%}7u(;* z_u(Nz^#+sFV#LmfmA%e)n@K7OxfD6flWvJsqUgj}S4Dsnm5vEiS)k+*@TkW^tRH2Z zN*M$EJqDs~q7GuF*N#eTj&)-`X2aKg$5y%|cT5jmr@&{iXHmhDn1 zFw~$_!f7K#_QO4Hp_6y3a|loN7}-gh3~BIiTpll3 z{`|@SGGlhH#4t)3H^X&hZy58LVWzA?#>Stf0XB`Z`)qt4eh9w?VIM`CI;=`^xcd6~ z>iX=rD*1a0%2(adq(=KIfxIZmcFXm=> gEFavd<>lg9=wJU%7V`_ZtqxX;her8oIoHSk2PFQeCIA2c diff --git a/tinyxml2/tinyxml2.vcxproj b/tinyxml2/tinyxml2.vcxproj index a12f535..d3716bd 100644 --- a/tinyxml2/tinyxml2.vcxproj +++ b/tinyxml2/tinyxml2.vcxproj @@ -49,7 +49,7 @@ Level3 Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) Console