HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_OTLOptions.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: OP_OTLOptions.h ( OTL Library, C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __OP_OTLOptions__
13 #define __OP_OTLOptions__
14 
15 #include "OP_API.h"
16 
17 #include <UT/UT_Compression.h>
18 
19 class FS_IndexFile;
20 
21 #define OP_PARMSFROMVFL "ParmsFromVfl"
22 #define OP_PREFIXDROPPEDNPARMS "PrefixDroppedParms"
23 #define OP_PREFIXDROPPEDNPARMNAME "PrefixDroppedParmName"
24 #define OP_PREFIXDROPPEDNPARMLABEL "PrefixDroppedParmLabel"
25 #define OP_FORBIDOUTSIDEPARMS "ForbidOutsideParms"
26 #define OP_MAKEDEFAULT "MakeDefault"
27 #define OP_USEDSPARMS "UseDSParms"
28 #define OP_LOCKCONTENTS "LockContents"
29 #define OP_UNLOCKONCREATE "UnlockOnCreate"
30 #define OP_GZIPCONTENTS "GzipContents"
31 #define OP_CONTENTESCOMPRESSIONTYPE "ContentsCompressionType"
32 #define OP_CHECKEXTERNAL "CheckExternal"
33 #define OP_SAVECACHEDCODE "SaveCachedCode"
34 #define OP_SAVESPAREPARMS "SaveSpareParms"
35 #define OP_SAVEICON "SaveIcon"
36 
37 // Simple storage class for HDA options
39 {
40 public:
41  OP_OTLOptions() { *this = defaults(); }
42 
43  bool operator==(const OP_OTLOptions &options) const
44  {
45  return myParmsFromVfl == options.myParmsFromVfl &&
46  myPrefixDroppedParmName == options.myPrefixDroppedParmName &&
47  myPrefixDroppedParmLabel == options.myPrefixDroppedParmLabel &&
48  myForbidOutsideParms == options.myForbidOutsideParms &&
49  myMakeDefault == options.myMakeDefault &&
50  myUseDSParms == options.myUseDSParms &&
51  myLockContents == options.myLockContents &&
52  myUnlockOnCreate == options.myUnlockOnCreate &&
53  myCompressionType == options.myCompressionType &&
54  myCheckExternal == options.myCheckExternal &&
55  mySaveCachedCode == options.mySaveCachedCode &&
56  mySaveSpareParms == options.mySaveSpareParms &&
57  mySaveIcon == options.mySaveIcon;
58  }
59 
60  /// Save new defaults to the preference file.
61  void saveAsDefaults();
62 
63  /// The current defaults.
64  const OP_OTLOptions &defaults();
65 
66  bool operator!=(const OP_OTLOptions &options) const
67  { return !operator==(options); }
68 
81  bool mySaveIcon;
82 
83 private:
84  enum OP_OTLOptionsBaseCtor { BASECONSTRUCT };
85 
86  // This constructs the global defaults
87  OP_OTLOptions(OP_OTLOptionsBaseCtor);
88 
89  OP_OTLOptions &defaultsNC();
90 };
91 
92 /// Fills the OTL options object with type properties options from
93 /// the definition file. Returns false if unable to get the options,
94 /// possibly because they don't yet exist.
95 OP_API bool OPgetOTLOptions(FS_IndexFile *deffile,
96  OP_OTLOptions &options);
97 /// Sets the OTL options in the definition file.
98 OP_API void OPsetOTLOptions(FS_IndexFile *deffile,
99  const OP_OTLOptions &options);
100 
101 #endif
102 
bool myCheckExternal
Definition: OP_OTLOptions.h:78
bool operator==(const OP_OTLOptions &options) const
Definition: OP_OTLOptions.h:43
bool myPrefixDroppedParmName
Definition: OP_OTLOptions.h:70
bool mySaveCachedCode
Definition: OP_OTLOptions.h:79
UT_CompressionType myCompressionType
Definition: OP_OTLOptions.h:77
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
bool mySaveSpareParms
Definition: OP_OTLOptions.h:80
bool myForbidOutsideParms
Definition: OP_OTLOptions.h:72
OP_API void OPsetOTLOptions(FS_IndexFile *deffile, const OP_OTLOptions &options)
Sets the OTL options in the definition file.
OP_API bool OPgetOTLOptions(FS_IndexFile *deffile, OP_OTLOptions &options)
UT_CompressionType
#define OP_API
Definition: OP_API.h:10
bool myPrefixDroppedParmLabel
Definition: OP_OTLOptions.h:71
bool myUnlockOnCreate
Definition: OP_OTLOptions.h:76
bool operator!=(const OP_OTLOptions &options) const
Definition: OP_OTLOptions.h:66