split out class "IniMegaFile" .

This commit is contained in:
Zero Fanker 2024-05-11 22:48:53 -04:00
parent c8f7c99c80
commit fb64321a28
3 changed files with 34 additions and 32 deletions

33
MissionEditor/IniMega.h Normal file
View file

@ -0,0 +1,33 @@
#pragma once
#include <afxcview.h>
#include "INIMeta.h"
#include "variables.h"
extern CIniFile rules;
class IniMegaFile
{
friend class IniFileGroup;
public:
static IniFileGroup GetRules();
static bool IsNullOrEmpty(const CString& value) { return isNullOrEmpty(value); }
private:
static bool isNullOrEmpty(const CString& value);
};
IniFileGroup IniMegaFile::GetRules()
{
IniFileGroup m_group;
m_group.Append(rules);
m_group.Append(Map->GetIniFile());
return m_group;
}
bool IniMegaFile::isNullOrEmpty(const CString& value)
{
return !value.GetLength() || value == "none" || value == "<none>";
}

View file

@ -33,7 +33,7 @@
#include "rtpdlg.h"
#include "TubeTool.h"
#include "StringHelper.h"
#include "INIMeta.h"
#include "IniMega.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@ -514,19 +514,6 @@ __inline HTREEITEM TV_InsertItemW(HWND hWnd, WCHAR* lpString, int len, HTREEITEM
return res;
}
IniFileGroup IniMegaFile::GetRules()
{
IniFileGroup m_group;
m_group.Append(rules);
m_group.Append(Map->GetIniFile());
return m_group;
}
bool IniMegaFile::isNullOrEmpty(const CString& value)
{
return !value.GetLength() || value == "none" || value == "<none>";
}
const IgnoreSet CollectIgnoreSet()
{
IgnoreSet ret;

View file

@ -32,15 +32,11 @@
#define MAKE_MASK(refVal) 1 << static_cast<int>(refVal)
class TreeViewBuilder;
class CViewObjects;
class IniFileGroup;
using IgnoreSet = std::unordered_set<std::string>;
static const IgnoreSet CollectIgnoreSet();
extern CIniFile rules;
class TreeRoot {
friend class TreeViewBuilder;
friend class CViewObjects;
@ -225,20 +221,6 @@ private:
void HandleBrushSize(int iTile);
};
class IniMegaFile
{
friend class IniFileGroup;
public:
static IniFileGroup GetRules();
static bool IsNullOrEmpty(const CString& value) { return isNullOrEmpty(value); }
private:
static bool isNullOrEmpty(const CString& value);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}