From ef5e980ae9ab4ddb47e79783455b78de4b90366a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 7 Nov 2007 22:30:49 +0000 Subject: Changed the way the Taf data is interpreted, anonymous properties now have no name, but have a value, I did it the other way last time, and they were hard to find. I think I fixed the writer to work right too, but I haven't checked it yet. --- src/tafreader.cpp | 2 +- src/tafwriter.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tafreader.cpp b/src/tafreader.cpp index 0d28cd0..6441ac3 100644 --- a/src/tafreader.cpp +++ b/src/tafreader.cpp @@ -63,7 +63,7 @@ Bu::TafProperty *Bu::TafReader::readProperty() if( c != '=' ) { //printf(" %s (true)\n", sName.getStr() ); - return new Bu::TafProperty( sName, "" ); + return new Bu::TafProperty( "", sName ); } next(); FString sValue = readStr(); diff --git a/src/tafwriter.cpp b/src/tafwriter.cpp index fe29490..b5690fc 100644 --- a/src/tafwriter.cpp +++ b/src/tafwriter.cpp @@ -49,12 +49,16 @@ void Bu::TafWriter::writeGroup( const Bu::TafGroup *pRoot ) void Bu::TafWriter::writeProperty( const Bu::TafProperty *pProp ) { ident(); - writeString( pProp->getName() ); - if( pProp->getValue().getStr() != NULL ) + if( pProp->getName().getStr() != NULL && pProp->getName() != "" ) { + writeString( pProp->getName() ); sOut.write("=", 1 ); writeString( pProp->getValue() ); } + else + { + writeString( pProp->getValue() ); + } sOut.write("\n", 1 ); } -- cgit v1.2.3