diff --git a/stepmania/src/Bookkeeper.cpp b/stepmania/src/Bookkeeper.cpp index af7210edcf..113a554945 100644 --- a/stepmania/src/Bookkeeper.cpp +++ b/stepmania/src/Bookkeeper.cpp @@ -85,7 +85,7 @@ void Bookkeeper::LoadFromNode( const XNode *pNode ) } int iCoins; - day->GetValue( iCoins ); + day->GetTextValue( iCoins ); m_mapCoinsForHour[d] = iCoins; } @@ -108,7 +108,7 @@ XNode* Bookkeeper::CreateNode() const pDay->AppendAttr( "Year", d.m_iYear ); int iCoins = it->second; - pDay->SetValue( iCoins ); + pDay->SetTextValue( iCoins ); } } diff --git a/stepmania/src/ExportStrings.cpp b/stepmania/src/ExportStrings.cpp index 4a9a08d364..eea6d03b95 100644 --- a/stepmania/src/ExportStrings.cpp +++ b/stepmania/src/ExportStrings.cpp @@ -54,10 +54,10 @@ void ExportStrings::LuaInformation() pNode->AppendAttr( "xsi:schemaLocation", "http://www.stepmania.com Lua.xsd" ); XNode *pVersionNode = pNode->AppendChild( "Version" ); - pVersionNode->SetValue( PRODUCT_ID_VER ); + pVersionNode->SetTextValue( PRODUCT_ID_VER ); XNode *pDateNode = pNode->AppendChild( "Date" ); - pDateNode->SetValue( DateTime::GetNowDate().GetString() ); + pDateNode->SetTextValue( DateTime::GetNowDate().GetString() ); XmlFileUtil::SaveToFile( pNode, "Lua.xml", "Lua.xsl" ); diff --git a/stepmania/src/HighScore.cpp b/stepmania/src/HighScore.cpp index 0b6ea7b729..448b89de13 100644 --- a/stepmania/src/HighScore.cpp +++ b/stepmania/src/HighScore.cpp @@ -308,12 +308,12 @@ void HighScoreList::LoadFromNode( const XNode* pHighScoreList ) { if( p->GetName() == "NumTimesPlayed" ) { - p->GetValue( iNumTimesPlayed ); + p->GetTextValue( iNumTimesPlayed ); } else if( p->GetName() == "LastPlayed" ) { RString s; - p->GetValue( s ); + p->GetTextValue( s ); dtLastPlayed.FromString( s ); } else if( p->GetName() == "HighScore" ) diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 107beaaa21..08f48ba32a 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -1109,7 +1109,7 @@ XNode* Profile::SaveGeneralDataCreateNode() const int iNumPlays = iter->second; XNode *pStyleNode = s.CreateNode(); - pStyleNode->SetValue( iNumPlays ); + pStyleNode->SetTextValue( iNumPlays ); pNumSongsPlayedByStyle->AppendChild( pStyleNode ); } @@ -1242,7 +1242,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode ) { FOREACH_CONST_Child( pDefaultModifiers, game_type ) { - game_type->GetValue( m_sDefaultModifiers[game_type->GetName()] ); + game_type->GetTextValue( m_sDefaultModifiers[game_type->GetName()] ); } } } @@ -1282,7 +1282,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode ) if( !s.IsValid() ) WARN_AND_CONTINUE; - style->GetValue( m_iNumSongsPlayedByStyle[s] ); + style->GetTextValue( m_iNumSongsPlayedByStyle[s] ); } } } @@ -1673,7 +1673,7 @@ void Profile::LoadCalorieDataFromNode( const XNode* pCalorieData ) float fCaloriesBurned = 0; - pCaloriesBurned->GetValue(fCaloriesBurned); + pCaloriesBurned->GetTextValue(fCaloriesBurned); m_mapDayToCaloriesBurned[date].fCals = fCaloriesBurned; } diff --git a/stepmania/src/Workout.cpp b/stepmania/src/Workout.cpp index eaacdfc49f..49f750974e 100644 --- a/stepmania/src/Workout.cpp +++ b/stepmania/src/Workout.cpp @@ -191,7 +191,7 @@ bool Workout::LoadFromFile( RString sFile ) if( songGenre->GetName() == "SongGenre" ) { RString s; - songGenre->GetValue( s ); + songGenre->GetTextValue( s ); m_vsSongGenres.push_back( s ); } } diff --git a/stepmania/src/XmlFile.h b/stepmania/src/XmlFile.h index 9d32d2a124..2d176bd329 100644 --- a/stepmania/src/XmlFile.h +++ b/stepmania/src/XmlFile.h @@ -92,14 +92,14 @@ public: void SetName( const RString &sName ) { m_sName = sName; } const RString &GetName() const { return m_sName; } - const XNodeValue *GetValue() const { return m_pValue; } - XNodeValue *GetValue() { return m_pValue; } - void SetValueFrom( XNodeValue *pValue ) { delete m_pValue; m_pValue = pValue; } + const XNodeValue *GetTextValue() const { return m_pValue; } + XNodeValue *GetTextValue() { return m_pValue; } + void SetTextValueFrom( XNodeValue *pValue ) { delete m_pValue; m_pValue = pValue; } template - void GetValue( T &out ) const { m_pValue->GetValue(out); } + void GetTextValue( T &out ) const { m_pValue->GetValue(out); } template - void SetValue( const T val ) { m_pValue->SetValue(val); } + void SetTextValue( const T val ) { m_pValue->SetValue(val); } // in own attribute list const XNodeValue *GetAttr( const RString &sAttrName ) const; @@ -112,12 +112,12 @@ public: const XNode *GetChild( const RString &sName ) const; XNode *GetChild( const RString &sName ); template - bool GetChildValue( const RString &sName, T &out ) const { const XNode *pChild=GetChild(sName); if(pChild==NULL) return false; pChild->GetValue(out); return true; } + bool GetChildValue( const RString &sName, T &out ) const { const XNode *pChild=GetChild(sName); if(pChild==NULL) return false; pChild->GetTextValue(out); return true; } bool PushChildValue( lua_State *L, const RString &sName ) const; // modify DOM template - XNode *AppendChild( const RString &sName, T value ) { XNode *p=new XNode(sName); p->SetValue(value); return AppendChild(p); } + XNode *AppendChild( const RString &sName, T value ) { XNode *p=new XNode(sName); p->SetTextValue(value); return AppendChild(p); } XNode *AppendChild( const RString &sName ) { XNode *p=new XNode(sName); return AppendChild(p); } XNode *AppendChild( XNode *node ); bool RemoveChild( XNode *node, bool bDelete = true ); diff --git a/stepmania/src/XmlFileUtil.cpp b/stepmania/src/XmlFileUtil.cpp index c0d5483d6a..33722f8956 100644 --- a/stepmania/src/XmlFileUtil.cpp +++ b/stepmania/src/XmlFileUtil.cpp @@ -293,7 +293,7 @@ unsigned LoadInternal( XNode *pNode, const RString &xml, RString &sErrorOut, uns // open/close tag ... // ^- current pointer - if( XIsEmptyString(pNode->GetValue()->GetValue()) ) + if( XIsEmptyString(pNode->GetTextValue()->GetValue()) ) { // Text Value ++iOffset; @@ -312,7 +312,7 @@ unsigned LoadInternal( XNode *pNode, const RString &xml, RString &sErrorOut, uns iOffset = iEnd; ReplaceEntityText( sValue, g_mapEntitiesToChars ); - pNode->SetValue( sValue ); + pNode->SetTextValue( sValue ); } // generate child nodes @@ -377,7 +377,7 @@ unsigned LoadInternal( XNode *pNode, const RString &xml, RString &sErrorOut, uns } else // Alone child Tag Loaded { - if( XIsEmptyString(pNode->GetValue()->GetValue()) && iOffset < xml.size() && xml[iOffset] != chXMLTagOpen ) + if( XIsEmptyString(pNode->GetTextValue()->GetValue()) && iOffset < xml.size() && xml[iOffset] != chXMLTagOpen ) { // Text Value unsigned iEnd = xml.find( chXMLTagOpen, iOffset ); @@ -394,7 +394,7 @@ unsigned LoadInternal( XNode *pNode, const RString &xml, RString &sErrorOut, uns iOffset = iEnd; ReplaceEntityText( sValue, g_mapEntitiesToChars ); - pNode->SetValue( sValue ); + pNode->SetTextValue( sValue ); } } } @@ -428,7 +428,7 @@ bool GetXMLInternal( const XNode *pNode, RageFileBasic &f, bool bWriteTabs, int WRITE( "' " ); } - if( pNode->m_childs.empty() && pNode->GetValue()->GetValue().empty() ) + if( pNode->m_childs.empty() && pNode->GetTextValue()->GetValue().empty() ) { // alone tag WRITE( "/>" ); @@ -446,7 +446,7 @@ bool GetXMLInternal( const XNode *pNode, RageFileBasic &f, bool bWriteTabs, int return false; // Text Value - if( !pNode->GetValue()->GetValue().empty() ) + if( !pNode->GetTextValue()->GetValue().empty() ) { if( !pNode->m_childs.empty() ) { @@ -456,7 +456,7 @@ bool GetXMLInternal( const XNode *pNode, RageFileBasic &f, bool bWriteTabs, int WRITE( "\t" ); } RString s; - pNode->GetValue( s ); + pNode->GetTextValue( s ); ReplaceEntityText( s, g_mapCharsToEntities ); WRITE( s ); } @@ -617,8 +617,8 @@ void XmlFileUtil::CompileXNodeTree( XNode *pNode, const RString &sFile ) FOREACH_Child( pNode, pChild ) aToCompile.push_back( pChild ); - XNodeValue *pValue = CompileXMLNodeValue( L, pNode->GetName(), pNode->GetValue(), sFile ); - pNode->SetValueFrom( pValue ); + XNodeValue *pValue = CompileXMLNodeValue( L, pNode->GetName(), pNode->GetTextValue(), sFile ); + pNode->SetTextValueFrom( pValue ); FOREACH_Attr( pNode, pAttr ) { @@ -642,7 +642,7 @@ namespace XNodeLuaValue *pValue = new XNodeLuaValue; lua_pushvalue( L, -1 ); pValue->SetValueFromStack( L ); - pNode->SetValueFrom( pValue ); + pNode->SetTextValueFrom( pValue ); } /* Iterate over the table, pulling out attributes and tables to process. */