move the usages of cos object key to indirect reference

This commit is contained in:
Eliot Jones
2018-01-14 14:48:54 +00:00
parent b19b96604d
commit 36c0eedd7c
15 changed files with 102 additions and 73 deletions

View File

@@ -1,6 +1,9 @@
namespace UglyToad.PdfPig.Tokenization.Scanner
{
using System.Collections.Generic;
using ContentStream;
using Cos;
using Parser.Parts;
internal interface IObjectLocationProvider
{
@@ -8,4 +11,30 @@
void UpdateOffset(IndirectReference reference, long offset);
}
internal class ObjectLocationProvider : IObjectLocationProvider
{
private readonly CrossReferenceTable crossReferenceTable;
private readonly CosObjectPool pool;
private readonly BruteForceSearcher searcher;
private readonly Dictionary<IndirectReference, long> offsets = new Dictionary<IndirectReference, long>();
public ObjectLocationProvider(CrossReferenceTable crossReferenceTable, CosObjectPool pool, BruteForceSearcher searcher)
{
this.crossReferenceTable = crossReferenceTable;
this.pool = pool;
this.searcher = searcher;
}
public bool TryGetOffset(IndirectReference reference, out long offset)
{
throw new System.NotImplementedException();
}
public void UpdateOffset(IndirectReference reference, long offset)
{
throw new System.NotImplementedException();
}
}
}