Table of Contents

Class FloatTagValueSyntax

Namespace
Hi.NcParsers.ParsingSyntaxs
Assembly
HiMech.dll

TagValueSyntax that parses numeric literal values to double. Variable text (e.g. Q2, #1, [#1+#2]) remains as string.

public class FloatTagValueSyntax : TagValueSyntax, ISituNcSyntax, INcSyntax, IMakeXmlSource
Inheritance
FloatTagValueSyntax
Implements
Inherited Members
Extension Methods

Constructors

FloatTagValueSyntax(IEnumerable<string>, IEnumerable<string>, string)

Initializes a new instance with the given category path, tag list, and variable-tag pattern.

public FloatTagValueSyntax(IEnumerable<string> categoryPath, IEnumerable<string> tags, string variableTag)

Parameters

categoryPath IEnumerable<string>

JSON path under Parsing where matches are written.

tags IEnumerable<string>

Single-letter tag names whose values are grabbed.

variableTag string

Regex/literal recognizing a variable reference as a value.

FloatTagValueSyntax(XElement)

Initializes a new instance by deserializing from the given XML element.

public FloatTagValueSyntax(XElement src)

Parameters

src XElement

Source XML element.

Properties

XName

XML element name used to register this syntax with XFactory.

public static string XName { get; }

Property Value

string

Methods

Reg(XFactory)

Registers this type's deserializer with the given XFactory (or Default when factory is null). Idempotent.

public static void Reg(XFactory factory = null)

Parameters

factory XFactory

ToFloat(string)

Parses a numeric literal to double; returns the original string for variable text.

public static JsonNode ToFloat(string setup)

Parameters

setup string

Returns

JsonNode

ToValueJsonNode(string)

Converts a tag setup string value to a JsonNode. Override in derived classes for typed parsing (int, double). Variable text (e.g. Q2, #1, [#1+#2]) is kept as string.

protected override JsonNode ToValueJsonNode(string setup)

Parameters

setup string

Returns

JsonNode