Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API concept #23

Open
smurn opened this issue Dec 18, 2011 · 2 comments
Open

New API concept #23

smurn opened this issue Dec 18, 2011 · 2 comments

Comments

@smurn
Copy link
Owner

smurn commented Dec 18, 2011

Currently a PlyReader 'reads' ElementReaders with read Elements. While this makes sense its not very elegant.

I like the way ZipInputStream handles the same situation (a zip file contains mutliple zipped files).

This could look like this:

PlyReader.getNextElementType()

will advance the internal pointer to the first element of the next type. Those can then be read with

PlyReader.readElement()

which will return null at the end of the type even if the end of the file has not yet been reached.

This would avoid the ElementReaders and the problematic that they need to be closed first. One file represents one stream and one stream should only be represented by one class.

@smurn
Copy link
Owner Author

smurn commented Dec 18, 2011

If we rename ElementType to ElementGroup then we can include the element count which is currently unelegantly separated.

@smurn
Copy link
Owner Author

smurn commented Dec 18, 2011

We might consider renaming PlyReader to PlyInputStream to follow the usual naming conventions.

smurn added a commit that referenced this issue Dec 19, 2011
Removed pretty much everything else.
See #23.

Signed-off-by: Stefan C. Mueller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant