UnitReaderClass¶
Read from a file a list of units terminated by @@@@@.
-
class
nmcog.spinnaker.associate.nealassoc.readUnitFile.UnitReaderClass¶ Note:
- Unlike implementation by Chris Huyck et al. nmcog does not use this class to read .txt file
- The structured data are created within the working class.
- However, the reading ability of
UnitReaderClasshas not been disabled therefore it can still be used like Chris Huyck et al. - Although, in the current implementation of any class within nmcog creates its structured data the reason
UnitReaderClassis because of some original scripts (Chris Huyck et al.) within nmcog that invokes methods (like thegetUnitNumber()) within this class whose internal has instantiated attributes.
-
createViaRead(fileName)¶ Top level function.
-
getUnitNumber(checkUnit)¶ Return the total number of units.
-
inUnits(checkUnit)¶ Check if a unit in question is a unit.
-
readUnitFile(fileName)¶ Reads a text file.
-
readUnits(handle)¶ Read lines until you get one starting with an “@” Each of these is a primitive unit in the hierarchy.