Replace std::auto_ptr with boost::scoped_ptr
This commit is contained in:
parent
cf4066b9ef
commit
b34f57b879
|
@ -18,7 +18,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "associatedialog.h"
|
#include "associatedialog.h"
|
||||||
#include "wraplibxml.h"
|
#include "wraplibxml.h"
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ void AssociateDialog::OnBrowse ( wxCommandEvent& e )
|
||||||
wxString dir = fileName.GetPath();
|
wxString dir = fileName.GetPath();
|
||||||
if ( dir.empty() && mLastDir )
|
if ( dir.empty() && mLastDir )
|
||||||
dir = *mLastDir;
|
dir = *mLastDir;
|
||||||
std::auto_ptr<wxFileDialog> fd ( new wxFileDialog (
|
boost::scoped_ptr<wxFileDialog> fd ( new wxFileDialog (
|
||||||
this,
|
this,
|
||||||
_ ( "Select " ) + type,
|
_ ( "Select " ) + type,
|
||||||
dir,
|
dir,
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
#include "catalogresolver.h"
|
#include "catalogresolver.h"
|
||||||
|
|
||||||
CatalogResolver::CatalogResolver()
|
CatalogResolver::CatalogResolver()
|
||||||
|
@ -33,6 +32,5 @@ wxString CatalogResolver::catalogResolve (
|
||||||
const wxString &publicId,
|
const wxString &publicId,
|
||||||
const wxString &systemId )
|
const wxString &systemId )
|
||||||
{
|
{
|
||||||
//std::auto_ptr<WrapLibxml> libxml ( new WrapLibxml ( false, catalogPath ) );
|
|
||||||
return WrapLibxml::catalogResolve ( publicId, systemId );
|
return WrapLibxml::catalogResolve ( publicId, systemId );
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "globalreplacedialog.h"
|
#include "globalreplacedialog.h"
|
||||||
#include "wrapregex.h"
|
#include "wrapregex.h"
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ void GlobalReplaceDialog::OnOk ( wxCommandEvent& e )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
std::auto_ptr<WrapRegex> wr ( new WrapRegex (
|
boost::scoped_ptr<WrapRegex> wr ( new WrapRegex (
|
||||||
findUtf8,
|
findUtf8,
|
||||||
matchCase,
|
matchCase,
|
||||||
replaceUtf8 ) );
|
replaceUtf8 ) );
|
||||||
|
|
|
@ -137,7 +137,7 @@ void HouseStyle::collectRules ( const std::string& fileName,
|
||||||
if ( !ReadFile::run ( filePath, buffer ) )
|
if ( !ReadFile::run ( filePath, buffer ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::auto_ptr<XmlRuleReader> xrr ( new XmlRuleReader (
|
boost::scoped_ptr<XmlRuleReader> xrr ( new XmlRuleReader (
|
||||||
dictionary,
|
dictionary,
|
||||||
passiveDictionary,
|
passiveDictionary,
|
||||||
ruleVector ) );
|
ruleVector ) );
|
||||||
|
|
|
@ -25,8 +25,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <expat.h>
|
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -50,7 +49,7 @@ class HouseStyleReader : public WrapExpat
|
||||||
virtual ~HouseStyleReader();
|
virtual ~HouseStyleReader();
|
||||||
void getNodeVector ( vector<pair<string, unsigned> > &v );
|
void getNodeVector ( vector<pair<string, unsigned> > &v );
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<HouseStyleReaderData> ud;
|
boost::scoped_ptr<HouseStyleReaderData> ud;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
STATE_UNKNOWN,
|
STATE_UNKNOWN,
|
||||||
|
|
|
@ -23,8 +23,7 @@
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <expat.h>
|
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
#include "wrapregex.h"
|
#include "wrapregex.h"
|
||||||
#include "contexthandler.h"
|
#include "contexthandler.h"
|
||||||
|
@ -45,7 +44,7 @@ class HouseStyleWriter : public WrapExpat
|
||||||
~HouseStyleWriter();
|
~HouseStyleWriter();
|
||||||
string getOutput();
|
string getOutput();
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<HouseStyleWriterData> hswd;
|
boost::scoped_ptr<HouseStyleWriterData> hswd;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
STATE_UNKNOWN,
|
STATE_UNKNOWN,
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct Mp3AlbumData : public ParserData
|
struct Mp3AlbumData : public ParserData
|
||||||
|
@ -44,7 +44,7 @@ class Mp3Album : public WrapExpat
|
||||||
void getFileNameVector ( std::vector<std::pair<std::string, std::string> >& v );
|
void getFileNameVector ( std::vector<std::pair<std::string, std::string> >& v );
|
||||||
std::string getAlbumTitle();
|
std::string getAlbumTitle();
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<Mp3AlbumData> d;
|
boost::scoped_ptr<Mp3AlbumData> d;
|
||||||
static void XMLCALL start ( void *data, const XML_Char *el, const XML_Char **attr );
|
static void XMLCALL start ( void *data, const XML_Char *el, const XML_Char **attr );
|
||||||
static void XMLCALL end ( void *data, const XML_Char *el );
|
static void XMLCALL end ( void *data, const XML_Char *el );
|
||||||
static void XMLCALL characterdata ( void *data, const XML_Char *s, int len );
|
static void XMLCALL characterdata ( void *data, const XML_Char *s, int len );
|
||||||
|
|
|
@ -385,7 +385,7 @@ StyleDialog::~StyleDialog()
|
||||||
|
|
||||||
void StyleDialog::OnColumnClick ( wxListEvent& event )
|
void StyleDialog::OnColumnClick ( wxListEvent& event )
|
||||||
{
|
{
|
||||||
std::auto_ptr<SortData> data ( new SortData );
|
boost::scoped_ptr<SortData> data ( new SortData );
|
||||||
data->column = event.GetColumn();
|
data->column = event.GetColumn();
|
||||||
data->table = table;
|
data->table = table;
|
||||||
table->SortItems ( MyCompareFunction, ( wxIntPtr ) data.get() );
|
table->SortItems ( MyCompareFunction, ( wxIntPtr ) data.get() );
|
||||||
|
@ -457,7 +457,7 @@ void StyleDialog::OnReport ( wxCommandEvent& event )
|
||||||
|
|
||||||
wxString separator = wxFileName::GetPathSeparator();
|
wxString separator = wxFileName::GetPathSeparator();
|
||||||
|
|
||||||
std::auto_ptr<HouseStyle> hs ( new HouseStyle (
|
boost::scoped_ptr<HouseStyle> hs ( new HouseStyle (
|
||||||
(type == ID_TYPE_SPELL) ? HS_TYPE_SPELL : HS_TYPE_STYLE,
|
(type == ID_TYPE_SPELL) ? HS_TYPE_SPELL : HS_TYPE_STYLE,
|
||||||
bufferUtf8,
|
bufferUtf8,
|
||||||
ruleSetDirectory,
|
ruleSetDirectory,
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
|
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#include <wx/textbuf.h>
|
#include <wx/textbuf.h>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "xmlctrl.h"
|
#include "xmlctrl.h"
|
||||||
#include "validationthread.h"
|
#include "validationthread.h"
|
||||||
#include "wrapxerces.h"
|
#include "wrapxerces.h"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <memory>
|
|
||||||
#include "threadreaper.h"
|
#include "threadreaper.h"
|
||||||
|
|
||||||
extern wxCriticalSection xmlcopyeditorCriticalSection;
|
extern wxCriticalSection xmlcopyeditorCriticalSection;
|
||||||
|
@ -51,7 +51,7 @@ ValidationThread::ValidationThread (
|
||||||
|
|
||||||
void *ValidationThread::Entry()
|
void *ValidationThread::Entry()
|
||||||
{
|
{
|
||||||
std::auto_ptr<WrapXerces> validator ( new WrapXerces() );
|
boost::scoped_ptr<WrapXerces> validator ( new WrapXerces() );
|
||||||
|
|
||||||
if ( TestDestroy() )
|
if ( TestDestroy() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,7 +93,7 @@ bool WrapDaisy::run (
|
||||||
fileIn.Replace ( _T("\\"), _T("/") );
|
fileIn.Replace ( _T("\\"), _T("/") );
|
||||||
stylesheet.Replace ( _T("\\"), _T("/") );
|
stylesheet.Replace ( _T("\\"), _T("/") );
|
||||||
|
|
||||||
std::auto_ptr<wxProgressDialog> pd ( new wxProgressDialog (
|
boost::scoped_ptr<wxProgressDialog> pd ( new wxProgressDialog (
|
||||||
_ ( "Export in progress" ),
|
_ ( "Export in progress" ),
|
||||||
_ ( "Initializing..." ),
|
_ ( "Initializing..." ),
|
||||||
100,
|
100,
|
||||||
|
@ -186,7 +186,7 @@ bool WrapDaisy::run (
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto_ptr<XmlSuppressProdnote> xsp ( new XmlSuppressProdnote() );
|
boost::scoped_ptr<XmlSuppressProdnote> xsp ( new XmlSuppressProdnote() );
|
||||||
if ( !xsp->parse ( output.c_str() ) )
|
if ( !xsp->parse ( output.c_str() ) )
|
||||||
{
|
{
|
||||||
frame->newDocument ( output );
|
frame->newDocument ( output );
|
||||||
|
@ -212,7 +212,7 @@ bool WrapDaisy::run (
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto_ptr<XmlProdnote> xp ( new XmlProdnote() );
|
boost::scoped_ptr<XmlProdnote> xp ( new XmlProdnote() );
|
||||||
if ( !xp->parse ( output.c_str() ) )
|
if ( !xp->parse ( output.c_str() ) )
|
||||||
{
|
{
|
||||||
frame->newDocument ( output );
|
frame->newDocument ( output );
|
||||||
|
@ -298,7 +298,7 @@ bool WrapDaisy::run (
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto_ptr<XmlCopyImg> xci (
|
boost::scoped_ptr<XmlCopyImg> xci (
|
||||||
new XmlCopyImg ( blankImage, imagesDir, mediaDir, path )
|
new XmlCopyImg ( blankImage, imagesDir, mediaDir, path )
|
||||||
);
|
);
|
||||||
if ( !xci->parse ( output.c_str() ) )
|
if ( !xci->parse ( output.c_str() ) )
|
||||||
|
@ -744,7 +744,7 @@ bool WrapDaisy::run (
|
||||||
_T("z3986") + wxFileName::GetPathSeparator();
|
_T("z3986") + wxFileName::GetPathSeparator();
|
||||||
fileWithSmilAttribs = folderWithSmilFile + fn.GetFullName();
|
fileWithSmilAttribs = folderWithSmilFile + fn.GetFullName();
|
||||||
|
|
||||||
auto_ptr<Mp3Album> ma ( new Mp3Album() );
|
boost::scoped_ptr<Mp3Album> ma ( new Mp3Album() );
|
||||||
|
|
||||||
BinaryFile *binaryfile;
|
BinaryFile *binaryfile;
|
||||||
binaryfile = new BinaryFile ( fileWithSmilAttribs );
|
binaryfile = new BinaryFile ( fileWithSmilAttribs );
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
|
||||||
using namespace xercesc;
|
using namespace xercesc;
|
||||||
|
@ -94,7 +95,7 @@ bool WrapXerces::validateMemory (
|
||||||
const wxChar *messageEOL /*= _T("[br]")*/)
|
const wxChar *messageEOL /*= _T("[br]")*/)
|
||||||
{
|
{
|
||||||
#if 0 // Test DOM parser
|
#if 0 // Test DOM parser
|
||||||
std::auto_ptr<XercesDOMParser> parser ( new XercesDOMParser() );
|
boost::scoped_ptr<XercesDOMParser> parser ( new XercesDOMParser() );
|
||||||
|
|
||||||
parser->setDoNamespaces(true);
|
parser->setDoNamespaces(true);
|
||||||
parser->setExitOnFirstFatalError(true);
|
parser->setExitOnFirstFatalError(true);
|
||||||
|
@ -105,7 +106,7 @@ bool WrapXerces::validateMemory (
|
||||||
parser->setValidationSchemaFullChecking(true);
|
parser->setValidationSchemaFullChecking(true);
|
||||||
parser->setCreateCommentNodes(false);
|
parser->setCreateCommentNodes(false);
|
||||||
#else
|
#else
|
||||||
std::auto_ptr<SAX2XMLReader> parser ( XMLReaderFactory::createXMLReader() );
|
boost::scoped_ptr<SAX2XMLReader> parser ( XMLReaderFactory::createXMLReader() );
|
||||||
|
|
||||||
parser->setFeature ( XMLUni::fgSAX2CoreNameSpaces, true );
|
parser->setFeature ( XMLUni::fgSAX2CoreNameSpaces, true );
|
||||||
parser->setFeature ( XMLUni::fgSAX2CoreValidation, true );
|
parser->setFeature ( XMLUni::fgSAX2CoreValidation, true );
|
||||||
|
@ -125,7 +126,7 @@ bool WrapXerces::validateMemory (
|
||||||
|
|
||||||
mySAX2Handler.setEOL ( messageEOL );
|
mySAX2Handler.setEOL ( messageEOL );
|
||||||
|
|
||||||
std::auto_ptr<InputSource> source;
|
boost::scoped_ptr<InputSource> source;
|
||||||
if ( utf8Buffer != NULL )
|
if ( utf8Buffer != NULL )
|
||||||
{
|
{
|
||||||
source.reset ( new MemBufInputSource ( (XMLByte*) utf8Buffer, len,
|
source.reset ( new MemBufInputSource ( (XMLByte*) utf8Buffer, len,
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "xmltextinfo.h"
|
#include "xmltextinfo.h"
|
||||||
|
|
||||||
struct DtdData : public ParserData
|
struct DtdData : public ParserData
|
||||||
|
@ -49,7 +49,7 @@ class XmlAssociateDtd : public WrapExpat
|
||||||
return d->buffer;
|
return d->buffer;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<DtdData> d;
|
boost::scoped_ptr<DtdData> d;
|
||||||
const XmlTextInfo &mInfo;
|
const XmlTextInfo &mInfo;
|
||||||
static void XMLCALL start (
|
static void XMLCALL start (
|
||||||
void *data,
|
void *data,
|
||||||
|
|
|
@ -42,7 +42,7 @@ XmlAssociateXsd::XmlAssociateXsd (
|
||||||
XML_SetDefaultHandlerExpand ( p, defaulthandler );
|
XML_SetDefaultHandlerExpand ( p, defaulthandler );
|
||||||
XML_SetUserData ( p, this );
|
XML_SetUserData ( p, this );
|
||||||
|
|
||||||
std::auto_ptr<XmlParseSchemaNs> parser ( new XmlParseSchemaNs() );
|
boost::scoped_ptr<XmlParseSchemaNs> parser ( new XmlParseSchemaNs() );
|
||||||
std::string normalisedPath, buffer;
|
std::string normalisedPath, buffer;
|
||||||
normalisedPath = path.mb_str ( wxConvLocal );
|
normalisedPath = path.mb_str ( wxConvLocal );
|
||||||
if ( !ReadFile::run ( normalisedPath, buffer ) )
|
if ( !ReadFile::run ( normalisedPath, buffer ) )
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct AssociateXsdData : public ParserData
|
struct AssociateXsdData : public ParserData
|
||||||
|
@ -50,7 +50,7 @@ class XmlAssociateXsd : public WrapExpat
|
||||||
return d->buffer;
|
return d->buffer;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<AssociateXsdData> d;
|
boost::scoped_ptr<AssociateXsdData> d;
|
||||||
std::string encoding;
|
std::string encoding;
|
||||||
std::map<std::string, std::string> namespaceMap;
|
std::map<std::string, std::string> namespaceMap;
|
||||||
static void XMLCALL start (
|
static void XMLCALL start (
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "xmltextinfo.h"
|
#include "xmltextinfo.h"
|
||||||
|
|
||||||
struct XslData : public ParserData
|
struct XslData : public ParserData
|
||||||
|
@ -49,7 +49,7 @@ class XmlAssociateXsl : public WrapExpat
|
||||||
return d->buffer;
|
return d->buffer;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<XslData> d;
|
boost::scoped_ptr<XslData> d;
|
||||||
const XmlTextInfo &mInfo;
|
const XmlTextInfo &mInfo;
|
||||||
static void XMLCALL start (
|
static void XMLCALL start (
|
||||||
void *data,
|
void *data,
|
||||||
|
|
|
@ -2137,14 +2137,10 @@ void MyFrame::OnFind ( wxCommandEvent& WXUNUSED ( event ) )
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( findDialog.get() )
|
findDialog.reset ( new wxFindReplaceDialog (
|
||||||
{
|
|
||||||
findDialog = std::auto_ptr<wxFindReplaceDialog> ( 0 );
|
|
||||||
}
|
|
||||||
findDialog = ( std::auto_ptr<wxFindReplaceDialog> ( new wxFindReplaceDialog (
|
|
||||||
this,
|
this,
|
||||||
&findData,
|
&findData,
|
||||||
_ ( "Find" ) ) ) );
|
_ ( "Find" ) ) );
|
||||||
findDialog->Show();
|
findDialog->Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2155,7 +2151,7 @@ void MyFrame::OnImportMSWord ( wxCommandEvent& event )
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::auto_ptr<wxFileDialog> fd ( new wxFileDialog (
|
boost::scoped_ptr<wxFileDialog> fd ( new wxFileDialog (
|
||||||
this,
|
this,
|
||||||
_ ( "Import Microsoft Word Document" ),
|
_ ( "Import Microsoft Word Document" ),
|
||||||
mLastDir,
|
mLastDir,
|
||||||
|
@ -2192,7 +2188,7 @@ void MyFrame::OnExport ( wxCommandEvent& event )
|
||||||
wxString testDir = applicationDir + wxFileName::GetPathSeparator() + _T ( "daisy" );
|
wxString testDir = applicationDir + wxFileName::GetPathSeparator() + _T ( "daisy" );
|
||||||
bool downloadLink = !wxDirExists ( testDir );
|
bool downloadLink = !wxDirExists ( testDir );
|
||||||
|
|
||||||
std::auto_ptr<ExportDialog> ed ( new ExportDialog (
|
boost::scoped_ptr<ExportDialog> ed ( new ExportDialog (
|
||||||
this,
|
this,
|
||||||
exportStylesheet,
|
exportStylesheet,
|
||||||
exportFolder,
|
exportFolder,
|
||||||
|
@ -2326,7 +2322,7 @@ void MyFrame::importMSWord ( const wxString& path )
|
||||||
|
|
||||||
if ( result != 5 ) // Word 2003 or later
|
if ( result != 5 ) // Word 2003 or later
|
||||||
{
|
{
|
||||||
std::auto_ptr<WrapLibxml> prettyPrinter ( new WrapLibxml ( libxmlNetAccess ) );
|
boost::scoped_ptr<WrapLibxml> prettyPrinter ( new WrapLibxml ( libxmlNetAccess ) );
|
||||||
prettyPrinter->parse ( tempFileName.wideName(), true );
|
prettyPrinter->parse ( tempFileName.wideName(), true );
|
||||||
buffer = prettyPrinter->getOutput();
|
buffer = prettyPrinter->getOutput();
|
||||||
displayBuffer = wxString ( buffer.c_str(), wxConvUTF8, buffer.size() );
|
displayBuffer = wxString ( buffer.c_str(), wxConvUTF8, buffer.size() );
|
||||||
|
@ -2386,7 +2382,7 @@ void MyFrame::OnExportMSWord ( wxCommandEvent& event )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::auto_ptr<wxFileDialog> fd ( new wxFileDialog (
|
boost::scoped_ptr<wxFileDialog> fd ( new wxFileDialog (
|
||||||
this,
|
this,
|
||||||
_ ( "Export Microsoft Word Document" ),
|
_ ( "Export Microsoft Word Document" ),
|
||||||
_T ( "" ),
|
_T ( "" ),
|
||||||
|
@ -2615,7 +2611,7 @@ void MyFrame::OnOptions ( wxCommandEvent& WXUNUSED ( event ) )
|
||||||
#else
|
#else
|
||||||
( _ ( "Preferences" ) );
|
( _ ( "Preferences" ) );
|
||||||
#endif
|
#endif
|
||||||
std::auto_ptr<MyPropertySheet> mpsd ( new MyPropertySheet (
|
boost::scoped_ptr<MyPropertySheet> mpsd ( new MyPropertySheet (
|
||||||
this,
|
this,
|
||||||
properties,
|
properties,
|
||||||
applicationDir,
|
applicationDir,
|
||||||
|
@ -2711,11 +2707,7 @@ void MyFrame::OnFindReplace ( wxCommandEvent& WXUNUSED ( event ) )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if ( findDialog.get() )
|
findDialog.reset ( new wxFindReplaceDialog (
|
||||||
{
|
|
||||||
findDialog = std::auto_ptr<wxFindReplaceDialog> ( 0 );
|
|
||||||
}
|
|
||||||
findDialog = std::auto_ptr<wxFindReplaceDialog> ( new wxFindReplaceDialog (
|
|
||||||
this,
|
this,
|
||||||
&findData,
|
&findData,
|
||||||
_ ( "Find and Replace" ),
|
_ ( "Find and Replace" ),
|
||||||
|
@ -2729,7 +2721,7 @@ void MyFrame::OnGlobalReplace ( wxCommandEvent& event )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
size_t flags = findData.GetFlags();
|
size_t flags = findData.GetFlags();
|
||||||
std::auto_ptr<GlobalReplaceDialog> grd ( new GlobalReplaceDialog (
|
boost::scoped_ptr<GlobalReplaceDialog> grd ( new GlobalReplaceDialog (
|
||||||
this,
|
this,
|
||||||
findData.GetFindString(),
|
findData.GetFindString(),
|
||||||
findData.GetReplaceString(),
|
findData.GetReplaceString(),
|
||||||
|
@ -2797,7 +2789,7 @@ void MyFrame::OnGlobalReplace ( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
std::auto_ptr<WrapRegex> wr ( new WrapRegex (
|
boost::scoped_ptr<WrapRegex> wr ( new WrapRegex (
|
||||||
( const char * ) findData.GetFindString().mb_str ( wxConvUTF8 ),
|
( const char * ) findData.GetFindString().mb_str ( wxConvUTF8 ),
|
||||||
flags & wxFR_MATCHCASE,
|
flags & wxFR_MATCHCASE,
|
||||||
( const char * ) findData.GetReplaceString().mb_str ( wxConvUTF8 ) ) );
|
( const char * ) findData.GetReplaceString().mb_str ( wxConvUTF8 ) ) );
|
||||||
|
@ -3271,7 +3263,7 @@ bool MyFrame::openFile ( const wxString &file, bool largeFile )
|
||||||
|
|
||||||
// NOW parse the document, but don't create a UTF-8 copy
|
// NOW parse the document, but don't create a UTF-8 copy
|
||||||
statusProgress ( _T ( "Parsing document..." ) );
|
statusProgress ( _T ( "Parsing document..." ) );
|
||||||
std::auto_ptr<WrapExpat> we ( new WrapExpat() );
|
boost::scoped_ptr<WrapExpat> we ( new WrapExpat() );
|
||||||
|
|
||||||
// omit XML declaration
|
// omit XML declaration
|
||||||
if ( !isUtf8 && finalBufferLen > 5 &&
|
if ( !isUtf8 && finalBufferLen > 5 &&
|
||||||
|
@ -3449,7 +3441,7 @@ void MyFrame::OnSpelling ( wxCommandEvent& event )
|
||||||
getRawText ( doc, rawBufferUtf8 );
|
getRawText ( doc, rawBufferUtf8 );
|
||||||
bool success = true; // always true for now: well-formedness not req'd
|
bool success = true; // always true for now: well-formedness not req'd
|
||||||
|
|
||||||
auto_ptr<StyleDialog> sd ( new StyleDialog (
|
boost::scoped_ptr<StyleDialog> sd ( new StyleDialog (
|
||||||
this,
|
this,
|
||||||
wxICON ( appicon ),
|
wxICON ( appicon ),
|
||||||
rawBufferUtf8,
|
rawBufferUtf8,
|
||||||
|
@ -3582,7 +3574,7 @@ void MyFrame::saveAs()
|
||||||
if ( defaultDir.empty() )
|
if ( defaultDir.empty() )
|
||||||
defaultDir = mLastDir;
|
defaultDir = mLastDir;
|
||||||
|
|
||||||
auto_ptr<wxFileDialog> fd ( new wxFileDialog (
|
boost::scoped_ptr<wxFileDialog> fd ( new wxFileDialog (
|
||||||
this,
|
this,
|
||||||
_ ( "Save As" ),
|
_ ( "Save As" ),
|
||||||
defaultDir,
|
defaultDir,
|
||||||
|
@ -3794,7 +3786,7 @@ void MyFrame::OnValidateDTD ( wxCommandEvent& event )
|
||||||
doc->clearErrorIndicators();
|
doc->clearErrorIndicators();
|
||||||
statusProgress ( _ ( "DTD Validation in progress..." ) );
|
statusProgress ( _ ( "DTD Validation in progress..." ) );
|
||||||
|
|
||||||
auto_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
boost::scoped_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
||||||
wxString fname = doc->getFullFileName();
|
wxString fname = doc->getFullFileName();
|
||||||
if ( !wl->validate ( doc->myGetTextRaw(), fname ) )
|
if ( !wl->validate ( doc->myGetTextRaw(), fname ) )
|
||||||
{
|
{
|
||||||
|
@ -3868,7 +3860,7 @@ void MyFrame::validateRelaxNG (
|
||||||
doc->clearErrorIndicators();
|
doc->clearErrorIndicators();
|
||||||
statusProgress ( _ ( "RELAX NG validation in progress..." ) );
|
statusProgress ( _ ( "RELAX NG validation in progress..." ) );
|
||||||
|
|
||||||
auto_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
boost::scoped_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
||||||
if ( !wl->validateRelaxNG ( schemaUrl, doc->myGetTextRaw(), fileName ) )
|
if ( !wl->validateRelaxNG ( schemaUrl, doc->myGetTextRaw(), fileName ) )
|
||||||
{
|
{
|
||||||
wxString wideError = wl->getLastError();
|
wxString wideError = wl->getLastError();
|
||||||
|
@ -3936,7 +3928,7 @@ void MyFrame::OnValidateSchema ( wxCommandEvent& event )
|
||||||
|
|
||||||
wxString fileName = doc->getFullFileName();
|
wxString fileName = doc->getFullFileName();
|
||||||
std::string utf8Buffer = doc->myGetTextRaw();
|
std::string utf8Buffer = doc->myGetTextRaw();
|
||||||
std::auto_ptr<WrapXerces> validator ( new WrapXerces() );
|
boost::scoped_ptr<WrapXerces> validator ( new WrapXerces() );
|
||||||
int severity;
|
int severity;
|
||||||
wxString message;
|
wxString message;
|
||||||
if ( validator->validateMemory ( utf8Buffer.c_str(), utf8Buffer.size(),
|
if ( validator->validateMemory ( utf8Buffer.c_str(), utf8Buffer.size(),
|
||||||
|
@ -4040,7 +4032,7 @@ void MyFrame::OnXPath ( wxCommandEvent& event )
|
||||||
if ( ( doc = getActiveDocument() ) == NULL )
|
if ( ( doc = getActiveDocument() ) == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto_ptr<wxTextEntryDialog> dlg ( new wxTextEntryDialog (
|
boost::scoped_ptr<wxTextEntryDialog> dlg ( new wxTextEntryDialog (
|
||||||
this,
|
this,
|
||||||
_ ( "Enter XPath:" ),
|
_ ( "Enter XPath:" ),
|
||||||
_ ( "Evaluate XPath" ),
|
_ ( "Evaluate XPath" ),
|
||||||
|
@ -4055,7 +4047,7 @@ void MyFrame::OnXPath ( wxCommandEvent& event )
|
||||||
std::string utf8Buffer;
|
std::string utf8Buffer;
|
||||||
getRawText ( doc, utf8Buffer );
|
getRawText ( doc, utf8Buffer );
|
||||||
|
|
||||||
auto_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
boost::scoped_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
||||||
bool success = wl->xpath ( xpathExpression, utf8Buffer,
|
bool success = wl->xpath ( xpathExpression, utf8Buffer,
|
||||||
doc->getFullFileName() );
|
doc->getFullFileName() );
|
||||||
|
|
||||||
|
@ -4182,7 +4174,7 @@ void MyFrame::OnXslt ( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
statusProgress ( _ ( "XSL transformation in progress..." ) );
|
statusProgress ( _ ( "XSL transformation in progress..." ) );
|
||||||
|
|
||||||
auto_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
boost::scoped_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
||||||
wxString fileName = doc->getFullFileName();
|
wxString fileName = doc->getFullFileName();
|
||||||
if ( !wl->xslt ( path, rawBufferUtf8, fileName ) )
|
if ( !wl->xslt ( path, rawBufferUtf8, fileName ) )
|
||||||
{
|
{
|
||||||
|
@ -4222,7 +4214,7 @@ void MyFrame::OnPrettyPrint ( wxCommandEvent& event )
|
||||||
statusProgress ( _ ( "Pretty-printing in progress..." ) );
|
statusProgress ( _ ( "Pretty-printing in progress..." ) );
|
||||||
|
|
||||||
wxString fileName = doc->getFullFileName();
|
wxString fileName = doc->getFullFileName();
|
||||||
auto_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
boost::scoped_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
||||||
for ( int i = 0; i < 2; i++ ) // perform two iterations
|
for ( int i = 0; i < 2; i++ ) // perform two iterations
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -4279,7 +4271,7 @@ void MyFrame::OnEncoding ( wxCommandEvent& event )
|
||||||
|
|
||||||
int res;
|
int res;
|
||||||
wxMemoryBuffer output;
|
wxMemoryBuffer output;
|
||||||
std::auto_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
boost::scoped_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
||||||
res = wl->saveEncoding ( doc->myGetTextRaw(), doc->getFullFileName(),
|
res = wl->saveEncoding ( doc->myGetTextRaw(), doc->getFullFileName(),
|
||||||
wxEmptyString, &output, scd.GetStringSelection() );
|
wxEmptyString, &output, scd.GetStringSelection() );
|
||||||
if ( res == -1 )
|
if ( res == -1 )
|
||||||
|
@ -4290,7 +4282,7 @@ void MyFrame::OnEncoding ( wxCommandEvent& event )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::auto_ptr<XmlUtf8Reader> xur ( new XmlUtf8Reader (
|
boost::scoped_ptr<XmlUtf8Reader> xur ( new XmlUtf8Reader (
|
||||||
false,
|
false,
|
||||||
expandInternalEntities,
|
expandInternalEntities,
|
||||||
output.GetDataLen() ) );
|
output.GetDataLen() ) );
|
||||||
|
@ -4759,7 +4751,7 @@ bool MyFrame::saveFile ( XmlDoc *doc, wxString& fileName, bool checkLastModified
|
||||||
}
|
}
|
||||||
else // all other encodings handled by Libxml
|
else // all other encodings handled by Libxml
|
||||||
{
|
{
|
||||||
auto_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
boost::scoped_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
|
||||||
int result = wl->saveEncoding ( utf8Buffer,
|
int result = wl->saveEncoding ( utf8Buffer,
|
||||||
doc->getFullFileName(), fileName, NULL, wideEncoding );
|
doc->getFullFileName(), fileName, NULL, wideEncoding );
|
||||||
if ( result == -1 )
|
if ( result == -1 )
|
||||||
|
|
|
@ -51,9 +51,9 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "xmldoc.h"
|
#include "xmldoc.h"
|
||||||
#include "myhtmlpane.h"
|
#include "myhtmlpane.h"
|
||||||
#include "xmlencodinghandler.h"
|
#include "xmlencodinghandler.h"
|
||||||
|
@ -199,7 +199,7 @@ class MyApp : public wxApp
|
||||||
MyServer *server;
|
MyServer *server;
|
||||||
bool singleInstanceCheck;
|
bool singleInstanceCheck;
|
||||||
int lang;
|
int lang;
|
||||||
std::auto_ptr<wxFileConfig> config;
|
boost::scoped_ptr<wxFileConfig> config;
|
||||||
};
|
};
|
||||||
|
|
||||||
// forward declarations
|
// forward declarations
|
||||||
|
@ -374,9 +374,9 @@ class MyFrame : public wxFrame
|
||||||
#ifndef __WXDEBUG__
|
#ifndef __WXDEBUG__
|
||||||
wxLogNull logTarget;
|
wxLogNull logTarget;
|
||||||
#endif
|
#endif
|
||||||
std::auto_ptr<wxHtmlEasyPrinting> htmlPrinting;
|
boost::scoped_ptr<wxHtmlEasyPrinting> htmlPrinting;
|
||||||
std::auto_ptr<wxFindReplaceDialog> findDialog;
|
boost::scoped_ptr<wxFindReplaceDialog> findDialog;
|
||||||
std::auto_ptr<wxHtmlHelpController> helpController;
|
boost::scoped_ptr<wxHtmlHelpController> helpController;
|
||||||
|
|
||||||
wxBoxSizer *frameSizer;
|
wxBoxSizer *frameSizer;
|
||||||
wxMenuBar *menuBar;
|
wxMenuBar *menuBar;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct ImgData : public ParserData
|
struct ImgData : public ParserData
|
||||||
|
@ -56,7 +56,7 @@ class XmlCopyImg : public WrapExpat
|
||||||
return d->encoding;
|
return d->encoding;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<ImgData> d;
|
boost::scoped_ptr<ImgData> d;
|
||||||
std::string encoding, element, attribute;
|
std::string encoding, element, attribute;
|
||||||
static void XMLCALL xmldeclhandler (
|
static void XMLCALL xmldeclhandler (
|
||||||
void *data,
|
void *data,
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct EncodingData : public ParserData
|
struct EncodingData : public ParserData
|
||||||
|
@ -42,7 +42,7 @@ class XmlEncodingSpy : public WrapExpat
|
||||||
return d->encoding;
|
return d->encoding;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<EncodingData> d;
|
boost::scoped_ptr<EncodingData> d;
|
||||||
static void XMLCALL xmldeclhandler (
|
static void XMLCALL xmldeclhandler (
|
||||||
void *data,
|
void *data,
|
||||||
const XML_Char *version,
|
const XML_Char *version,
|
||||||
|
|
|
@ -25,8 +25,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <expat.h>
|
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -64,7 +63,7 @@ class XmlFilterReader : public WrapExpat
|
||||||
void getIncludeVector ( vector<string> &v );
|
void getIncludeVector ( vector<string> &v );
|
||||||
void getFilterMap ( map<string, map<string, set<string> > > &m );
|
void getFilterMap ( map<string, map<string, set<string> > > &m );
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<FilterData> fd;
|
boost::scoped_ptr<FilterData> fd;
|
||||||
static void XMLCALL start ( void *data, const XML_Char *el, const XML_Char **attr );
|
static void XMLCALL start ( void *data, const XML_Char *el, const XML_Char **attr );
|
||||||
static void XMLCALL end ( void *data, const XML_Char *el );
|
static void XMLCALL end ( void *data, const XML_Char *el );
|
||||||
static void XMLCALL characterdata ( void *data, const XML_Char *s, int len );
|
static void XMLCALL characterdata ( void *data, const XML_Char *s, int len );
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct ParseSchemaNsData : public ParserData
|
struct ParseSchemaNsData : public ParserData
|
||||||
|
@ -43,7 +43,7 @@ class XmlParseSchemaNs : public WrapExpat
|
||||||
return d->attributeVector;
|
return d->attributeVector;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<ParseSchemaNsData> d;
|
boost::scoped_ptr<ParseSchemaNsData> d;
|
||||||
static void XMLCALL start (
|
static void XMLCALL start (
|
||||||
void *data,
|
void *data,
|
||||||
const XML_Char *el,
|
const XML_Char *el,
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct ProdnoteData : public ParserData
|
struct ProdnoteData : public ParserData
|
||||||
|
@ -52,7 +52,7 @@ class XmlProdnote : public WrapExpat
|
||||||
return d->encoding;
|
return d->encoding;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<ProdnoteData> d;
|
boost::scoped_ptr<ProdnoteData> d;
|
||||||
std::string encoding, element, attribute;
|
std::string encoding, element, attribute;
|
||||||
static void XMLCALL xmldeclhandler (
|
static void XMLCALL xmldeclhandler (
|
||||||
void *data,
|
void *data,
|
||||||
|
|
|
@ -307,7 +307,7 @@ int XmlPromptGenerator::parseGrammar
|
||||||
|
|
||||||
Grammar *rootGrammar;
|
Grammar *rootGrammar;
|
||||||
try {
|
try {
|
||||||
std::auto_ptr<InputSource> source ( WrapXerces::resolveEntity
|
boost::scoped_ptr<InputSource> source ( WrapXerces::resolveEntity
|
||||||
( publicId , systemId , baseFileName ) );
|
( publicId , systemId , baseFileName ) );
|
||||||
if ( !source.get() )
|
if ( !source.get() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
#include <wx/event.h>
|
#include <wx/event.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <memory>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
#include "parserdata.h"
|
#include "parserdata.h"
|
||||||
#include <xercesc/validators/common/ContentSpecNode.hpp>
|
#include <xercesc/validators/common/ContentSpecNode.hpp>
|
||||||
|
@ -102,7 +102,7 @@ class XmlPromptGenerator : public WrapExpat, public wxThread
|
||||||
return d->elementStructureMap;
|
return d->elementStructureMap;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<PromptGeneratorData> d;
|
boost::scoped_ptr<PromptGeneratorData> d;
|
||||||
static void XMLCALL starthandler (
|
static void XMLCALL starthandler (
|
||||||
void *data,
|
void *data,
|
||||||
const XML_Char *el,
|
const XML_Char *el,
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <expat.h>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
#include "rule.h"
|
#include "rule.h"
|
||||||
|
@ -81,7 +81,7 @@ class XmlRuleReader : public WrapExpat
|
||||||
void getExcludeVector ( vector<string> &v );
|
void getExcludeVector ( vector<string> &v );
|
||||||
void getIncludeVector ( vector<string> &v );
|
void getIncludeVector ( vector<string> &v );
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<RuleData> ud;
|
boost::scoped_ptr<RuleData> ud;
|
||||||
boost::shared_ptr<StringSet<char> > dictionary, passiveDictionary;
|
boost::shared_ptr<StringSet<char> > dictionary, passiveDictionary;
|
||||||
boost::shared_ptr<vector<boost::shared_ptr<Rule> > > ruleVector;
|
boost::shared_ptr<vector<boost::shared_ptr<Rule> > > ruleVector;
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
#include "xmlschemagenerator.h"
|
#include "xmlschemagenerator.h"
|
||||||
#include "wrapxerces.h"
|
#include "wrapxerces.h"
|
||||||
#include <memory>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <xercesc/framework/MemBufInputSource.hpp>
|
#include <xercesc/framework/MemBufInputSource.hpp>
|
||||||
#include <xercesc/parsers/XercesDOMParser.hpp>
|
#include <xercesc/parsers/XercesDOMParser.hpp>
|
||||||
#include <xercesc/dom/DOMNamedNodeMap.hpp>
|
#include <xercesc/dom/DOMNamedNodeMap.hpp>
|
||||||
|
@ -54,7 +54,7 @@ const wxString &XmlSchemaGenerator::generate (
|
||||||
mSchema.Clear();
|
mSchema.Clear();
|
||||||
|
|
||||||
XercesCatalogResolver catalogResolver;
|
XercesCatalogResolver catalogResolver;
|
||||||
std::auto_ptr<XercesDOMParser> parser ( new XercesDOMParser() );
|
boost::scoped_ptr<XercesDOMParser> parser ( new XercesDOMParser() );
|
||||||
parser->setDoNamespaces ( true );
|
parser->setDoNamespaces ( true );
|
||||||
parser->setDoSchema ( true );
|
parser->setDoSchema ( true );
|
||||||
parser->setValidationSchemaFullChecking ( false );
|
parser->setValidationSchemaFullChecking ( false );
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct SchemaLocatorData
|
struct SchemaLocatorData
|
||||||
|
@ -39,7 +39,7 @@ class XmlSchemaLocator : public WrapExpat
|
||||||
virtual ~XmlSchemaLocator();
|
virtual ~XmlSchemaLocator();
|
||||||
std::string getSchemaLocation();
|
std::string getSchemaLocation();
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<SchemaLocatorData> d;
|
boost::scoped_ptr<SchemaLocatorData> d;
|
||||||
static void XMLCALL starthandler (
|
static void XMLCALL starthandler (
|
||||||
void *data,
|
void *data,
|
||||||
const XML_Char *el,
|
const XML_Char *el,
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
#include "xmlpromptgenerator.h"
|
#include "xmlpromptgenerator.h"
|
||||||
|
|
||||||
|
@ -51,7 +52,7 @@ public:
|
||||||
STATE_CHOICE
|
STATE_CHOICE
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<SchemaParserData> d;
|
boost::scoped_ptr<SchemaParserData> d;
|
||||||
static void XMLCALL starthandler (
|
static void XMLCALL starthandler (
|
||||||
void *data,
|
void *data,
|
||||||
const XML_Char *el,
|
const XML_Char *el,
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <expat.h>
|
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct XmlShallowValidatorData : public ParserData
|
struct XmlShallowValidatorData : public ParserData
|
||||||
|
@ -67,7 +66,7 @@ class XmlShallowValidator : public WrapExpat
|
||||||
std::vector<std::pair<int, int> > getPositionVector();
|
std::vector<std::pair<int, int> > getPositionVector();
|
||||||
bool getOverrideFailure();
|
bool getOverrideFailure();
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<XmlShallowValidatorData> vd;
|
boost::scoped_ptr<XmlShallowValidatorData> vd;
|
||||||
static void XMLCALL start ( void *data, const XML_Char *el, const XML_Char **attr );
|
static void XMLCALL start ( void *data, const XML_Char *el, const XML_Char **attr );
|
||||||
static void XMLCALL end ( void *data, const XML_Char *el );
|
static void XMLCALL end ( void *data, const XML_Char *el );
|
||||||
static void XMLCALL skippedentity ( void *data, const XML_Char *entityName,
|
static void XMLCALL skippedentity ( void *data, const XML_Char *entityName,
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct SuppressProdnoteData : public ParserData
|
struct SuppressProdnoteData : public ParserData
|
||||||
|
@ -53,7 +53,7 @@ class XmlSuppressProdnote : public WrapExpat
|
||||||
return d->encoding;
|
return d->encoding;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<SuppressProdnoteData> d;
|
boost::scoped_ptr<SuppressProdnoteData> d;
|
||||||
std::string encoding, element, attribute;
|
std::string encoding, element, attribute;
|
||||||
static void XMLCALL xmldeclhandler (
|
static void XMLCALL xmldeclhandler (
|
||||||
void *data,
|
void *data,
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct UtfData : public ParserData
|
struct UtfData : public ParserData
|
||||||
|
@ -51,7 +51,7 @@ class XmlUtf8Reader : public WrapExpat
|
||||||
return d->encoding;
|
return d->encoding;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<UtfData> d;
|
boost::scoped_ptr<UtfData> d;
|
||||||
std::string encoding;
|
std::string encoding;
|
||||||
static void XMLCALL xmldeclhandler (
|
static void XMLCALL xmldeclhandler (
|
||||||
void *data,
|
void *data,
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#define XML_WORD_COUNT_H
|
#define XML_WORD_COUNT_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct WordCountData : public ParserData
|
struct WordCountData : public ParserData
|
||||||
|
@ -39,7 +39,7 @@ class XmlWordCount : public WrapExpat
|
||||||
|
|
||||||
int getWordCount();
|
int getWordCount();
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<WordCountData> wcd;
|
boost::scoped_ptr<WordCountData> wcd;
|
||||||
static void XMLCALL characterdata ( void *data, const XML_Char *s, int len );
|
static void XMLCALL characterdata ( void *data, const XML_Char *s, int len );
|
||||||
static void XMLCALL end ( void *data, const XML_Char *el );
|
static void XMLCALL end ( void *data, const XML_Char *el );
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include "wrapexpat.h"
|
#include "wrapexpat.h"
|
||||||
|
|
||||||
struct XslLocatorData : public ParserData
|
struct XslLocatorData : public ParserData
|
||||||
|
@ -39,7 +39,7 @@ class XslLocator : public WrapExpat
|
||||||
virtual ~XslLocator();
|
virtual ~XslLocator();
|
||||||
std::string getXslLocation();
|
std::string getXslLocation();
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<XslLocatorData> d;
|
boost::scoped_ptr<XslLocatorData> d;
|
||||||
static void XMLCALL starthandler (
|
static void XMLCALL starthandler (
|
||||||
void *data,
|
void *data,
|
||||||
const XML_Char *el,
|
const XML_Char *el,
|
||||||
|
|
Loading…
Reference in New Issue