WIP. syncing machines.

This commit is contained in:
Lee Thomason 2012-01-25 17:50:25 -08:00
parent 8ee79897c0
commit 857b868ca6
2 changed files with 20 additions and 0 deletions

View File

@ -608,6 +608,15 @@ const char* StringStack::Pop() {
XMLStreamer::XMLStreamer( FILE* file ) : fp( file ), depth( 0 ), elementJustOpened( false )
{
for( int i=0; i<ENTITY_RANGE; ++i ) {
entityFlag[i] = false;
}
for( int i=0; i<NUM_ENTITIES; ++i ) {
TIXMLASSERT( entities[i].value < ENTITY_RANGE );
if ( entities[i].value < ENTITY_RANGE ) {
entityFlag[ entities[i].value ] = true;
}
}
}
@ -619,6 +628,12 @@ void XMLStreamer::PrintSpace( int depth )
}
void XMLStreamer::PrintString( const char* )
{
}
void XMLStreamer::OpenElement( const char* name, bool textParent )
{
if ( elementJustOpened ) {

View File

@ -295,10 +295,15 @@ public:
private:
void SealElement();
void PrintSpace( int depth );
void PrintString( const char* ); // prints out, after detecting entities.
FILE* fp;
int depth;
bool elementJustOpened;
enum {
ENTITY_RANGE = 64,
};
bool entityFlag[ENTITY_RANGE];
StringStack stack;
StringStack text;