#include <essence.h>
Inheritance diagram for ListOfFiles:
Public Member Functions | |
ListOfFiles (std::string FileName="") | |
Construct a ListOfFiles and optionally set a single source filename pattern. | |
virtual | ~ListOfFiles () |
Virtual destructor to allow polymorphism. | |
void | SetFileName (std::string &FileName) |
Set a single source filename pattern. | |
void | AddFileName (std::string &FileName) |
Add a source filename pattern. | |
void | SetNewFileHandler (NewFileHandlerPtr &NewHandler) |
Set a handler to receive notification of all file open actions. | |
void | SetNewFileHandler (NewFileHandler *NewHandler) |
Set a handler to receive notification of all file open actions. | |
Position | GetRangeStart (void) const |
Get the start of any range specified, or -1 if none. | |
Position | GetRangeEnd (void) const |
Get the end of any range specified, or -1 if none. | |
Position | GetRangeDuration (void) const |
Get the duration of any range specified, or -1 if none. | |
std::string | FileName (void) |
Get the current filename. | |
virtual bool | OpenFile (void)=0 |
Open the current file (any new-file handler will already have been called). | |
virtual void | CloseFile (void)=0 |
Close the current file. | |
virtual bool | IsFileOpen (void)=0 |
Is the current file open? | |
bool | IsFileList (void) |
Is the current filename pattern a list rather than a single file? | |
bool | GetNextFile (void) |
Open the next file in the set of source files. | |
Protected Member Functions | |
void | ParseFileName (std::string FileName) |
Parse a given multi-file name. | |
Protected Attributes | |
NewFileHandlerPtr | Handler |
Handler to be informed of new filenames. | |
std::string | BaseFileName |
Base filename as a printf string. | |
std::list< std::string > | FollowingNames |
Names to be processed next. | |
bool | FileList |
True if this is a multi-file set rather than a single file (or if a range is in use). | |
int | ListOrigin |
Start number for filename building. | |
int | ListIncrement |
Number to add to ListOrigin for each new file. | |
int | ListNumber |
The number of files in the list or -1 for "end when no more files". | |
int | ListEnd |
The last file number in the list or -1 for "end when no more files". | |
int | FileNumber |
The file number to use for the next source file to open. | |
int | FilesRemaining |
The number of files remaining in the list or -1 for "end when no more files". | |
bool | AtEOF |
True once the last file has hit it's end of file. | |
std::string | CurrentFileName |
The name of the current file (if open). | |
Position | RangeStart |
The requested first edit unit, or -1 if none specified. | |
Position | RangeEnd |
The requested last edit unit, or -1 if using RequestedDuration. | |
Length | RangeDuration |
The requested duration, or -1 if using RequestedEnd. |
ListOfFiles | ( | std::string | FileName = "" |
) | [inline] |
Construct a ListOfFiles and optionally set a single source filename pattern.
virtual ~ListOfFiles | ( | ) | [inline, virtual] |
Virtual destructor to allow polymorphism.
void SetFileName | ( | std::string & | FileName | ) | [inline] |
Set a single source filename pattern.
void AddFileName | ( | std::string & | FileName | ) | [inline] |
Add a source filename pattern.
void SetNewFileHandler | ( | NewFileHandlerPtr & | NewHandler | ) | [inline] |
Set a handler to receive notification of all file open actions.
void SetNewFileHandler | ( | NewFileHandler * | NewHandler | ) | [inline] |
Set a handler to receive notification of all file open actions.
Position GetRangeStart | ( | void | ) | const [inline] |
Get the start of any range specified, or -1 if none.
Position GetRangeEnd | ( | void | ) | const [inline] |
Get the end of any range specified, or -1 if none.
Position GetRangeDuration | ( | void | ) | const [inline] |
Get the duration of any range specified, or -1 if none.
std::string FileName | ( | void | ) | [inline] |
Get the current filename.
virtual bool OpenFile | ( | void | ) | [pure virtual] |
Open the current file (any new-file handler will already have been called).
This function must be supplied by the derived class
Implemented in FileParser.
virtual void CloseFile | ( | void | ) | [pure virtual] |
Close the current file.
This function must be supplied by the derived class
Implemented in FileParser.
virtual bool IsFileOpen | ( | void | ) | [pure virtual] |
Is the current file open?
This function must be supplied by the derived class
Implemented in FileParser.
bool IsFileList | ( | void | ) | [inline] |
Is the current filename pattern a list rather than a single file?
bool GetNextFile | ( | void | ) |
Open the next file in the set of source files.
void ParseFileName | ( | std::string | FileName | ) | [protected] |
Parse a given multi-file name.
NewFileHandlerPtr Handler [protected] |
Handler to be informed of new filenames.
std::string BaseFileName [protected] |
Base filename as a printf string.
std::list<std::string> FollowingNames [protected] |
Names to be processed next.
bool FileList [protected] |
True if this is a multi-file set rather than a single file (or if a range is in use).
int ListOrigin [protected] |
Start number for filename building.
int ListIncrement [protected] |
Number to add to ListOrigin for each new file.
int ListNumber [protected] |
The number of files in the list or -1 for "end when no more files".
int ListEnd [protected] |
The last file number in the list or -1 for "end when no more files".
int FileNumber [protected] |
The file number to use for the next source file to open.
int FilesRemaining [protected] |
The number of files remaining in the list or -1 for "end when no more files".
bool AtEOF [protected] |
True once the last file has hit it's end of file.
std::string CurrentFileName [protected] |
The name of the current file (if open).
Position RangeStart [protected] |
The requested first edit unit, or -1 if none specified.
Length RangeDuration [protected] |
The requested duration, or -1 if using RequestedEnd.