NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Config.Syntax.ReadingSyntaxNode Class Reference
Inheritance diagram for Ntp.Analyzer.Config.Syntax.ReadingSyntaxNode:
Collaboration diagram for Ntp.Analyzer.Config.Syntax.ReadingSyntaxNode:

Public Member Functions

 ReadingSyntaxNode (string name, int line)
 
- Public Member Functions inherited from Ntp.Analyzer.Config.Syntax.SyntaxNode< ReadingBulkConfiguration >
void Add (ISyntaxNode node)
 
void Assemble (ISyntaxNode node)
 
Compile ()
 
void CompileNode ()
 
IEnumerator< ISyntaxNodeGetEnumerator ()
 
void Resolve (SymbolTable table)
 
void Validate (SymbolTable table)
 

Protected Member Functions

override ReadingBulkConfiguration InternalCompile ()
 
override void ValidateMandatories ()
 Override to validates the mandatory types in this syntax node. More...
 
override void ValidateTypes ()
 Override to validates the types in this syntax node. More...
 
- Protected Member Functions inherited from Ntp.Analyzer.Config.Syntax.SyntaxNode< ReadingBulkConfiguration >
 SyntaxNode (Symbol symbol, string name, int line, bool requirePath=false)
 
void AddError (string message)
 
void AddReferenceNameError (ISyntaxNode node, string keyword, string name)
 
void AddReferenceTypeError (ISyntaxNode node, string keyword, string section, string name)
 
void CheckAllIsPresent (IEnumerable< Symbol > list)
 
void CheckIsUnique (IEnumerable< Symbol > list)
 
Uri CheckLink (string link, string keyword)
 
void CheckOneIsPresent (IEnumerable< Symbol > list)
 
void CheckOnlyOneIsPresent (IEnumerable< Symbol > list)
 
void CheckTypeIs< TU > (Symbol symbol)
 
void CheckTypeIs< TU, TV > (Symbol symbol)
 
virtual void InternalResolve (SymbolTable table)
 Override to resolve references to other syntax nodes from this syntax node. More...
 
virtual void ValidateReferences (SymbolTable table)
 Override to validates the references in this syntax node. More...
 

Additional Inherited Members

- Public Attributes inherited from Ntp.Analyzer.Config.Syntax.SyntaxNode< ReadingBulkConfiguration >
ConfigurationNode CompiledNode
 
IEnumerable< string > Errors
 
bool HasErrors
 
- Properties inherited from Ntp.Analyzer.Config.Syntax.SyntaxNode< ReadingBulkConfiguration >
int Line [get]
 
string Name [get]
 
List< ISyntaxNodeNodes [get]
 
bool RequirePath [get]
 
Symbol Symbol [get]
 

Detailed Description

Definition at line 31 of file ReadingSyntaxNode.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Config.Syntax.ReadingSyntaxNode.ReadingSyntaxNode ( string  name,
int  line 
)
inline

Definition at line 33 of file ReadingSyntaxNode.cs.

References Ntp.Analyzer.Config.Table.KeywordReading.

34  : base(Symbol.KeywordReading, name, line)
35  {
36  }

Member Function Documentation

override ReadingBulkConfiguration Ntp.Analyzer.Config.Syntax.ReadingSyntaxNode.InternalCompile ( )
inlineprotectedvirtual

Implements Ntp.Analyzer.Config.Syntax.SyntaxNode< ReadingBulkConfiguration >.

Definition at line 38 of file ReadingSyntaxNode.cs.

39  {
40  var readingName = Nodes.SingleOrDefault(n => n.Symbol == Symbol.KeywordName) as StringSettingNode;
41  var frequency = Nodes.SingleOrDefault(n => n.Symbol == Symbol.KeywordFrequency) as IntegerSettingNode;
42  var initialRun = Nodes.SingleOrDefault(n => n.Symbol == Symbol.KeywordInitialRun) as BooleanSettingNode;
43  var fixedRun = Nodes.SingleOrDefault(n => n.Symbol == Symbol.KeywordFixedRun) as BooleanSettingNode;
44  var timestamp = Nodes.SingleOrDefault(n => n.Symbol == Symbol.KeywordTimeStamp) as TimeStampNode;
45 
46  return new ReadingBulkConfiguration(
47  Name,
48  readingName?.Value,
49  frequency?.Value,
50  initialRun?.Value,
51  fixedRun?.Value,
52  timestamp?.DateTimeKind
53  );
54  }
override void Ntp.Analyzer.Config.Syntax.ReadingSyntaxNode.ValidateMandatories ( )
inlineprotectedvirtual

Override to validates the mandatory types in this syntax node.

When overriding this method do not call the base method.

Reimplemented from Ntp.Analyzer.Config.Syntax.SyntaxNode< ReadingBulkConfiguration >.

Definition at line 56 of file ReadingSyntaxNode.cs.

57  {
58  CheckIsUnique(new List<Symbol>
59  {
60  Symbol.KeywordName,
61  Symbol.KeywordFrequency,
62  Symbol.KeywordInitialRun,
63  Symbol.KeywordFixedRun,
64  Symbol.KeywordTimeStamp
65  });
66 
67  CheckAllIsPresent(new List<Symbol>
68  {
69  Symbol.KeywordName,
70  Symbol.KeywordFrequency
71  });
72  }
override void Ntp.Analyzer.Config.Syntax.ReadingSyntaxNode.ValidateTypes ( )
inlineprotectedvirtual

Override to validates the types in this syntax node.

When overriding this method do not call the base method.

Reimplemented from Ntp.Analyzer.Config.Syntax.SyntaxNode< ReadingBulkConfiguration >.

Definition at line 74 of file ReadingSyntaxNode.cs.

75  {
76  CheckTypeIs<StringSettingNode>(Symbol.KeywordName);
77  CheckTypeIs<IntegerSettingNode>(Symbol.KeywordFrequency);
78  CheckTypeIs<BooleanSettingNode>(Symbol.KeywordInitialRun);
79  CheckTypeIs<BooleanSettingNode>(Symbol.KeywordFixedRun);
80  CheckTypeIs<TimeStampNode>(Symbol.KeywordTimeStamp);
81  }

The documentation for this class was generated from the following file: