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
FS_FileHistoryManager.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: FS_FileHistoryManager.h (C++)
7
*
8
* COMMENTS:
9
*
10
*/
11
12
#ifndef __FS_FileHistoryManager__
13
#define __FS_FileHistoryManager__
14
15
#include "
FS_API.h
"
16
#include <
UT/UT_Array.h
>
17
#include <
UT/UT_NonCopyable.h
>
18
#include <
UT/UT_UniquePtr.h
>
19
20
// IMPORTANT: Must be kept in sync with FS_FileHistoryTypeNames
21
enum
FS_FileHistoryType
22
{
23
FS_FILEHISTORY_HIP
= 0,
24
FS_FILEHISTORY_PIC
,
25
FS_FILEHISTORY_GEO
,
26
FS_FILEHISTORY_RAMP
,
27
FS_FILEHISTORY_CAPT
,
28
FS_FILEHISTORY_CLIP
,
29
FS_FILEHISTORY_PAINT
,
30
FS_FILEHISTORY_LUT
,
31
FS_FILEHISTORY_CMD
,
32
FS_FILEHISTORY_MIDI
,
33
FS_FILEHISTORY_TXT
,
34
FS_FILEHISTORY_I3D
,
35
FS_FILEHISTORY_CHAN
,
36
FS_FILEHISTORY_FONT
,
37
FS_FILEHISTORY_OTL
,
38
FS_FILEHISTORY_MISC
,
39
FS_FILEHISTORY_SIM
,
40
FS_FILEHISTORY_SIMDATA
,
41
FS_FILEHISTORY_DAE
,
42
FS_FILEHISTORY_DS
,
43
FS_FILEHISTORY_FBX
,
44
FS_FILEHISTORY_GAL
,
45
FS_FILEHISTORY_MOV
,
46
FS_FILEHISTORY_ICON
,
47
FS_FILEHISTORY_ALEMBIC
,
48
FS_FILEHISTORY_GLTF
,
49
FS_FILEHISTORY_LIGHTRIG
,
50
FS_FILEHISTORY_PRJ
,
51
FS_FILEHISTORY_PSD
,
52
FS_FILEHISTORY_DIRECTORY
,
53
FS_FILEHISTORY_USD
,
54
FS_FILEHISTORY_SQLITE
,
55
FS_MAX_HISTORY_TYPES
56
};
57
58
class
UT_String
;
59
60
class
FS_FileHistory
;
61
62
class
FS_API
FS_FileHistoryManager
63
{
64
public
:
65
66
static
FS_FileHistoryManager
*getFileHistoryManager();
67
68
~
FS_FileHistoryManager
();
69
UT_NON_COPYABLE
(
FS_FileHistoryManager
)
70
71
void
saveFileHistoryList();
72
void
saveDirHistoryList();
73
74
void
loadFileHistoryList();
75
void
loadDirHistoryList();
76
77
78
// Queries the files for a menu.
79
int
numFilesInList(
FS_FileHistoryType
filetype)
const
;
80
const
char
*getFilenameFromList(
int
index
,
FS_FileHistoryType
filetype)
const
;
81
82
// Queries the directories for a menu.
83
int
numDirsInList(
FS_FileHistoryType
filetype)
const
;
84
const
char
*getDirFromList(
int
index,
FS_FileHistoryType
filetype)
const
;
85
86
void
getFormattedFilenameFromList(
int
index,
87
FS_FileHistoryType
filetype,
UT_String
&
path
)
const
;
88
void
getFormattedDirFromList(
int
index,
89
FS_FileHistoryType
filetype,
UT_String
&path)
const
;
90
91
// This will add to both the file and directory history
92
void
addFileToHistoryList(
const
char
*
filename
,
93
FS_FileHistoryType
filetype);
94
void
removeFileFromHistoryList(
const
char
*filename,
95
FS_FileHistoryType
filetype);
96
97
protected
:
98
FS_FileHistoryManager
();
99
100
void
saveHistoryList(
const
char
*filename,
bool
filelist);
101
void
loadHistoryList(
const
char
*filename,
bool
filelist);
102
private
:
103
FS_FileHistory
*getHistoryList(
FS_FileHistoryType
filetype);
104
const
FS_FileHistory
*getHistoryList(
FS_FileHistoryType
filetype)
const
;
105
FS_FileHistory
*getDirHistoryList(
FS_FileHistoryType
filetype);
106
const
FS_FileHistory
*getDirHistoryList(
FS_FileHistoryType
filetype)
const
;
107
108
using
FS_FileHistoryPtr =
UT_UniquePtr<FS_FileHistory>
;
109
UT_Array<FS_FileHistoryPtr>
myHistoryList;
110
UT_Array<FS_FileHistoryPtr>
myDirHistoryList;
111
};
112
113
#define FSgetFileHistoryManager FS_FileHistoryManager::getFileHistoryManager
114
115
#endif
GT_Names::filename
GT_API const UT_StringHolder filename
FS_FileHistoryType
FS_FileHistoryType
Definition:
FS_FileHistoryManager.h:21
FS_FILEHISTORY_MISC
Definition:
FS_FileHistoryManager.h:38
FS_FILEHISTORY_RAMP
Definition:
FS_FileHistoryManager.h:26
FS_FileHistory
Definition:
FS_FileHistory.h:23
path
GLsizei const GLchar *const * path
Definition:
glcorearb.h:3341
FS_FILEHISTORY_MIDI
Definition:
FS_FileHistoryManager.h:32
FS_FILEHISTORY_PAINT
Definition:
FS_FileHistoryManager.h:29
FS_FILEHISTORY_OTL
Definition:
FS_FileHistoryManager.h:37
FS_FILEHISTORY_GAL
Definition:
FS_FileHistoryManager.h:44
FS_FILEHISTORY_PRJ
Definition:
FS_FileHistoryManager.h:50
UT_Array.h
FS_FILEHISTORY_DIRECTORY
Definition:
FS_FileHistoryManager.h:52
UT_Array< FS_FileHistoryPtr >
FS_FileHistoryManager
Definition:
FS_FileHistoryManager.h:62
FS_FILEHISTORY_LIGHTRIG
Definition:
FS_FileHistoryManager.h:49
UT_UniquePtr
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition:
UT_UniquePtr.h:39
FS_FILEHISTORY_LUT
Definition:
FS_FileHistoryManager.h:30
FS_API.h
FS_FILEHISTORY_CAPT
Definition:
FS_FileHistoryManager.h:27
FS_FILEHISTORY_ICON
Definition:
FS_FileHistoryManager.h:46
FS_FILEHISTORY_ALEMBIC
Definition:
FS_FileHistoryManager.h:47
FS_FILEHISTORY_PSD
Definition:
FS_FileHistoryManager.h:51
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
FS_FILEHISTORY_MOV
Definition:
FS_FileHistoryManager.h:45
FS_FILEHISTORY_HIP
Definition:
FS_FileHistoryManager.h:23
FS_FILEHISTORY_PIC
Definition:
FS_FileHistoryManager.h:24
FS_FILEHISTORY_DS
Definition:
FS_FileHistoryManager.h:42
FS_FILEHISTORY_CHAN
Definition:
FS_FileHistoryManager.h:35
FS_FILEHISTORY_FBX
Definition:
FS_FileHistoryManager.h:43
FS_FILEHISTORY_CMD
Definition:
FS_FileHistoryManager.h:31
FS_FILEHISTORY_SIMDATA
Definition:
FS_FileHistoryManager.h:40
UT_NonCopyable.h
FS_MAX_HISTORY_TYPES
Definition:
FS_FileHistoryManager.h:55
FS_FILEHISTORY_I3D
Definition:
FS_FileHistoryManager.h:34
FS_FILEHISTORY_SIM
Definition:
FS_FileHistoryManager.h:39
FS_FILEHISTORY_DAE
Definition:
FS_FileHistoryManager.h:41
UT_UniquePtr.h
FS_FILEHISTORY_FONT
Definition:
FS_FileHistoryManager.h:36
FS_FILEHISTORY_USD
Definition:
FS_FileHistoryManager.h:53
index
GLuint index
Definition:
glcorearb.h:786
FS_FILEHISTORY_SQLITE
Definition:
FS_FileHistoryManager.h:54
UT_String
Definition:
UT_String.h:73
FS_FILEHISTORY_GEO
Definition:
FS_FileHistoryManager.h:25
FS_FILEHISTORY_TXT
Definition:
FS_FileHistoryManager.h:33
FS_FILEHISTORY_CLIP
Definition:
FS_FileHistoryManager.h:28
FS_FILEHISTORY_GLTF
Definition:
FS_FileHistoryManager.h:48
FS_API
#define FS_API
Definition:
FS_API.h:10
FS
FS_FileHistoryManager.h
Generated on Sun Nov 24 2024 02:44:16 for HDK by
1.8.6