Commit Graph

8 Commits (208788de28150f1ceba5fbfa2f3fc5f191ac3258)

Author SHA1 Message Date
Dustin Oprea 74567945ac v1/value_context.go: Bugfix for incorrectly handled ErrUnhandledUnknownTypedTag error 2020-01-02 07:06:28 -05:00
Dustin Oprea 22222b24d0 Minor tweaks/renamings 2020-01-01 02:45:37 -05:00
Dustin Oprea fb1db098b9 value_context.go: Add and integrate `(*ValueContext).Undefined()` method 2019-12-31 06:45:05 -05:00
Dustin Oprea 79b37fc0e1 value_context.go: No longer support override for unit-count
It's never set to anything different.
2019-12-31 06:45:05 -05:00
Dustin Oprea 71b242c269 value_context.go: We now store the IFD-path and tag-ID on the value-context
This allows us to add an API for accessing an undefined-value/structure
directly on ValueContext.

- ifd_tag_entry.go: Fixed several methods on `IfdTagEntry` to be by-
  reference. It was a latent bug that they weren't.

- value_context.go: Added `newValueContextFromTag` to streamline
  the changes above.
2019-12-31 06:45:05 -05:00
Dustin Oprea 69821c417f value_context.go: ValueContext now embeds value processing
The upshot of this is that generating a list of type-correct slices or a
string from a tag's value is now stupidly easy.

- Broke parsing into an independent type (parser.go:Parser).

- Moved primary value-processing logic to `ValueContext` so that it
  coexists with the actual data (though as much basic functionality as
  possible is implemented independently and reused here). This
  eliminates extremely ridiculously obtuse usage procedure.

- Deprecated almost all existing TagType functionality (in order to
  distance us from this now-legacy usage pattern). Existing
  functionality maintained for now. We'll drop it when we do the next
  release major.

- `ValueContext` is now passed by reference.
2019-12-29 05:48:34 -05:00
Dustin Oprea 7fb09bbf9f value_context.go: `ValueContext` now wraps members in accessors
It also embeds the type and byte-order so the VC can materialize/process
values self-sufficiently.
2019-12-29 00:35:35 -05:00
Dustin Oprea a69c3987eb type.go: Created `TagTypePrimitive` alias for `uint16`
Added a `Size()` method to it and decommissioned redundant
`TagTypeSize()` and `(TagType).Size()`.

- ifd_enumerate.go: Moved `ValueContext` definition to
  value_context.go .
2019-12-29 00:03:58 -05:00