I'm uncomfortable exposing the internals of the file record struct from the 
ImageCache.

But I can offer a cleaner solution:

Just like you can retrieve various TextureSystem-wide statistics via 
TS::getattribute("stats:foo", ...), perhaps I can add an API function that lets 
you ask for statistics associated with a particular file. In fact, we should 
probably simply use the existing get_texture_info(), and I can make it aware of 
tags that retrieve the statistics. Then you can retrieve those in a way that's 
not dependent on the internals which may change, and assemble them into the XML 
or any other format you want.

Does that sound reasonable?


> On Jun 15, 2016, at 3:05 AM, Søren Ragsdale <[email protected]> wrote:
> 
> OIIO provides a OSL::TextureSystem.getstats() call, which is useful if you'd 
> like to see OIIO stats represented as one large string.
> 
> We're using OIIO inside OSL inside Prman-20. I'd like to stuff OIIO's texture 
> access stats into Prman's XML-formatted logfile. But in order to do this, we 
> need to have access to m_files which is a private member.
> 
> Could we get some kind of const access function for m_files?
> 

--
Larry Gritz
[email protected]


_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to