Next / Previous / Contents / TCC Help System / NM Tech homepage

27. class ReportInfo: Reading report information

The purpose of this class is to make available the information from the scanreport.xml file. Here is the interface:

hwscan3.py
# - - - - -   c l a s s   R e p o r t I n f o   - - - - -

class ReportInfo:
    '''Represents the XML file containing report parameters.

      Exports:
        ReportInfo ( fileName ):
          [ fileName is the name of the report file ->
              if fileName names a readable, valid file
              conforming to scanreport.rnc ->
                return a new ReportInfo object representing
                that file
              else -> raise IOError ]
        .fileName:        [ as passed to constructor, read-only ]
        .roomMap:
          [ a dictionary whose values are Room objects, with the
            corresponding key its .prefix attribute ]
        .systemMap:
          [ a dictionary whose values are System objects, with the
            corresponding key its .nodename attribute ]
        .deviceList:
          [ a list of device types as strings ]
    '''