"Thomas Dickerson" writes:

> I'm sorry if this is something that I should know, but osg::ifstream
> doesn't seem to have any way of peeking at the next byte or
> reading/pushing back a byte. I am attempting to implement a platform
> agnostic readLine() method that can handle \r\n, \r, or \n. Is there a
> wrapper class I should be using here with the ifstream, or is there
> another strategy I should use?
>
> Also, I should note that this is a binary stream, since the file type
> has a mix of binary and textual data.

Hi Thomas,

since osgDB::ifstream inherits from std, you can try putback(char c)

http://www.cplusplus.com/reference/iostream/istream/putback/

Regards,

-- 
Alberto

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to