diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-11-07 22:30:49 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-11-07 22:30:49 +0000 |
commit | ef5e980ae9ab4ddb47e79783455b78de4b90366a (patch) | |
tree | 1c5b436737f4c56d73e95d2366f08a0eaf36af37 /src | |
parent | 72c44ec415ac3e2e4058a0104de28625101d5017 (diff) | |
download | libbu++-ef5e980ae9ab4ddb47e79783455b78de4b90366a.tar.gz libbu++-ef5e980ae9ab4ddb47e79783455b78de4b90366a.tar.bz2 libbu++-ef5e980ae9ab4ddb47e79783455b78de4b90366a.tar.xz libbu++-ef5e980ae9ab4ddb47e79783455b78de4b90366a.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/tafreader.cpp | 2 | ||||
-rw-r--r-- | 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() | |||
63 | if( c != '=' ) | 63 | if( c != '=' ) |
64 | { | 64 | { |
65 | //printf(" %s (true)\n", sName.getStr() ); | 65 | //printf(" %s (true)\n", sName.getStr() ); |
66 | return new Bu::TafProperty( sName, "" ); | 66 | return new Bu::TafProperty( "", sName ); |
67 | } | 67 | } |
68 | next(); | 68 | next(); |
69 | FString sValue = readStr(); | 69 | 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 ) | |||
49 | void Bu::TafWriter::writeProperty( const Bu::TafProperty *pProp ) | 49 | void Bu::TafWriter::writeProperty( const Bu::TafProperty *pProp ) |
50 | { | 50 | { |
51 | ident(); | 51 | ident(); |
52 | writeString( pProp->getName() ); | 52 | if( pProp->getName().getStr() != NULL && pProp->getName() != "" ) |
53 | if( pProp->getValue().getStr() != NULL ) | ||
54 | { | 53 | { |
54 | writeString( pProp->getName() ); | ||
55 | sOut.write("=", 1 ); | 55 | sOut.write("=", 1 ); |
56 | writeString( pProp->getValue() ); | 56 | writeString( pProp->getValue() ); |
57 | } | 57 | } |
58 | else | ||
59 | { | ||
60 | writeString( pProp->getValue() ); | ||
61 | } | ||
58 | sOut.write("\n", 1 ); | 62 | sOut.write("\n", 1 ); |
59 | } | 63 | } |
60 | 64 | ||