ifd_builder.go: Add NextIb() so can access sibling IBs

pull/12/head
Dustin Oprea 2019-02-26 12:23:16 -05:00
parent 0dfac8434c
commit 38a16c885e
2 changed files with 7 additions and 0 deletions

View File

@ -311,6 +311,10 @@ func NewIfdBuilderFromExistingChain(rootIfd *Ifd, itevr *IfdTagEntryValueResolve
return firstIb
}
func (ib *IfdBuilder) NextIb() (nextIb *IfdBuilder, err error) {
return ib.nextIb, nil
}
func (ib *IfdBuilder) ChildWithTagId(childIfdTagId uint16) (childIb *IfdBuilder, err error) {
defer func() {
if state := recover(); state != nil {

View File

@ -434,6 +434,9 @@ func (ie *IfdEnumerate) Scan(rootIfdName string, ifdOffset uint32, visitor RawTa
// Ifd represents a single parsed IFD.
type Ifd struct {
// TODO(dustin): !! Why are all of these public? Privatize them and then add NextIfd().
// This is just for convenience, just so that we can easily get the values
// and not involve other projects in semantics that they won't otherwise
// need to know.