HDK
|
#include <OP_OTLLibrary.h>
Public Types | |
enum | OP_ModTimeStatus { MOD_TIME_OK, MOD_TIME_INTERNAL, MOD_TIME_SAVE_QUIT, MOD_TIME_DISCARD_QUIT, MOD_TIME_EMBED, MOD_TIME_REFRESH_ALL, MOD_TIME_LOAD_FILE } |
![]() | |
typedef bool(* | ConvertFunc )(const UT_StringHolder &src_path, const UT_WorkBuffer &in_data, UT_WorkBuffer &out_data) |
typedef UT_ArrayStringMap < ConversionFuncs > | ConversionList |
Public Member Functions | |
OP_OTLLibrary () | |
OP_OTLLibrary (FS_Reader *reader) | |
OP_OTLLibrary (const char *source, const char *metasrc) | |
~OP_OTLLibrary () override | |
const UT_StringHolder & | getMetaSource () const |
const UT_StringHolder & | getSource () const |
OP_ModTimeStatus | getSourceModTime (time_t &mod_time, const char *type_name=NULL) const |
bool | addDefinition (const OP_OTLDefinition &definition, time_t modtime=time_t(-1)) |
bool | removeDefinition (int index) |
int | getNumDefinitions () const |
const OP_OTLDefinition & | getDefinition (int index) const |
int | getDefinitionIndex (const char *tablename, const char *opname) const |
time_t | getDefinitionModTime (int index) const |
const UT_StringHolder & | getDefinitionName (int index) const |
const UT_StringHolder & | getDefinitionOpTableName (int index) const |
bool | getDefinitionIsDummy (int index) const |
bool | getDefinition (int index, OP_OTLDefinition &definition) const |
FS_IndexFileHandle | getDefinitionIndexFile (const char *tablename, const char *opname) const |
bool | removeDefinitionSectionIfEmpty (int index, const char *definition_section) |
void | mergeLibrary (const OP_OTLLibrary &lib) |
bool | expandToDirectory (const char *destdir) override |
bool | collapseFromDirectory (const char *srcdir) override |
void | writeFile (std::ostream &os) const override |
void | setIsBeingRefreshed (bool beingrefreshed) |
bool | getIsBeingRefreshed () const |
void | beginCachingSourceModTime () |
void | endCachingSourceModTime () |
bool | getIsModTimeAccessOK () const |
const UT_StringArray & | getErrorMessages () const |
![]() | |
FS_IndexFile () | |
Default constructor. More... | |
FS_IndexFile (const char *source) | |
FS_IndexFile (FS_Reader *reader, const char *source=nullptr) | |
virtual | ~FS_IndexFile () |
bool | hasSection (const UT_StringRef §ion) const |
bool | hasTempSection (const UT_StringRef §ion) const |
bool | hasRegularSection (const UT_StringRef §ion) const |
time_t | getSectionModTime (const UT_StringRef §ion) const |
int | getSectionDataSize (const UT_StringRef §ion) const |
bool | readSection (const UT_StringRef §ion, char *buffer) const |
bool | readSection (const UT_StringRef §ion, UT_WorkBuffer &buffer) const |
bool | readOptionsSection (const UT_StringRef §ion, UT_Options &options) const |
void | addSection (const UT_StringRef §ion, const char *filename) |
void | addSection (const UT_StringRef §ion, const UT_WorkBuffer &buf, time_t modtime=time_t(-1)) |
void | addSection (const UT_StringRef §ion, const char *buffer, int len, time_t modtime=time_t(-1)) |
void | addSection (const UT_StringRef §ion, const FS_IndexFile &file) |
void | modifySection (const UT_StringRef §ion, const char *buffer, int len, time_t modtime=time_t(-1)) |
void | modifySection (const UT_StringRef §ion, const UT_WorkBuffer &buf, time_t modtime=time_t(-1)) |
void | removeSection (const UT_StringRef §ion) |
void | mergeIndexFile (const FS_IndexFile &file, bool overwrite) |
void | moveSections (int first, int last, int offset) |
time_t | getModTime () const |
int64 | getFileDataSize () const |
void | setFilters (FS_WriteFilterFactory *encrypt_factory, FS_IStreamFilterFactory *decrypt_factory) |
FS_WriteFilterFactory * | getEncryptionFilter () const |
FS_IStreamFilterFactory * | getDecryptionFilter () const |
FS_Section * | getSection (const UT_StringRef §ion) const |
FS_Reader * | getSectionReader (const UT_StringRef §ion) const |
FS_ReaderStream * | getSectionStream (const UT_StringRef §ion) const |
FS_ReaderStream * | getStreamCopy () const |
FS_IndexFileHandle | getIndexFileFromSection (const UT_StringRef §ion, const char *source=nullptr) const |
int | getNumSections () const |
const UT_StringHolder & | getSectionName (int index) const |
const UT_StringHolder & | getSourceFile () const |
const UT_StringHolder & | getDescription () const |
void | setDescription (const UT_StringHolder &description) |
exint | guessStreamSize () const |
bool | isCopyProtected () const |
Tests if the index file is copy-protected. More... | |
bool | isBlackBoxed () const |
Tests if the index file is black boxed. More... | |
bool | isExpanded () const |
Tests if the index file is stored as expanded. More... | |
bool | getSectionFileName (const char *section, UT_String &filename) |
Static Public Member Functions | |
static bool | forceOTLExtension (UT_String &filename) |
static void | getVexAndVflSectionNames (const char *suggestion, UT_String &vexsect, UT_String &vflsect) |
static void | getVexCodeSectionName (const char *prefix, UT_String &vex_code_sect) |
Constructs a valid VEX code section, with an optional prefix. More... | |
static bool | createBackupFile (const char *filename, bool domove=false) |
static bool | isReservedSectionName (const UT_StringRef §name) |
static const char * | getEventName (int index) |
static const UT_StringHolder & | getEventSectionName (int index) |
static const UT_StringHolder & | getVexCodeSectionName (VEX_ContextType type) |
static const UT_StringHolder & | getVflCodeSectionName (VEX_ContextType type) |
static const UT_StringHolder & | getEncapsulatedVexSectionName (VEX_ContextType type) |
static UT_StringHolder | getShaderPathWithSection (const UT_StringRef &shader, VEX_ContextType type, UT_String *opname=nullptr) |
static bool | getFilenames (const UT_StringHolder &libfile, UT_StringArray &filenames) |
static const char * | getDefaultInstallMetaSource (const char *lib_path) |
![]() | |
static time_t | getCurrentTime () |
static bool | canWriteFile (const char *filename) |
static bool | registerConversionFuncs (const char *bin_file_pattern, const char *text_file_pattern, ConvertFunc to_text, ConvertFunc from_text) |
static const ConversionList & | getConversionsToText () |
static const ConversionList & | getConversionsFromText () |
Additional Inherited Members | |
![]() | |
void | setModified () |
exint | writeHeader (std::ostream &os) const |
![]() | |
static ConversionList & | _getConversionsToText () |
static ConversionList & | _getConversionsFromText () |
![]() | |
UT_Lock | myLock |
Definition at line 44 of file OP_OTLLibrary.h.
Enumerator | |
---|---|
MOD_TIME_OK | |
MOD_TIME_INTERNAL | |
MOD_TIME_SAVE_QUIT | |
MOD_TIME_DISCARD_QUIT | |
MOD_TIME_EMBED | |
MOD_TIME_REFRESH_ALL | |
MOD_TIME_LOAD_FILE |
Definition at line 55 of file OP_OTLLibrary.h.
OP_OTLLibrary::OP_OTLLibrary | ( | ) |
OP_OTLLibrary::OP_OTLLibrary | ( | FS_Reader * | reader | ) |
OP_OTLLibrary::OP_OTLLibrary | ( | const char * | source, |
const char * | metasrc | ||
) |
|
override |
bool OP_OTLLibrary::addDefinition | ( | const OP_OTLDefinition & | definition, |
time_t | modtime = time_t(-1) |
||
) |
void OP_OTLLibrary::beginCachingSourceModTime | ( | ) |
|
overridevirtual |
Reimplemented from FS_IndexFile.
|
static |
void OP_OTLLibrary::endCachingSourceModTime | ( | ) |
|
overridevirtual |
Reimplemented from FS_IndexFile.
|
static |
Checks if filename has a .otl, if not, appends it. Respects OTL_INTERNAL and other magic constants. Returns true if filename was modified
|
static |
|
inline |
Definition at line 98 of file OP_OTLLibrary.h.
bool OP_OTLLibrary::getDefinition | ( | int | index, |
OP_OTLDefinition & | definition | ||
) | const |
int OP_OTLLibrary::getDefinitionIndex | ( | const char * | tablename, |
const char * | opname | ||
) | const |
FS_IndexFileHandle OP_OTLLibrary::getDefinitionIndexFile | ( | const char * | tablename, |
const char * | opname | ||
) | const |
bool OP_OTLLibrary::getDefinitionIsDummy | ( | int | index | ) | const |
time_t OP_OTLLibrary::getDefinitionModTime | ( | int | index | ) | const |
const UT_StringHolder& OP_OTLLibrary::getDefinitionName | ( | int | index | ) | const |
const UT_StringHolder& OP_OTLLibrary::getDefinitionOpTableName | ( | int | index | ) | const |
|
static |
const UT_StringArray& OP_OTLLibrary::getErrorMessages | ( | ) | const |
|
static |
|
static |
|
static |
bool OP_OTLLibrary::getIsBeingRefreshed | ( | ) | const |
bool OP_OTLLibrary::getIsModTimeAccessOK | ( | ) | const |
const UT_StringHolder& OP_OTLLibrary::getMetaSource | ( | ) | const |
|
inline |
Definition at line 95 of file OP_OTLLibrary.h.
|
static |
const UT_StringHolder& OP_OTLLibrary::getSource | ( | ) | const |
OP_ModTimeStatus OP_OTLLibrary::getSourceModTime | ( | time_t & | mod_time, |
const char * | type_name = NULL |
||
) | const |
|
static |
Constructs a good vfl and vex code section names given the original suggestion.
|
static |
Constructs a valid VEX code section, with an optional prefix.
|
static |
|
static |
|
static |
void OP_OTLLibrary::mergeLibrary | ( | const OP_OTLLibrary & | lib | ) |
bool OP_OTLLibrary::removeDefinition | ( | int | index | ) |
bool OP_OTLLibrary::removeDefinitionSectionIfEmpty | ( | int | index, |
const char * | definition_section | ||
) |
void OP_OTLLibrary::setIsBeingRefreshed | ( | bool | beingrefreshed | ) |
|
overridevirtual |
Reimplemented from FS_IndexFile.