aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/logger.cpp3
-rw-r--r--src/tafnode.cpp13
-rw-r--r--src/tafnode.h2
3 files changed, 18 insertions, 0 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index af529f5..8cba1b9 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -155,6 +155,9 @@ void Bu::Logger::hexDump( uint32_t nLevel, const char *sFile,
155 const char *sFunction, int nLine, const void *pDataV, long nDataLen, 155 const char *sFunction, int nLine, const void *pDataV, long nDataLen,
156 const char *lpName ) 156 const char *lpName )
157{ 157{
158 if( (nLevel&nLevelMask) == 0 )
159 return;
160
158 log( nLevel, sFile, sFunction, nLine, "Displaying %ld bytes of %s.", nDataLen, lpName ); 161 log( nLevel, sFile, sFunction, nLine, "Displaying %ld bytes of %s.", nDataLen, lpName );
159 const unsigned char *pData = (const unsigned char *)pDataV; 162 const unsigned char *pData = (const unsigned char *)pDataV;
160 int j = 0; 163 int j = 0;
diff --git a/src/tafnode.cpp b/src/tafnode.cpp
index 6883b97..bdd96d7 100644
--- a/src/tafnode.cpp
+++ b/src/tafnode.cpp
@@ -127,6 +127,19 @@ const Bu::FString &Bu::TafGroup::getProperty( const Bu::FString &sName ) const
127 return hProp.get( sName ).first(); 127 return hProp.get( sName ).first();
128} 128}
129 129
130const Bu::FString &Bu::TafGroup::getProperty( const Bu::FString &sName,
131 const Bu::FString &sDef ) const
132{
133 try
134 {
135 return getProperty( sName );
136 }
137 catch( Bu::HashException &e )
138 {
139 return sDef;
140 }
141}
142
130Bu::TafProperty::TafProperty( const Bu::FString &sName, const Bu::FString &sValue ) : 143Bu::TafProperty::TafProperty( const Bu::FString &sName, const Bu::FString &sValue ) :
131 TafNode( typeProperty ), 144 TafNode( typeProperty ),
132 sName( sName ), 145 sName( sName ),
diff --git a/src/tafnode.h b/src/tafnode.h
index d76fae9..9f80781 100644
--- a/src/tafnode.h
+++ b/src/tafnode.h
@@ -61,6 +61,8 @@ namespace Bu
61 void setName( const Bu::FString &sName ); 61 void setName( const Bu::FString &sName );
62 62
63 const Bu::FString &getProperty( const Bu::FString &sName ) const; 63 const Bu::FString &getProperty( const Bu::FString &sName ) const;
64 const Bu::FString &getProperty( const Bu::FString &sName,
65 const Bu::FString &sDef ) const;
64 const PropList &getProperties( const Bu::FString &sName ) const; 66 const PropList &getProperties( const Bu::FString &sName ) const;
65 const TafGroup *getChild( const Bu::FString &sName ) const; 67 const TafGroup *getChild( const Bu::FString &sName ) const;
66 const GroupList &getChildren( const Bu::FString &sName ) const; 68 const GroupList &getChildren( const Bu::FString &sName ) const;