Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
BatchTools.h
Go to the documentation of this file.
1//! @file BatchTools.h
2//! Some enums for
3//////////////////////////////////////////////////////////////////////
4
5#if !defined(AFX_BATCHTOOLS_H__12CD9483_C809_11D3_A382_9415BA0D2432__INCLUDED_)
6#define AFX_BATCHTOOLS_H__12CD9483_C809_11D3_A382_9415BA0D2432__INCLUDED_
7
8#ifdef _MSC_VER
9#pragma once
10#endif // _MSC_VER
11
12BEGIN_MOOTOOLS_NAMESPACE
13
14// The value must match items order
15// Do not changes the value order
16//! @enum BatchSrcMode
17//! @brief Can be used for defining a batch source mode.
18//! @details Cf CRUNCHER_SRCMODE_PARAM BatchCruncherOptions::Parameters
19typedef enum BatchSrcMode
20{
21 BATCHSRC_SELECTED_FILES = 0, //!< Source are selected files (might be in different folders)
22 BATCHSRC_CURRENT_DIR, //!< Source is a directory unless BATCHINFO_IS_ALBUM is set
23 BATCHSRC_SELECTED_DIR, //!< Source is a selected directory
25
26// The value must match items order
27// Do not these changes the value orders
28//! @enum BatchDstMode
29//! @brief Can be used for defining a batch destt mode.
30//! @details Cf CRUNCHER_DSTMODE_PARAM BatchCruncherOptions::Parameters
31typedef enum BatchDstMode
32{
33 BATCHDST_SRC_DIR = 0, //!< Batch results are in src dir
34 BATCHDST_SRC_SUBDIR, //!< Batch results are in sub dir of the src
35 BATCHDST_NEW_DIR, //!< Batch results are in a new folder
37
38class DLL_TOOLSFUNCTION BatchInfo
39{
40public:
41 unsigned int srcmode; // Source mode;
42 unsigned int dstmode; // Destination folder creation mode
43
44 CXString srcpath; // Src path
45 CXString dstpath; // Dst path
46 BOOL recreatedir, recursefolders; // destination folder info
47
48 typedef enum _BATCHINFO_FLAGS
49 {
50 BATCHINFO_NONE = 0x00,
51 BATCHINFO_IS_ALBUM = 0x01, // Special mode for BATCHSRC_CURRENT_DIR
52 BATCHINFO_SEL_SINGLE_DIR = 0x02, // All selected files are in same dir
53 BATCHINFO_ALBUM_SINGLE_DIR = 0x04, // All album files are in same dir
54
55 BATCHINFO_SELFILES_CHANGED = 0x10, // sel files changes
56 BATCHINFO_ALBUMFILES_CHANGED = 0x20, // album files changes
57 } BATCHINFO_FLAGS;
58
59private:
60 bool selFileIsAnUserChoice;
61 CXStringArray selfiles, albumfiles;
62 unsigned int flags;
63
64 CXString GetSrcFolder(BOOL& singledir, const CXString& fileToProcess = CXString()) const;
65
66public:
67 BatchInfo();
68
69 BOOL CanRecurseFolder(BOOL checkForDialog = FALSE) const;
70 BOOL CanRecreateFolderTree(BOOL checkForDialog = FALSE) const;
71
72 void SetSelFiles(const CXStringArray& files, bool userChoice); // We have a selection of files (we can use BATCHDST_SRC_SUBDIR = 0 mode)
73 void SetAlbumFiles(const CXStringArray& files); // We have an album (a set of files) when we use BATCHDST_CRUNCHER_SRCDIR_PARAM = 1, this feature is mainly use in batch dialog editor with 3DBrowser software
74
75 const CXStringArray& GetSelFiles() const { return selfiles; };
76 const CXStringArray& GetAlbumFiles() const { return albumfiles; };
77
78 void SetAlbumMode(bool set);
79 bool IsUserChoice() const { return selFileIsAnUserChoice; }
80 BOOL IsAlbum() const { return !!(flags & BATCHINFO_IS_ALBUM); };
81 CXString GetInformation() const;
82 CXString GetDstFolder(const CXString& fileToProcess) const;
83 BOOL CreateDstFolder(const CXString& fileToProcess) const;
84 BOOL CheckDstFolder(BOOL showMessage) const;
85};
86
87END_MOOTOOLS_NAMESPACE
88
89#endif // !defined(AFX_BATCHTOOLS_H__12CD9483_C809_11D3_A382_9415BA0D2432__INCLUDED_)
BatchDstMode
Can be used for defining a batch destt mode.
Definition BatchTools.h:32
@ BATCHDST_NEW_DIR
Batch results are in a new folder.
Definition BatchTools.h:35
@ BATCHDST_SRC_SUBDIR
Batch results are in sub dir of the src.
Definition BatchTools.h:34
@ BATCHDST_SRC_DIR
Batch results are in src dir.
Definition BatchTools.h:33
BatchSrcMode
Can be used for defining a batch source mode.
Definition BatchTools.h:20
@ BATCHSRC_CURRENT_DIR
Source is a directory unless BATCHINFO_IS_ALBUM is set.
Definition BatchTools.h:22
@ BATCHSRC_SELECTED_DIR
Source is a selected directory.
Definition BatchTools.h:23
@ BATCHSRC_SELECTED_FILES
Source are selected files (might be in different folders)
Definition BatchTools.h:21
CXTString< TCHAR > CXString
CXString depend on the target OS. Could be CXStringW (Windows) or CXStringA (Linux / Macos)
Definition XString.h:118
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
CXStringArray implement an array of CXString.
Definition XStringArray.h:25