Home
Virtual Image Printer DriverMiraplacid Publisher converts documents to images
Virtual Text Printer DriverMiraplacid Text Driver extracts text from documents
Miraplacid Data ViewerMiraplacid Data Viewer - access to internal structure of a binary file
Miraplacid Text ViewerMiraplacid Text Viewer - access to internal structure of a text file
Common:   Login | Rules of forum | Register
Management:  New topic | Close topic | Move topic | Delete topic
  

Miraplacid Forum >> Binary DOM and Text DOM >> Directory and pointer questionModerator:Cerberus

Author Topic:  Directory and pointer question
Morgenstern
Member

From: USA
Email
posted 2013-08-15 13:51:23 Reply -Delete

I'm having a couple of issues using directory / pointer.

directory Z {
type c
pointerRule current + root.a.z ...... seems to work, even though a.z not loaded .... or is it?
}

struct a {
uint8 x;
[pointer=Y]
uint8 y;
uint8 z;
}

document d {
a astruct;
[dataheap=true]
b otherstruct
}


Also,
is there a way to do parent.parent in type 'c' above to get to item in struct 'a'

Cerberus
Moderator

Web-page
Email
posted 2013-08-15 13:52:31 Reply -Delete

> directory Z {
> type c
> pointerRule current + root.a.z ...... seems to work, even though a.z not
> loaded .... or is it?
> }

Dataheap to particular data structures conversion is taking place after all
data in the file is successfully loaded.
So, all not-optional elements should be loaded at this moment.
Rules in pointers do not restricted to be used with "up and earlier" loaded
data (as in AcceptRule or restrictions in data structures).

> is there a way to do parent.parent in type 'c' above to get to item in
> struct 'a'

Yes, please, look at TIFF format description.
At the moment of execution of pointer-related rules, context of execution is
a pointer itself - current = pointer, parent = pointer.parent, etc.
Newly created content temporary connected to the parent of pointer
(newnode.Parent = pointer.Parent), but not included into its list of
children. It's enough for constructions like parent.parent to work.
This is done in such a way because current specific pointer context is more
important and relevant than common dataheap context.
After sucessful initialization and all checks, newly created node included
into a list of childrent of parent of dataheap and newnode.Parent =
dataheap.Parent.

Your message:
Name, password:
Go to category:  

Technical Support

Copyright © Miraplacid, 2003 - 2024