Class BoundSelectorHost
- Namespace
- Hi.Numerical.StepSelectionUtils
- Assembly
- HiMech.dll
Hosts bound selectors and manages step sections within a CL strip.
public class BoundSelectorHost : IMakeXmlSource- Inheritance
- 
      
      BoundSelectorHost
- Implements
- Inherited Members
- Extension Methods
Constructors
BoundSelectorHost()
Initializes a new instance of the BoundSelectorHost class.
public BoundSelectorHost()BoundSelectorHost(XElement, string)
Ctor.
public BoundSelectorHost(XElement src, string baseDirectory)Parameters
Properties
XName
Name for XML IO.
public static string XName { get; }Property Value
Methods
Begin(string, AnchorMode, IStepShift, FileLineIndex, int)
Marks the beginning of a step section with the specified key and parameters.
public void Begin(string key, AnchorMode anchorMode, IStepShift shift, FileLineIndex fileLineIndex, int boundStepIndex)Parameters
- keystring
- The key identifying the step section. 
- anchorModeAnchorMode
- The anchor mode for the bound. 
- shiftIStepShift
- The step shift to apply. 
- fileLineIndexFileLineIndex
- The file line index. 
- boundStepIndexint
- The step index at the boundary. 
Begin(string, BoundSelector)
Marks the beginning of a step section with the specified key.
public void Begin(string key, BoundSelector beginMark)Parameters
- keystring
- The key identifying the step section. 
- beginMarkBoundSelector
- The bound selector marking the beginning. 
Clear()
Clears all unclosed sections and bound selector bundles.
public void Clear()End(string, AnchorMode, IStepShift, FileLineIndex, int)
Marks the end of a step section with the specified key and parameters.
public void End(string key, AnchorMode anchorMode, IStepShift shift, FileLineIndex fileLineIndex, int boundStepIndex)Parameters
- keystring
- The key identifying the step section. 
- anchorModeAnchorMode
- The anchor mode for the bound. 
- shiftIStepShift
- The step shift to apply. 
- fileLineIndexFileLineIndex
- The file line index. 
- boundStepIndexint
- The step index at the boundary. 
End(string, BoundSelector)
Marks the end of a step section with the specified key.
public void End(string key, BoundSelector endMark)Parameters
- keystring
- The key identifying the step section. 
- endMarkBoundSelector
- The bound selector marking the end. 
GetKeyToStepSectionDictionary(ClStrip)
Gets a dictionary mapping keys to their corresponding step section ranges in the CL strip.
public Dictionary<string, Range<int>> GetKeyToStepSectionDictionary(ClStrip clStrip)Parameters
- clStripClStrip
- The CL strip containing the steps. 
Returns
- Dictionary<string, Range<int>>
- A dictionary mapping keys to step section ranges. 
GetStepSection(string, ClStrip)
Gets the step section range for the specified key in the CL strip.
public Range<int> GetStepSection(string key, ClStrip clStrip)Parameters
Returns
MakeXmlSource(string, string, bool)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)Parameters
- baseDirectorystring
- The base directory for resolving relative paths 
- relFilestring
- The relative file path for the XML source 
- exhibitionOnlybool
- if true, the extended file creation is suppressed. 
Returns
- XElement
- An XML element representing the object's state 
Remarks
For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The baseDirectory is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.