Table of Contents

Class NcWritebackSessionUtil

Namespace
Hi.NcParsers.NcWriteback
Assembly
HiMech.dll

Shared vocabulary and identity allocation of the session writeback paths (MachiningSession.ConvertClToNcFiles and the NC optimization writeback in SoftNcOptProc): the output path template keywords and the per-output-file NcDstPieceFactory construction whose destination identities draw from the session counters, with a counter-less legacy fallback.

public static class NcWritebackSessionUtil
Inheritance
NcWritebackSessionUtil
Inherited Members

Fields

NcNameTemplateReplacingKeyword

Output path template keyword replaced by the source file name. Mirrors HiUniNc HardNcUtil.NcNameTemplateReplacingKeyword (HardNcUtil.cs:53).

public const string NcNameTemplateReplacingKeyword = "[NcName]"

Field Value

string

RelNcFileTemplateReplacingKeyword

Output path template keyword replaced by the slash-flattened relative source file path. Mirrors HiUniNc HardNcUtil.RelNcFileTemplateReplacingKeyword (HardNcUtil.cs:48, unreachable from HiMech).

public const string RelNcFileTemplateReplacingKeyword = "[NcFile]"

Field Value

string

Methods

CreateDstPieceFactoryProvider(IEnumerable<INcDependency>, IEnumerable<SyntaxPiece>)

Builds the per-output-file NcDstPieceFactory provider of a writeback run. Destination identities draw from the session counters (SentenceIndexCounterDependency / FileIndexCounterDependency found in dependencies) so they stay unique against every played piece; a counter-less legacy preset falls back to continuing after the maxima of srcPieces (srcPieces is enumerated only in that fallback).

public static Func<string, NcDstPieceFactory> CreateDstPieceFactoryProvider(IEnumerable<INcDependency> dependencies, IEnumerable<SyntaxPiece> srcPieces)

Parameters

dependencies IEnumerable<INcDependency>

The session's effective NC dependency list; may be null.

srcPieces IEnumerable<SyntaxPiece>

Every source piece of the run, across all output files.

Returns

Func<string, NcDstPieceFactory>

Maps a destination (relative) file path to that file's factory; invoke once per output file, in written order.