aboutsummaryrefslogtreecommitdiff
path: root/libs/installer_bsplugins/src/TESData/FileConflictParser.h
blob: fcea49729985402550ba79ac7a7c3a8227497f1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef TESDATA_FILECONFLICTPARSER_H
#define TESDATA_FILECONFLICTPARSER_H

#include "RecordPath.h"
#include "TESFile/Stream.h"

#include <string>
#include <vector>

namespace TESData
{

class PluginList;
class FileInfo;

class FileConflictParser final
{
public:
  FileConflictParser(PluginList* pluginList, FileInfo* plugin, bool lightSupported,
                     bool mediumSupported, bool blueprintSupported);

  bool Group(TESFile::GroupData group);
  void EndGroup();
  bool Form(TESFile::FormData form);
  void EndForm();
  bool Chunk(TESFile::Type type);
  void Data(std::istream& stream);

private:
  void MainRecordData(std::istream& stream);
  void DefaultObjectData(std::istream& stream);
  void GameSettingData(std::istream& stream);
  void StandardData(std::istream& stream);

  PluginList* m_PluginList;
  FileInfo* m_Plugin;
  bool m_LightSupported;
  bool m_MediumSupported;
  bool m_BlueprintSupported;

  std::string m_PluginName;
  std::vector<std::string> m_Masters;
  RecordPath m_CurrentPath;
  TESFile::Type m_CurrentType;
  TESFile::Type m_CurrentChunk;
  std::string m_CurrentName;
};

}  // namespace TESData

#endif  // TESDATA_FILECONFLICTPARSER_H