CVFSInputSource clean-up, added headers to adts.{h,cpp}
This was SVN commit r3472.
This commit is contained in:
parent
7bf48e95c4
commit
92fb5450bc
@ -1,7 +1,7 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "adts.h"
|
||||
|
||||
#include <deque>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// built-in self test
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "lib.h"
|
||||
|
||||
#include <cfloat>
|
||||
#include <cassert>
|
||||
|
||||
#include <list>
|
||||
|
@ -76,21 +76,21 @@ class CVFSInputSource: public InputSource
|
||||
FileIOBuf m_pBuffer;
|
||||
size_t m_BufferSize;
|
||||
|
||||
CVFSInputSource(const CVFSInputSource &);
|
||||
CVFSInputSource &operator = (const CVFSInputSource &);
|
||||
|
||||
public:
|
||||
CVFSInputSource():
|
||||
m_pBuffer(NULL),
|
||||
m_BufferSize(0)
|
||||
{}
|
||||
|
||||
~CVFSInputSource();
|
||||
virtual ~CVFSInputSource();
|
||||
|
||||
// Open a VFS path for XML parsing
|
||||
// returns 0 if successful, -1 on failure
|
||||
int OpenFile(const char *path, uint flags);
|
||||
|
||||
// Allow the use of externally-loaded files
|
||||
void OpenBuffer(const char* path, const void* buffer, const size_t buffersize);
|
||||
|
||||
virtual BinInputStream *makeStream() const;
|
||||
};
|
||||
|
||||
|
@ -65,17 +65,6 @@ int CVFSInputSource::OpenFile(const char *path, uint flags = 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CVFSInputSource::OpenBuffer(const char* path, const void* buffer, const size_t buffersize)
|
||||
{
|
||||
debug_warn("who guarantees that buffer isn't already freed?");
|
||||
m_pBuffer = (FileIOBuf)buffer;
|
||||
m_BufferSize = buffersize;
|
||||
|
||||
XMLCh *sysId=XMLString::transcode(path);
|
||||
setSystemId(sysId);
|
||||
XMLString::release(&sysId);
|
||||
}
|
||||
|
||||
CVFSInputSource::~CVFSInputSource()
|
||||
{
|
||||
// our buffer was vfs_load-ed; free it now
|
||||
|
Loading…
Reference in New Issue
Block a user