Hi folks

Dom, great to see that you've updated that PdfContentsTokenizer code and 
moved it into the main sources. I suspect it'll be really handy, and I 
like the code too.

One thing I've been wondering though is whether ReadNext(...) should 
return bool, with true meaning "output valid" and false being "nothing 
to read, output undefined". It'd return false if it detected a normal 
EOF in a sensible place.

That'd let a user of the API just write:

while ( contentsTokenizer.ReadNext( &type, &kw, &var ) )
{
    // do stuff
}

without worrying about catching exceptions if all they care about is 
detecting EOF.

I'm also not 100% clear about the meaning of UnexpectedEOF from a user's 
point of view. Clearly at present it doesn't indicate an error since 
there's no other way to detect EOF using PdfContentsTokenizer, so in 
every stream read we expect an UnexpectedEOF at the end. That's somewhat 
counter-intuitive IMO, and I personally think a bool return would be 
clearer.

Am I missing something obvious?

--
Craig Ringer

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to