Class ShortcutsDb
Represents a shortcuts db between a collection of predefined stops.
Inheritance
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class ShortcutsDb
Remarks
A shortcut is a pre-calculated route added to the network as an edge. This shortcut can be reconstructed by using this DB.
Constructors
ShortcutsDb(String)
Creates a new shortcuts db.
Declaration
public ShortcutsDb(string profileName)
Parameters
|
System.String
profileName
|
Properties
Meta
Gets the meta-data collection.
Declaration
public IAttributeCollection Meta { get; }
Property Value
|
IAttributeCollection
|
ProfileName
Gets the profile that built these shortcuts.
Declaration
public string ProfileName { get; }
Property Value
|
System.String
|
Methods
Add(UInt32[], IAttributeCollection)
Adds a new shortcut.
Declaration
public uint Add(uint[] vertices, IAttributeCollection meta)
Parameters
|
System.UInt32[]
vertices
|
|
IAttributeCollection
meta
|
Returns
|
System.UInt32
|
AddStop(UInt32, IAttributeCollection)
Adds a stop with associated meta-data.
Declaration
public void AddStop(uint vertex, IAttributeCollection meta)
Parameters
|
System.UInt32
vertex
|
|
IAttributeCollection
meta
|
Deserialize(Stream)
Deserializes a shortcuts db and leaves the stream position at the end of the shortcut db data.
Declaration
public static ShortcutsDb Deserialize(Stream stream)
Parameters
|
Stream
stream
|
Returns
|
ShortcutsDb
|
Get(UInt32, out IAttributeCollection)
Gets a shortcut.
Declaration
public uint[] Get(uint id, out IAttributeCollection meta)
Parameters
|
System.UInt32
id
|
|
IAttributeCollection
meta
|
Returns
|
System.UInt32[]
|
Get(UInt32, UInt32, out IAttributeCollection)
Gets a shortcut but it's source and target vertex.
Declaration
public uint[] Get(uint vertex1, uint vertex2, out IAttributeCollection meta)
Parameters
|
System.UInt32
vertex1
|
|
System.UInt32
vertex2
|
|
IAttributeCollection
meta
|
Returns
|
System.UInt32[]
|
GetStop(UInt32)
Gets a stop if there is one for the given vertex and the associated meta-data. Returns null if no stop is found.
Declaration
public IAttributeCollection GetStop(uint vertex)
Parameters
|
System.UInt32
vertex
|
Returns
|
IAttributeCollection
|
Serialize(Stream)
Serializes this shortcuts db to the given stream and returns the # of bytes written.
Declaration
public long Serialize(Stream stream)
Parameters
|
Stream
stream
|
Returns
|
System.Int64
|