代码拉取完成,页面将自动刷新
同步操作将从 Acreate/gamePlanTool 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#include "FileBuffSystem.h"
appInstances::FileBuffSystem appInstances::FileBuffSystem::fileInstance{ };
appInstances::FileBuffSystem::FileBuffSystem( ) {
dirPathBody = new QVector<QString>;
filePathody = new QVector<QString>;
xmlMap = new QHash<QString, dXml::XmlDataDoc>;
// 一些默认存档
QString ipTag;
QString piData;
dXml::XmlDataDoc defautDoc;
dXml::readXmlFile(&defautDoc, ipTag, piData, defaultXmlStting);
insertMapUnity(defaultXmlStting, defautDoc);
}
void appInstances::FileBuffSystem::setCurrentDir(const QString& fullPath) {
currentDirFullPath = fullPath;
}
void appInstances::FileBuffSystem::addFileDir(const QString& fullPath) {
dirPathBody->append(fullPath);
}
void appInstances::FileBuffSystem::removeFileDir(const QString& fullPath) {
dirPathBody->removeOne(fullPath);
}
void appInstances::FileBuffSystem::clearFileDir( ) {
dirPathBody->clear( );
}
const QString& appInstances::FileBuffSystem::getCurrentDir( ) {
return currentDirFullPath;
}
const QVector<QString> appInstances::FileBuffSystem::getDir(const QString& key) {
QVector<QString> result;
QVector<QString>::iterator iterator = dirPathBody->begin( );
QVector<QString>::iterator end = dirPathBody->end( );
while( iterator != end ) {
if( ( *iterator ).contains(key, Qt::CaseInsensitive) )
result.append(*iterator);
++iterator;
}
return result;
}
void appInstances::FileBuffSystem::setCurrentFilePath(const QString& fullPath) {
currentFileFullPath = fullPath;
}
void appInstances::FileBuffSystem::addFilePath(const QString& fullPath) {
filePathody->append(fullPath);
}
void appInstances::FileBuffSystem::removeFilePath(const QString& fullPath) {
filePathody->removeOne(fullPath);
}
void appInstances::FileBuffSystem::clearFilePath( ) {
filePathody->clear( );
}
const QString& appInstances::FileBuffSystem::getCurrentFilePath( ) {
return currentFileFullPath;
}
const QVector<QString> appInstances::FileBuffSystem::getFilePath(QString& key) {
QVector<QString> result;
QVector<QString>::iterator iterator = filePathody->begin( );
QVector<QString>::iterator end = filePathody->end( );
while( iterator != end ) {
if( ( *iterator ).contains(key, Qt::CaseInsensitive) )
result.append(*iterator);
++iterator;
}
return result;
}
void appInstances::FileBuffSystem::insertMapUnity(const QString& fileFullPath, const dXml::XmlDataDoc& xmlDocObj) {
xmlMap->insert(fileFullPath, xmlDocObj);
}
void appInstances::FileBuffSystem::removeMapUnity(const QString& key) {
xmlMap->remove(key);
}
void appInstances::FileBuffSystem::clearMapUnitys( ) {
xmlMap->clear( );
}
const dXml::XmlDataDoc appInstances::FileBuffSystem::getDocValue(const QString& key) {
return xmlMap->value(key);
}
const QList<QString> appInstances::FileBuffSystem::getKeys( ) {
return xmlMap->keys( );
}
QHash<QString, dXml::XmlDataDoc> appInstances::FileBuffSystem::cloneMap( ) {
QHash<QString, dXml::XmlDataDoc> result;
QHash<QString, dXml::XmlDataDoc>::iterator iterator = xmlMap->begin( );
QHash<QString, dXml::XmlDataDoc>::iterator end = xmlMap->end( );
while( iterator != end ) {
dXml::XmlDataDoc doc = iterator.value( );
const QString key = iterator.key( );
result.insert(key, doc);
++iterator;
}
return result;
}
appInstances::FileBuffSystem::~FileBuffSystem( ) {
if( this->dirPathBody != Q_NULLPTR )
delete dirPathBody;
dirPathBody = Q_NULLPTR;
if( this->filePathody != Q_NULLPTR )
delete filePathody;
filePathody = Q_NULLPTR;
delete xmlMap;
//if( this->currentInfo != Q_NULLPTR )
// delete currentInfo;
//currentInfo = Q_NULLPTR;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。