add GetXML overload for convenience
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
#include "XmlFile.h"
|
||||
#include "BackgroundUtil.h"
|
||||
#include "song.h"
|
||||
#include "RageFileDriverMemory.h"
|
||||
|
||||
ThemeMetric<float> LEFT_EDGE ("Background","LeftEdge");
|
||||
ThemeMetric<float> TOP_EDGE ("Background","TopEdge");
|
||||
@@ -768,9 +767,7 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus
|
||||
if( iter == m_BGAnimations.end() )
|
||||
{
|
||||
XNode *pNode = change.m_def.CreateNode();
|
||||
RageFileObjMem f;
|
||||
pNode->GetXML( f, NULL );
|
||||
LOG->Warn( "Tried to switch to a background that was never loaded\n" + f.GetString() );
|
||||
LOG->Warn( "Tried to switch to a background that was never loaded\n" + pNode->GetXML() );
|
||||
SAFE_DELETE( pNode );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "DateTime.h"
|
||||
#include "Foreach.h"
|
||||
#include "arch/Dialog/Dialog.h"
|
||||
#include "RageFileDriverMemory.h"
|
||||
|
||||
|
||||
static const char chXMLTagOpen = '<';
|
||||
@@ -613,6 +614,22 @@ bool XNode::GetXML( RageFileBasic &f, DISP_OPT *opt ) const
|
||||
return true;
|
||||
}
|
||||
|
||||
//========================================================
|
||||
// Name : GetXML
|
||||
// Desc : convert plain xml text from parsed xml node
|
||||
// Param :
|
||||
// Return : converted plain string
|
||||
//--------------------------------------------------------
|
||||
// Coder Date Desc
|
||||
// bro 2002-10-29
|
||||
//========================================================
|
||||
CString XNode::GetXML() const
|
||||
{
|
||||
RageFileObjMem f;
|
||||
GetXML( f, NULL );
|
||||
return f.GetString();
|
||||
}
|
||||
|
||||
//========================================================
|
||||
// Name : GetValue
|
||||
// Desc :
|
||||
|
||||
@@ -170,6 +170,7 @@ struct XNode
|
||||
char* Load( const char* pszXml, PARSEINFO *pi );
|
||||
char* LoadAttributes( const char* pszAttrs, PARSEINFO *pi );
|
||||
bool GetXML( RageFileBasic &f, DISP_OPT *opt ) const;
|
||||
CString GetXML() const;
|
||||
|
||||
bool LoadFromFile( const CString &sFile );
|
||||
bool LoadFromFile( RageFileBasic &f );
|
||||
|
||||
Reference in New Issue
Block a user