#include <pfs.h>
Public Member Functions | |
| FrameFileIterator (int &argc, char *argv[], const char *fopenMode, const char *fileNamePrefix=NULL, FILE *stdinout=NULL, const char *optstring=NULL, const struct option *getopt_long=NULL) | |
| Creates new iterator over frame files. | |
| FrameFile | getNextFrameFile () |
| Get the file handle FILE* and file name for the next frame. | |
| void | closeFrameFile (FrameFile &frameFile) |
| Close file openned with getNextFrameFile. | |
It can handle patterns, like frame04d.hdr, where 04d is replaced with specified range of frame numbers.
Definition at line 471 of file pfs.h.
| pfs::FrameFileIterator::FrameFileIterator | ( | int & | argc, | |
| char * | argv[], | |||
| const char * | fopenMode, | |||
| const char * | fileNamePrefix = NULL, |
|||
| FILE * | stdinout = NULL, |
|||
| const char * | optstring = NULL, |
|||
| const struct option * | getopt_long = NULL | |||
| ) |
Creates new iterator over frame files.
Command line arguments are parsed and all recognized arguments are removed.
| argc | argument count passed to program's main function. | |
| argv | argument values passed to program's main function. | |
| fopenMode | mode used to fopen frame files, usually "rb" or "wb" | |
| fileNamePrefix | each frame pattern must be preceded with this string (for example "-i'). If NULL, every argument that does not start with "-" is treated as a frame pattern. | |
| stdinout | if set, treat '-' file name specially and instead of opening a named file, use filedescriptor passed as this parameter. It should be used to get or write data to stdin / stdout. | |
| optstring | parameter string passed to getopt() function. When optstring != NULL, FrameFileIterator will skip all parameters and their required arguments. Optional arguments are not handled. | |
| getopt_long | parameter structure passed to getopt_long() function. When getopt_long != NULL, FrameFileIterator will skip all parameters and their required arguments. Optional arguments are not handled. |
| CommandLineException | on bad syntax of command line options |
| FrameFile pfs::FrameFileIterator::getNextFrameFile | ( | ) |
Get the file handle FILE* and file name for the next frame.
Note that fileName string is valid until next call to getNextFrameFile or closeFrameFile.
When file handle is no longer needed, closeFileFile should be called.
| Exception | if the file is not found |
| void pfs::FrameFileIterator::closeFrameFile | ( | FrameFile & | frameFile | ) |
Close file openned with getNextFrameFile.
| frameFile | FrameFile object returned from getNextFrameFile |
1.5.3