/// <summary> /// Writes data for this dependency cache to disk /// </summary> private void Write() { DirectoryReference.CreateDirectory(Location.Directory); using (FileStream Stream = File.Open(Location.FullName, FileMode.Create, FileAccess.Write, FileShare.Read)) { using (BinaryArchiveWriter Writer = new BinaryArchiveWriter(Stream)) { Writer.WriteInt(CurrentVersion); Writer.WriteInt(FileToIncludeInfo.Count); foreach (KeyValuePair <FileItem, IncludeInfo> Pair in FileToIncludeInfo) { Writer.WriteCompactFileItem(Pair.Key); Writer.WriteLong(Pair.Value.LastWriteTimeUtc); Writer.WriteString(Pair.Value.IncludeText); } Writer.WriteInt(FileToReflectionInfo.Count); foreach (KeyValuePair <FileItem, ReflectionInfo> Pair in FileToReflectionInfo) { Writer.WriteCompactFileItem(Pair.Key); Writer.WriteLong(Pair.Value.LastWriteTimeUtc); Writer.WriteBool(Pair.Value.bContainsMarkup); } } } bModified = false; }
/// <summary> /// Write the makefile to the given archive /// </summary> /// <param name="Writer">The archive to write to</param> public void Write(BinaryArchiveWriter Writer) { Writer.WriteLong(CreateTimeUtc.Ticks); Writer.WriteString(ToolchainInfo); Writer.WriteString(ExternalMetadata); Writer.WriteFileReference(ReceiptFile); Writer.WriteDirectoryReference(ProjectIntermediateDirectory); Writer.WriteInt((int)TargetType); Writer.WriteBool(bDeployAfterCompile); Writer.WriteBool(bHasProjectScriptPlugin); Writer.WriteArray(AdditionalArguments, Item => Writer.WriteString(Item)); Writer.WriteArray(PreBuildScripts, Item => Writer.WriteFileReference(Item)); Writer.WriteList(Actions, Action => Action.Write(Writer)); Writer.WriteList(EnvironmentVariables, x => { Writer.WriteString(x.Item1); Writer.WriteString(x.Item2); }); Writer.WriteList(OutputItems, Item => Writer.WriteFileItem(Item)); Writer.WriteDictionary(ModuleNameToOutputItems, k => Writer.WriteString(k), v => Writer.WriteArray(v, e => Writer.WriteFileItem(e))); Writer.WriteHashSet(HotReloadModuleNames, x => Writer.WriteString(x)); Writer.WriteDictionary(DirectoryToSourceFiles, k => Writer.WriteDirectoryItem(k), v => Writer.WriteArray(v, e => Writer.WriteFileItem(e))); Writer.WriteHashSet(WorkingSet, x => Writer.WriteFileItem(x)); Writer.WriteHashSet(CandidatesForWorkingSet, x => Writer.WriteFileItem(x)); Writer.WriteList(UObjectModules, e => e.Write(Writer)); Writer.WriteList(UObjectModuleHeaders, x => x.Write(Writer)); Writer.WriteHashSet(PluginFiles, x => Writer.WriteFileItem(x)); Writer.WriteHashSet(AdditionalDependencies, x => Writer.WriteFileItem(x)); }
/// <summary> /// Write to binary archive /// </summary> public bool WriteDocument(BinaryArchiveWriter archive) { var rc = false; if (null != archive) { try { archive.Write3dmChunkVersion(MAJOR, MINOR); archive.WriteInt(Count); for (var i = 0; i < Count; i++) { var item = this.ElementAt(i); archive.WriteString(item.Key); item.Value.WriteToArchive(archive); } rc = archive.WriteErrorOccured; } catch { // ignored } } return(rc); }
/// <summary> /// Writes this key to an archive /// </summary> /// <param name="Writer">Archive to write to</param> public void Write(BinaryArchiveWriter Writer) { Writer.WriteInt((int)Type); Writer.WriteDirectoryReference(ProjectDir); Writer.WriteUnrealTargetPlatform(Platform); Writer.WriteString(SectionName); Writer.WriteString(KeyName); }
/// <summary> /// Saves a makefile to disk /// </summary> /// <param name="Location">Path to save the makefile to</param> public void Save(FileReference Location) { DirectoryReference.CreateDirectory(Location.Directory); using (BinaryArchiveWriter Writer = new BinaryArchiveWriter(Location)) { Writer.WriteInt(CurrentVersion); Write(Writer); } }
/// <summary> /// Writes data for this dependency cache to disk /// </summary> private void Write() { DirectoryReference.CreateDirectory(Location.Directory); using (FileStream Stream = File.Open(Location.FullName, FileMode.Create, FileAccess.Write, FileShare.Read)) { using (BinaryArchiveWriter Writer = new BinaryArchiveWriter(Stream)) { Writer.WriteInt(CurrentVersion); Writer.WriteInt(DependencyFileToInfo.Count); foreach (KeyValuePair <FileItem, DependencyInfo> Pair in DependencyFileToInfo) { Writer.WriteFileItem(Pair.Key); Pair.Value.Write(Writer); } } } bModified = false; }
/// <summary> /// Saves this action history to disk /// </summary> void Save() { DirectoryReference.CreateDirectory(Location.Directory); using (BinaryArchiveWriter Writer = new BinaryArchiveWriter(Location)) { Writer.WriteInt(CurrentVersion); Writer.WriteDictionary(OutputItemToCommandLineHash, Key => Writer.WriteFileItem(Key), Value => Writer.WriteFixedSizeByteArray(Value)); } bModified = false; }
/// <summary> /// Write to binary archive /// </summary> public bool Write(BinaryArchiveWriter archive) { var rc = false; if (null != archive) { try { archive.Write3dmChunkVersion(MAJOR, MINOR); archive.WriteInt(Value); rc = archive.WriteErrorOccured; } catch { // ignored } } return(rc); }
/// <summary> /// Write to binary archive /// </summary> public bool WriteDocument(BinaryArchiveWriter archive) { var rc = false; if (null != archive) { try { archive.Write3dmChunkVersion(MAJOR, MINOR); archive.WriteInt(Count); for (var i = 0; i < Count; i++) { this[i].Write(archive); } rc = archive.WriteErrorOccured; } catch { // ignored } } return(rc); }