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:
42  : myParmsFromVfl(false)
43  , myPrefixDroppedParmName(true)
44  , myPrefixDroppedParmLabel(true)
45  , myForbidOutsideParms(true)
46  , myMakeDefault(true)
47  , myUseDSParms(true)
48  , myLockContents(true)
49  , myUnlockOnCreate(false)
50  , myCompressionType(UT_COMPRESSION_TYPE_GZIP)
51  , myCheckExternal(true)
52  , mySaveCachedCode(false)
53  , mySaveSpareParms(false)
54  , mySaveIcon(true)
55  {}
56 
57  bool operator==(const OP_OTLOptions &options) const
58  {
59  return myParmsFromVfl == options.myParmsFromVfl &&
60  myPrefixDroppedParmName == options.myPrefixDroppedParmName &&
61  myPrefixDroppedParmLabel == options.myPrefixDroppedParmLabel &&
62  myForbidOutsideParms == options.myForbidOutsideParms &&
63  myMakeDefault == options.myMakeDefault &&
64  myUseDSParms == options.myUseDSParms &&
65  myLockContents == options.myLockContents &&
66  myUnlockOnCreate == options.myUnlockOnCreate &&
67  myCompressionType == options.myCompressionType &&
68  myCheckExternal == options.myCheckExternal &&
69  mySaveCachedCode == options.mySaveCachedCode &&
70  mySaveSpareParms == options.mySaveSpareParms &&
71  mySaveIcon == options.mySaveIcon;
72  }
73 
74  bool operator!=(const OP_OTLOptions &options) const
75  { return !operator==(options); }
76 
89  bool mySaveIcon;
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:86
bool operator==(const OP_OTLOptions &options) const
Definition: OP_OTLOptions.h:57
bool myPrefixDroppedParmName
Definition: OP_OTLOptions.h:78
bool mySaveCachedCode
Definition: OP_OTLOptions.h:87
UT_CompressionType myCompressionType
Definition: OP_OTLOptions.h:85
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
bool mySaveSpareParms
Definition: OP_OTLOptions.h:88
bool myForbidOutsideParms
Definition: OP_OTLOptions.h:80
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:79
bool myUnlockOnCreate
Definition: OP_OTLOptions.h:84
bool operator!=(const OP_OTLOptions &options) const
Definition: OP_OTLOptions.h:74