Help for formatting enums & arrays with clang-format

This commit is contained in:
Luis Díaz Más 2022-03-22 15:24:30 +01:00
parent 1bf7f44f53
commit 734b909721
3 changed files with 52 additions and 13 deletions

View File

@ -30,7 +30,18 @@ class PreviewImage;
/// @brief Contains all action classes (task subclasses).
namespace Action {
//! Enumerates all tasks
enum TaskType { none, adjust, print, rename, erase, extract, insert, modify, fixiso, fixcom };
enum TaskType {
none,
adjust,
print,
rename,
erase,
extract,
insert,
modify,
fixiso,
fixcom,
};
// *****************************************************************************
// class definitions

View File

@ -20,16 +20,21 @@
#include <regex>
#include <set>
// *****************************************************************************
// class definitions
//! Command identifiers
enum CmdId { invalidCmdId, add, set, del, reg };
enum CmdId {
invalidCmdId,
add,
set,
del,
reg,
};
//! Metadata identifiers
// enum MetadataId { invalidMetadataId, iptc, exif, xmp };
//! Metadata identifiers
// mdNone=0, mdExif=1, mdIptc=2, mdComment=4, mdXmp=8
enum MetadataId { invalidMetadataId = Exiv2::mdNone, iptc = Exiv2::mdIptc, exif = Exiv2::mdExif, xmp = Exiv2::mdXmp };
enum MetadataId {
invalidMetadataId = Exiv2::mdNone, // 0
exif = Exiv2::mdExif, // 1
iptc = Exiv2::mdIptc, // 2
xmp = Exiv2::mdXmp, // 8
};
//! Structure for one parsed modification command
struct ModifyCmd {
@ -114,7 +119,16 @@ class Params : public Util::Getopt {
Params(const Params& rhs) = delete;
//! Enumerates print modes
enum PrintMode { pmSummary, pmList, pmComment, pmPreview, pmStructure, pmXMP, pmIccProfile, pmRecursive };
enum PrintMode {
pmSummary,
pmList,
pmComment,
pmPreview,
pmStructure,
pmXMP,
pmIccProfile,
pmRecursive,
};
//! Individual items to print, bitmap
enum PrintItem {
@ -148,10 +162,18 @@ class Params : public Util::Getopt {
};
//! Enumerates the policies to handle existing files in rename action
enum FileExistsPolicy { overwritePolicy, renamePolicy, askPolicy };
enum FileExistsPolicy {
overwritePolicy,
renamePolicy,
askPolicy,
};
//! Enumerates year, month and day adjustments.
enum Yod { yodYear, yodMonth, yodDay };
enum Yod {
yodYear,
yodMonth,
yodDay,
};
//! Structure for year, month and day adjustment command line arguments.
struct YodAdjust {

View File

@ -63,7 +63,13 @@ class EXIV2API LogMsg {
@brief Defined log levels. To suppress all log messages, either set the
log level to \c mute or set the log message handler to 0.
*/
enum Level { debug = 0, info = 1, warn = 2, error = 3, mute = 4 };
enum Level {
debug = 0,
info = 1,
warn = 2,
error = 3,
mute = 4,
};
/*!
@brief Type for a log message handler function. The function receives
the log level and message and can process it in an application