Return an |_IfdEntry| subclass instance containing the tag and value of the tag parsed from `stream_rdr` at `offset`. Note this method is common to all subclasses. Override the ``_parse_value()`` method to provide distinctive behavior based on field type.
(cls, stream_rdr, offset)
| 195 | |
| 196 | @classmethod |
| 197 | def from_stream(cls, stream_rdr, offset): |
| 198 | """Return an |_IfdEntry| subclass instance containing the tag and value of the |
| 199 | tag parsed from `stream_rdr` at `offset`. |
| 200 | |
| 201 | Note this method is common to all subclasses. Override the ``_parse_value()`` |
| 202 | method to provide distinctive behavior based on field type. |
| 203 | """ |
| 204 | tag_code = stream_rdr.read_short(offset, 0) |
| 205 | value_count = stream_rdr.read_long(offset, 4) |
| 206 | value_offset = stream_rdr.read_long(offset, 8) |
| 207 | value = cls._parse_value(stream_rdr, offset, value_count, value_offset) |
| 208 | return cls(tag_code, value) |
| 209 | |
| 210 | @classmethod |
| 211 | def _parse_value(cls, stream_rdr, offset, value_count, value_offset): |
nothing calls this directly
no test coverage detected