HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TIL_FileIterator.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: TIL_FileIterator.h (TIL library, C++)
7
*
8
* COMMENTS:
9
* A quick iterator class for writing numbered files. Will prompt the
10
* user if an existing file with a matching name is present.
11
*/
12
#ifndef TIL_FILE_ITERATOR_H
13
#define TIL_FILE_ITERATOR_H
14
15
#include "
TIL_API.h
"
16
#include <
UT/UT_NonCopyable.h
>
17
#include <
UT/UT_String.h
>
18
19
enum
{
20
TIL_SAVE_OK
,
21
TIL_OVERWRITE
,
22
TIL_SAVE_ABORT
,
23
TIL_FILE_SKIP
24
};
25
26
class
TIL_API
TIL_FileIteratorUI
27
{
28
public
:
29
TIL_FileIteratorUI
() =
default
;
30
virtual
~
TIL_FileIteratorUI
();
31
UT_NON_COPYABLE
(
TIL_FileIteratorUI
)
32
33
virtual
bool
errorAbort(
const
char
*file,
bool
&continue_always,
34
bool
multiple) = 0;
35
36
virtual
int
overwriteConfirm(
const
char
*file,
bool
&continue_always,
37
bool
multiple) = 0;
38
virtual
void
showMessage(
const
char
*
message
) = 0;
39
};
40
41
class
TIL_API
TIL_FileIterator
42
{
43
public
:
44
TIL_FileIterator
(
const
char
*filepat);
45
~
TIL_FileIterator
();
46
UT_NON_COPYABLE
(
TIL_FileIterator
)
47
48
void
init(
int
fstart,
int
fend,
int
step = 1);
49
50
const
char
*iterate();
51
int
getFrame
()
const
{
return
myCurrentFrame -
myStep
; }
52
bool
isLastFrame
()
const
{
return
myCurrentFrame > myEnd; }
53
float
getFractionDone()
const
;
54
55
static
bool
errorAbort(
const
char
*file,
56
bool
&continue_always,
57
bool
multiple);
58
59
static
int
overwriteConfirm(
const
char
*file,
60
bool
&continue_always,
61
bool
multiple);
62
static
int
overwrite(
const
char
*file,
63
bool
&continue_always,
64
bool
multiple);
65
66
static
void
showMessage(
const
char
*
message
);
67
68
static
void
setUI(
TIL_FileIteratorUI
*ui);
69
70
private
:
71
UT_String
myFilePat;
72
UT_String
myPrefix;
73
UT_String
mySuffix;
74
UT_String
myCurrentFile;
75
int
myPad;
76
int
myStart, myEnd,
myStep
;
77
int
myCurrentFrame;
78
int
myCurrentIter;
79
bool
myMultipleFiles;
80
bool
myMultipleFilesUseIter;
81
};
82
83
#endif
message
GLuint GLsizei const GLchar * message
Definition:
glcorearb.h:2543
TIL_SAVE_ABORT
Definition:
TIL_FileIterator.h:22
TIL_SAVE_OK
Definition:
TIL_FileIterator.h:20
TIL_API.h
myStep
int myStep
Definition:
GT_CurveEval.h:264
TIL_FileIterator::getFrame
int getFrame() const
Definition:
TIL_FileIterator.h:51
UT_String.h
TIL_FileIteratorUI
Definition:
TIL_FileIterator.h:26
TIL_FILE_SKIP
Definition:
TIL_FileIterator.h:23
TIL_OVERWRITE
Definition:
TIL_FileIterator.h:21
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
UT_NonCopyable.h
TIL_FileIterator::isLastFrame
bool isLastFrame() const
Definition:
TIL_FileIterator.h:52
TIL_FileIterator
Definition:
TIL_FileIterator.h:41
UT_String
Definition:
UT_String.h:73
TIL_API
#define TIL_API
Definition:
TIL_API.h:10
TIL
TIL_FileIterator.h
Generated on Fri Nov 8 2024 03:41:39 for HDK by
1.8.6