44Base. show (io:: IO , :: BigEndian ) = print (io, " BigEndian" )
55Base. show (io:: IO , :: LittleEndian ) = print (io, " LittleEndian" )
66
7- Base . showcompact (io:: IO , :: SpiceFormat ) = print (io, " Format:Unknown" )
8- Base . showcompact (io:: IO , :: Format_9601 ) = print (io, " SPICE:9601" )
9- Base . showcompact (io:: IO , :: Format_9602 ) = print (io, " CppSim:9602" )
10- Base . showcompact (io:: IO , :: Format_2001 ) = print (io, " SPICE:2001" )
11- Base . showcompact (io:: IO , :: Format_2013 ) = print (io, " SPICE:2013" )
7+ _showcompact (io:: IO , :: SpiceFormat ) = print (io, " Format:Unknown" )
8+ _showcompact (io:: IO , :: Format_9601 ) = print (io, " SPICE:9601" )
9+ _showcompact (io:: IO , :: Format_9602 ) = print (io, " CppSim:9602" )
10+ _showcompact (io:: IO , :: Format_2001 ) = print (io, " SPICE:2001" )
11+ _showcompact (io:: IO , :: Format_2013 ) = print (io, " SPICE:2013" )
1212
13- Base. show (io:: IO , fmt:: Format_Unknown ) = showcompact (io, fmt)
13+ Base. show (io:: IO , fmt:: Format_Unknown ) = _showcompact (io, fmt)
1414
1515function Base. show (io:: IO , fmt:: SpiceFormat )
16- showcompact (io, fmt)
16+ _showcompact (io, fmt)
1717 print (io, " (x: $(xtype (fmt)) [], y: $(ytype (fmt)) [])" )
1818end
1919
20- function Base. showcompact (io:: IO , r:: DataReader )
20+ function _show (io:: IO , r:: DataReader , compact:: Bool = false )
21+ # Base (compact) information:
2122 print (io, DataReader, " (" )
2223 print (io, basename (r. filepath))
2324 print (io, " , nsig=" , length (r. signalnames))
2425 print (io, " , npts=" , length (r. sweep))
2526 print (io, " , " )
2627 print (io, r. format)
2728 print (io, " )" )
28- end
29+ if compact; return ; end
2930
30- function Base. show (io:: IO , r:: DataReader )
31- showcompact (io, r)
31+ # Extended information:
3232 println (io)
3333 print (io, " >> (" , r. endianness, " )" )
3434 print (io, " sweep = '" , r. sweepname, " '" )
@@ -39,4 +39,7 @@ function Base.show(io::IO, r::DataReader)
3939 println (io, " >> " , tags. comments)
4040end
4141
42+ Base. show (io:: IO , r:: DataReader ) = _show (io, r)
43+ Base. show (io:: IOContext , r:: DataReader ) = _show (io, r, haskey (io. dict, :compact ))
44+
4245# End
0 commit comments