增加Lua导出和FileList
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#include "libNPK_FileList.h"
|
||||
|
||||
namespace NPK
|
||||
{
|
||||
|
||||
|
||||
int32_t NPKFileList::getFileCounts(void) const
|
||||
{
|
||||
return (int32_t)m_fileList.size();
|
||||
}
|
||||
|
||||
bool NPKFileList::getFileItem(int32_t index, FileItemFullInfo* fullInfo) const
|
||||
{
|
||||
if(index< 0 || index >= getFileCounts())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
*fullInfo = m_fileList[index];
|
||||
return true;
|
||||
}
|
||||
|
||||
void NPKFileList::addFileNode(const FileItemFullInfo& fullInfo)
|
||||
{
|
||||
//TODO: check duplicate file name?
|
||||
m_fileList.push_back(fullInfo);
|
||||
}
|
||||
|
||||
void NPKFileList::mergeOtherListInto(const IFileList* source)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
IFileList* createEmptyFileList()
|
||||
{
|
||||
return new NPKFileList();
|
||||
}
|
||||
|
||||
// destroy a file list
|
||||
void destoryFileList(IFileList* fileList)
|
||||
{
|
||||
delete ((NPKFileList*)fileList);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user