Closed moichim closed 5 months ago
Parsers should be modular. It requires:
Parsers are integrated into thermal loader as classes in an array.
Upon file load, the file is passed through all parsers - through its determine method.
Determine method of a parser looks on a file and returns yes or no in case the file matches. No errors are thrown upon determination.
The determination should be a static method since no instance of the parser exists in the given moment.
Once the parser is identified, it is instanced and parsing happens.
During parsing, there is validation.
Errors should be logged somewhere.
Parser determination is executed in ThermalLoader.getParserInstance().
Parsers should be modular. It requires:
Parsers are integrated into thermal loader as classes in an array.
Upon file load, the file is passed through all parsers - through its determine method.
Determine method of a parser looks on a file and returns yes or no in case the file matches. No errors are thrown upon determination.
The determination should be a static method since no instance of the parser exists in the given moment.
Once the parser is identified, it is instanced and parsing happens.
During parsing, there is validation.
Errors should be logged somewhere.