!B (Sandbox) (CE-21795) Importing models with multisubmaterials via fbx switches...
[CRYENGINE.git] / Code / CryEngine / CrySchematyc2 / Script / ScriptFilePatcher.h
blobddc1f30d5bb6bff29b54ea3990d81ac109860b5f
1 // Copyright 2001-2019 Crytek GmbH / Crytek Group. All rights reserved.
3 // #SchematycTODO : Allow registration of patches from outside this system?
4 // #SchematycTODO : Build library of utility functions for common operations?
6 #pragma once
8 #include <CrySchematyc2/TemplateUtils/TemplateUtils_Delegate.h>
10 namespace Schematyc2
12 // Document patcher.
13 ////////////////////////////////////////////////////////////////////////////////////////////////////
14 class CDocPatcher
16 public:
18 CDocPatcher();
20 XmlNodeRef PatchDoc(XmlNodeRef xml, const char* szFileName, bool bFromPak);
21 uint32 GetCurrentVersion() const;
23 private:
25 typedef TemplateUtils::CDelegate<bool (XmlNodeRef, const char*)> PatchCallback;
27 struct SPatch
29 SPatch(uint32 _fromVersion, uint32 _toVersion, const PatchCallback& _callback);
31 uint32 fromVersion;
32 uint32 toVersion;
33 PatchCallback callback;
36 typedef std::vector<SPatch> PatchVector;
38 bool Patch101(XmlNodeRef xml, const char* szFileName) const;
39 bool Patch102(XmlNodeRef xml, const char* szFileName) const;
40 bool Patch103(XmlNodeRef xml, const char* szFileName) const;
41 bool Patch104(XmlNodeRef xml, const char* szFileName) const;
43 PatchVector m_patches;