<div dir="ltr">I think it is more extensible to hold a collection of different storages than to have to make subclasses for every combination of them. Right now I have a subclass implementation working for my use case, but it isn't the cleanest.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 28, 2014 at 12:06 PM, Peter <span dir="ltr"><<a href="mailto:graphhopper@gmx.de" target="_blank">graphhopper@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Erik,<br>
<br>
a list of extended storages sounds interesting, still I would like
to understand better the usecase.<br>
<br>
When you would use e.g. a subclass with separate DataAccess
objects what would be more complex or impossible compared to a
list of extended storages?<br>
<br>
Kind Regards,<br>
Peter.<div><div class="h5"><br>
<br>
On 27.10.2014 22:35, Erik Formella wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>It looks like to be able to support turn costs we have to
sacrifice the ability to use any other extended storage.</div>
<div><br>
</div>
<div>I am thinking I can refactor <font face="courier new,
monospace">GraphStorage</font> to use an <font face="courier new, monospace">ExtendedStorageManager</font>.
It would allow us to write things like:</div>
<div><br>
</div>
<div><font face="courier new, monospace">TurnCostStorage
turnCostStorage =
graph.getExtendedStorageManager().get("turn_costs");</font></div>
<div><br>
</div>
<div>instead of doing:</div>
<div><br>
</div>
<div><font face="courier new, monospace">if
(graph.getExtendedStorage() istanceof TurnCostStorage) { ...
}</font></div>
<div><br>
</div>
<div><br>
</div>
<div>This is just my first guess at what the interfaces should
look like, but does that seem like a change you would
appreciate in GraphHopper?</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
GraphHopper mailing list
<a href="mailto:GraphHopper@openstreetmap.org" target="_blank">GraphHopper@openstreetmap.org</a>
<a href="https://lists.openstreetmap.org/listinfo/graphhopper" target="_blank">https://lists.openstreetmap.org/listinfo/graphhopper</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
GraphHopper mailing list<br>
<a href="mailto:GraphHopper@openstreetmap.org">GraphHopper@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/graphhopper" target="_blank">https://lists.openstreetmap.org/listinfo/graphhopper</a><br>
<br></blockquote></div><br></div>