From 2267b824bc14f5a597593cd8ca80dbd440d332af Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Thu, 28 Dec 2023 20:58:28 +0100 Subject: [PATCH 1/3] Use fbclient-interfaces to decode time-fields with time zone. --- CMakeLists.txt | 2 + .../include/firebird/IdlFbInterfaces.h | 19830 ++++++++++++++++ src/firebird/include/firebird/Interface.h | 441 + src/firebird/include/firebird/Message.h | 555 + src/firebird/include/firebird/TimeZones.h | 642 + src/firebird/include/firebird/UdrCppEngine.h | 452 + src/ibpp/_ibpp.h | 5 +- src/ibpp/time.cpp | 43 +- 8 files changed, 21966 insertions(+), 4 deletions(-) create mode 100644 src/firebird/include/firebird/IdlFbInterfaces.h create mode 100644 src/firebird/include/firebird/Interface.h create mode 100644 src/firebird/include/firebird/Message.h create mode 100644 src/firebird/include/firebird/TimeZones.h create mode 100644 src/firebird/include/firebird/UdrCppEngine.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 61f4dbd3..8eb65d58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -349,6 +349,8 @@ list(APPEND IBPP_HEADER_LIST ${SOURCEDIR}/firebird/include/firebird/impl/msg/sqlerr.h ${SOURCEDIR}/firebird/include/firebird/impl/msg/sqlwarn.h ${SOURCEDIR}/firebird/include/firebird/impl/msg/utl.h + ${SOURCEDIR}/firebird/include/firebird/Interface.h + ${SOURCEDIR}/firebird/include/firebird/IdlFbInterfaces.h ${SOURCEDIR}/ibpp/_ibpp.h ${SOURCEDIR}/ibpp/ibpp.h ) diff --git a/src/firebird/include/firebird/IdlFbInterfaces.h b/src/firebird/include/firebird/IdlFbInterfaces.h new file mode 100644 index 00000000..8d4c8833 --- /dev/null +++ b/src/firebird/include/firebird/IdlFbInterfaces.h @@ -0,0 +1,19830 @@ +// This file was autogenerated by cloop - Cross Language Object Oriented Programming + +#ifndef IDL_FB_INTERFACES_H +#define IDL_FB_INTERFACES_H + +#ifndef CLOOP_CARG +#define CLOOP_CARG +#endif + + +namespace Firebird +{ + class DoNotInherit + { + }; + + template + class Inherit : public T + { + public: + Inherit(DoNotInherit = DoNotInherit()) + : T(DoNotInherit()) + { + } + }; + + // Forward interfaces declarations + + class IVersioned; + class IReferenceCounted; + class IDisposable; + class IStatus; + class IMaster; + class IPluginBase; + class IPluginSet; + class IConfigEntry; + class IConfig; + class IFirebirdConf; + class IPluginConfig; + class IPluginFactory; + class IPluginModule; + class IPluginManager; + class ICryptKey; + class IConfigManager; + class IEventCallback; + class IBlob; + class ITransaction; + class IMessageMetadata; + class IMetadataBuilder; + class IResultSet; + class IStatement; + class IBatch; + class IBatchCompletionState; + class IReplicator; + class IRequest; + class IEvents; + class IAttachment; + class IService; + class IProvider; + class IDtcStart; + class IDtc; + class IAuth; + class IWriter; + class IServerBlock; + class IClientBlock; + class IServer; + class IClient; + class IUserField; + class ICharUserField; + class IIntUserField; + class IUser; + class IListUsers; + class ILogonInfo; + class IManagement; + class IAuthBlock; + class IWireCryptPlugin; + class ICryptKeyCallback; + class IKeyHolderPlugin; + class IDbCryptInfo; + class IDbCryptPlugin; + class IExternalContext; + class IExternalResultSet; + class IExternalFunction; + class IExternalProcedure; + class IExternalTrigger; + class IRoutineMetadata; + class IExternalEngine; + class ITimer; + class ITimerControl; + class IVersionCallback; + class IUtil; + class IOffsetsCallback; + class IXpbBuilder; + class ITraceConnection; + class ITraceDatabaseConnection; + class ITraceTransaction; + class ITraceParams; + class ITraceStatement; + class ITraceSQLStatement; + class ITraceBLRStatement; + class ITraceDYNRequest; + class ITraceContextVariable; + class ITraceProcedure; + class ITraceFunction; + class ITraceTrigger; + class ITraceServiceConnection; + class ITraceStatusVector; + class ITraceSweepInfo; + class ITraceLogWriter; + class ITraceInitInfo; + class ITracePlugin; + class ITraceFactory; + class IUdrFunctionFactory; + class IUdrProcedureFactory; + class IUdrTriggerFactory; + class IUdrPlugin; + class IDecFloat16; + class IDecFloat34; + class IInt128; + class IReplicatedField; + class IReplicatedRecord; + class IReplicatedTransaction; + class IReplicatedSession; + + // Interfaces declarations + + class IVersioned + { + public: + struct VTable + { + void* cloopDummy[1]; + uintptr_t version; + }; + + void* cloopDummy[1]; + VTable* cloopVTable; + + protected: + IVersioned(DoNotInherit) + { + } + + ~IVersioned() + { + } + + public: + static const unsigned VERSION = 1; + }; + + class IReferenceCounted : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *addRef)(IReferenceCounted* self) throw(); + int (CLOOP_CARG *release)(IReferenceCounted* self) throw(); + }; + + protected: + IReferenceCounted(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IReferenceCounted() + { + } + + public: + static const unsigned VERSION = 2; + + void addRef() + { + static_cast(this->cloopVTable)->addRef(this); + } + + int release() + { + int ret = static_cast(this->cloopVTable)->release(this); + return ret; + } + }; + + class IDisposable : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *dispose)(IDisposable* self) throw(); + }; + + protected: + IDisposable(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IDisposable() + { + } + + public: + static const unsigned VERSION = 2; + + void dispose() + { + static_cast(this->cloopVTable)->dispose(this); + } + }; + + class IStatus : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *init)(IStatus* self) throw(); + unsigned (CLOOP_CARG *getState)(const IStatus* self) throw(); + void (CLOOP_CARG *setErrors2)(IStatus* self, unsigned length, const intptr_t* value) throw(); + void (CLOOP_CARG *setWarnings2)(IStatus* self, unsigned length, const intptr_t* value) throw(); + void (CLOOP_CARG *setErrors)(IStatus* self, const intptr_t* value) throw(); + void (CLOOP_CARG *setWarnings)(IStatus* self, const intptr_t* value) throw(); + const intptr_t* (CLOOP_CARG *getErrors)(const IStatus* self) throw(); + const intptr_t* (CLOOP_CARG *getWarnings)(const IStatus* self) throw(); + IStatus* (CLOOP_CARG *clone)(const IStatus* self) throw(); + }; + + protected: + IStatus(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IStatus() + { + } + + public: + static const unsigned VERSION = 3; + + static const unsigned STATE_WARNINGS = 0x1; + static const unsigned STATE_ERRORS = 0x2; + static const int RESULT_ERROR = -1; + static const int RESULT_OK = 0; + static const int RESULT_NO_DATA = 1; + static const int RESULT_SEGMENT = 2; + + void init() + { + static_cast(this->cloopVTable)->init(this); + } + + unsigned getState() const + { + unsigned ret = static_cast(this->cloopVTable)->getState(this); + return ret; + } + + void setErrors2(unsigned length, const intptr_t* value) + { + static_cast(this->cloopVTable)->setErrors2(this, length, value); + } + + void setWarnings2(unsigned length, const intptr_t* value) + { + static_cast(this->cloopVTable)->setWarnings2(this, length, value); + } + + void setErrors(const intptr_t* value) + { + static_cast(this->cloopVTable)->setErrors(this, value); + } + + void setWarnings(const intptr_t* value) + { + static_cast(this->cloopVTable)->setWarnings(this, value); + } + + const intptr_t* getErrors() const + { + const intptr_t* ret = static_cast(this->cloopVTable)->getErrors(this); + return ret; + } + + const intptr_t* getWarnings() const + { + const intptr_t* ret = static_cast(this->cloopVTable)->getWarnings(this); + return ret; + } + + IStatus* clone() const + { + IStatus* ret = static_cast(this->cloopVTable)->clone(this); + return ret; + } + }; + + class IMaster : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + IStatus* (CLOOP_CARG *getStatus)(IMaster* self) throw(); + IProvider* (CLOOP_CARG *getDispatcher)(IMaster* self) throw(); + IPluginManager* (CLOOP_CARG *getPluginManager)(IMaster* self) throw(); + ITimerControl* (CLOOP_CARG *getTimerControl)(IMaster* self) throw(); + IDtc* (CLOOP_CARG *getDtc)(IMaster* self) throw(); + IAttachment* (CLOOP_CARG *registerAttachment)(IMaster* self, IProvider* provider, IAttachment* attachment) throw(); + ITransaction* (CLOOP_CARG *registerTransaction)(IMaster* self, IAttachment* attachment, ITransaction* transaction) throw(); + IMetadataBuilder* (CLOOP_CARG *getMetadataBuilder)(IMaster* self, IStatus* status, unsigned fieldCount) throw(); + int (CLOOP_CARG *serverMode)(IMaster* self, int mode) throw(); + IUtil* (CLOOP_CARG *getUtilInterface)(IMaster* self) throw(); + IConfigManager* (CLOOP_CARG *getConfigManager)(IMaster* self) throw(); + FB_BOOLEAN (CLOOP_CARG *getProcessExiting)(IMaster* self) throw(); + }; + + protected: + IMaster(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IMaster() + { + } + + public: + static const unsigned VERSION = 2; + + IStatus* getStatus() + { + IStatus* ret = static_cast(this->cloopVTable)->getStatus(this); + return ret; + } + + IProvider* getDispatcher() + { + IProvider* ret = static_cast(this->cloopVTable)->getDispatcher(this); + return ret; + } + + IPluginManager* getPluginManager() + { + IPluginManager* ret = static_cast(this->cloopVTable)->getPluginManager(this); + return ret; + } + + ITimerControl* getTimerControl() + { + ITimerControl* ret = static_cast(this->cloopVTable)->getTimerControl(this); + return ret; + } + + IDtc* getDtc() + { + IDtc* ret = static_cast(this->cloopVTable)->getDtc(this); + return ret; + } + + IAttachment* registerAttachment(IProvider* provider, IAttachment* attachment) + { + IAttachment* ret = static_cast(this->cloopVTable)->registerAttachment(this, provider, attachment); + return ret; + } + + ITransaction* registerTransaction(IAttachment* attachment, ITransaction* transaction) + { + ITransaction* ret = static_cast(this->cloopVTable)->registerTransaction(this, attachment, transaction); + return ret; + } + + template IMetadataBuilder* getMetadataBuilder(StatusType* status, unsigned fieldCount) + { + StatusType::clearException(status); + IMetadataBuilder* ret = static_cast(this->cloopVTable)->getMetadataBuilder(this, status, fieldCount); + StatusType::checkException(status); + return ret; + } + + int serverMode(int mode) + { + int ret = static_cast(this->cloopVTable)->serverMode(this, mode); + return ret; + } + + IUtil* getUtilInterface() + { + IUtil* ret = static_cast(this->cloopVTable)->getUtilInterface(this); + return ret; + } + + IConfigManager* getConfigManager() + { + IConfigManager* ret = static_cast(this->cloopVTable)->getConfigManager(this); + return ret; + } + + FB_BOOLEAN getProcessExiting() + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->getProcessExiting(this); + return ret; + } + }; + + class IPluginBase : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *setOwner)(IPluginBase* self, IReferenceCounted* r) throw(); + IReferenceCounted* (CLOOP_CARG *getOwner)(IPluginBase* self) throw(); + }; + + protected: + IPluginBase(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IPluginBase() + { + } + + public: + static const unsigned VERSION = 3; + + void setOwner(IReferenceCounted* r) + { + static_cast(this->cloopVTable)->setOwner(this, r); + } + + IReferenceCounted* getOwner() + { + IReferenceCounted* ret = static_cast(this->cloopVTable)->getOwner(this); + return ret; + } + }; + + class IPluginSet : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + const char* (CLOOP_CARG *getName)(const IPluginSet* self) throw(); + const char* (CLOOP_CARG *getModuleName)(const IPluginSet* self) throw(); + IPluginBase* (CLOOP_CARG *getPlugin)(IPluginSet* self, IStatus* status) throw(); + void (CLOOP_CARG *next)(IPluginSet* self, IStatus* status) throw(); + void (CLOOP_CARG *set)(IPluginSet* self, IStatus* status, const char* s) throw(); + }; + + protected: + IPluginSet(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IPluginSet() + { + } + + public: + static const unsigned VERSION = 3; + + const char* getName() const + { + const char* ret = static_cast(this->cloopVTable)->getName(this); + return ret; + } + + const char* getModuleName() const + { + const char* ret = static_cast(this->cloopVTable)->getModuleName(this); + return ret; + } + + template IPluginBase* getPlugin(StatusType* status) + { + StatusType::clearException(status); + IPluginBase* ret = static_cast(this->cloopVTable)->getPlugin(this, status); + StatusType::checkException(status); + return ret; + } + + template void next(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->next(this, status); + StatusType::checkException(status); + } + + template void set(StatusType* status, const char* s) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->set(this, status, s); + StatusType::checkException(status); + } + }; + + class IConfigEntry : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + const char* (CLOOP_CARG *getName)(IConfigEntry* self) throw(); + const char* (CLOOP_CARG *getValue)(IConfigEntry* self) throw(); + ISC_INT64 (CLOOP_CARG *getIntValue)(IConfigEntry* self) throw(); + FB_BOOLEAN (CLOOP_CARG *getBoolValue)(IConfigEntry* self) throw(); + IConfig* (CLOOP_CARG *getSubConfig)(IConfigEntry* self, IStatus* status) throw(); + }; + + protected: + IConfigEntry(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IConfigEntry() + { + } + + public: + static const unsigned VERSION = 3; + + const char* getName() + { + const char* ret = static_cast(this->cloopVTable)->getName(this); + return ret; + } + + const char* getValue() + { + const char* ret = static_cast(this->cloopVTable)->getValue(this); + return ret; + } + + ISC_INT64 getIntValue() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getIntValue(this); + return ret; + } + + FB_BOOLEAN getBoolValue() + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->getBoolValue(this); + return ret; + } + + template IConfig* getSubConfig(StatusType* status) + { + StatusType::clearException(status); + IConfig* ret = static_cast(this->cloopVTable)->getSubConfig(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IConfig : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + IConfigEntry* (CLOOP_CARG *find)(IConfig* self, IStatus* status, const char* name) throw(); + IConfigEntry* (CLOOP_CARG *findValue)(IConfig* self, IStatus* status, const char* name, const char* value) throw(); + IConfigEntry* (CLOOP_CARG *findPos)(IConfig* self, IStatus* status, const char* name, unsigned pos) throw(); + }; + + protected: + IConfig(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IConfig() + { + } + + public: + static const unsigned VERSION = 3; + + template IConfigEntry* find(StatusType* status, const char* name) + { + StatusType::clearException(status); + IConfigEntry* ret = static_cast(this->cloopVTable)->find(this, status, name); + StatusType::checkException(status); + return ret; + } + + template IConfigEntry* findValue(StatusType* status, const char* name, const char* value) + { + StatusType::clearException(status); + IConfigEntry* ret = static_cast(this->cloopVTable)->findValue(this, status, name, value); + StatusType::checkException(status); + return ret; + } + + template IConfigEntry* findPos(StatusType* status, const char* name, unsigned pos) + { + StatusType::clearException(status); + IConfigEntry* ret = static_cast(this->cloopVTable)->findPos(this, status, name, pos); + StatusType::checkException(status); + return ret; + } + }; + + class IFirebirdConf : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + unsigned (CLOOP_CARG *getKey)(IFirebirdConf* self, const char* name) throw(); + ISC_INT64 (CLOOP_CARG *asInteger)(IFirebirdConf* self, unsigned key) throw(); + const char* (CLOOP_CARG *asString)(IFirebirdConf* self, unsigned key) throw(); + FB_BOOLEAN (CLOOP_CARG *asBoolean)(IFirebirdConf* self, unsigned key) throw(); + unsigned (CLOOP_CARG *getVersion)(IFirebirdConf* self, IStatus* status) throw(); + }; + + protected: + IFirebirdConf(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IFirebirdConf() + { + } + + public: + static const unsigned VERSION = 4; + + unsigned getKey(const char* name) + { + unsigned ret = static_cast(this->cloopVTable)->getKey(this, name); + return ret; + } + + ISC_INT64 asInteger(unsigned key) + { + ISC_INT64 ret = static_cast(this->cloopVTable)->asInteger(this, key); + return ret; + } + + const char* asString(unsigned key) + { + const char* ret = static_cast(this->cloopVTable)->asString(this, key); + return ret; + } + + FB_BOOLEAN asBoolean(unsigned key) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->asBoolean(this, key); + return ret; + } + + template unsigned getVersion(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IFirebirdConf", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getVersion(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IPluginConfig : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + const char* (CLOOP_CARG *getConfigFileName)(IPluginConfig* self) throw(); + IConfig* (CLOOP_CARG *getDefaultConfig)(IPluginConfig* self, IStatus* status) throw(); + IFirebirdConf* (CLOOP_CARG *getFirebirdConf)(IPluginConfig* self, IStatus* status) throw(); + void (CLOOP_CARG *setReleaseDelay)(IPluginConfig* self, IStatus* status, ISC_UINT64 microSeconds) throw(); + }; + + protected: + IPluginConfig(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IPluginConfig() + { + } + + public: + static const unsigned VERSION = 3; + + const char* getConfigFileName() + { + const char* ret = static_cast(this->cloopVTable)->getConfigFileName(this); + return ret; + } + + template IConfig* getDefaultConfig(StatusType* status) + { + StatusType::clearException(status); + IConfig* ret = static_cast(this->cloopVTable)->getDefaultConfig(this, status); + StatusType::checkException(status); + return ret; + } + + template IFirebirdConf* getFirebirdConf(StatusType* status) + { + StatusType::clearException(status); + IFirebirdConf* ret = static_cast(this->cloopVTable)->getFirebirdConf(this, status); + StatusType::checkException(status); + return ret; + } + + template void setReleaseDelay(StatusType* status, ISC_UINT64 microSeconds) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setReleaseDelay(this, status, microSeconds); + StatusType::checkException(status); + } + }; + + class IPluginFactory : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + IPluginBase* (CLOOP_CARG *createPlugin)(IPluginFactory* self, IStatus* status, IPluginConfig* factoryParameter) throw(); + }; + + protected: + IPluginFactory(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IPluginFactory() + { + } + + public: + static const unsigned VERSION = 2; + + template IPluginBase* createPlugin(StatusType* status, IPluginConfig* factoryParameter) + { + StatusType::clearException(status); + IPluginBase* ret = static_cast(this->cloopVTable)->createPlugin(this, status, factoryParameter); + StatusType::checkException(status); + return ret; + } + }; + + class IPluginModule : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *doClean)(IPluginModule* self) throw(); + void (CLOOP_CARG *threadDetach)(IPluginModule* self) throw(); + }; + + protected: + IPluginModule(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IPluginModule() + { + } + + public: + static const unsigned VERSION = 3; + + void doClean() + { + static_cast(this->cloopVTable)->doClean(this); + } + + void threadDetach() + { + if (cloopVTable->version < 3) + { + return; + } + static_cast(this->cloopVTable)->threadDetach(this); + } + }; + + class IPluginManager : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *registerPluginFactory)(IPluginManager* self, unsigned pluginType, const char* defaultName, IPluginFactory* factory) throw(); + void (CLOOP_CARG *registerModule)(IPluginManager* self, IPluginModule* cleanup) throw(); + void (CLOOP_CARG *unregisterModule)(IPluginManager* self, IPluginModule* cleanup) throw(); + IPluginSet* (CLOOP_CARG *getPlugins)(IPluginManager* self, IStatus* status, unsigned pluginType, const char* namesList, IFirebirdConf* firebirdConf) throw(); + IConfig* (CLOOP_CARG *getConfig)(IPluginManager* self, IStatus* status, const char* filename) throw(); + void (CLOOP_CARG *releasePlugin)(IPluginManager* self, IPluginBase* plugin) throw(); + }; + + protected: + IPluginManager(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IPluginManager() + { + } + + public: + static const unsigned VERSION = 2; + + static const unsigned TYPE_PROVIDER = 1; + static const unsigned TYPE_FIRST_NON_LIB = 2; + static const unsigned TYPE_AUTH_SERVER = 3; + static const unsigned TYPE_AUTH_CLIENT = 4; + static const unsigned TYPE_AUTH_USER_MANAGEMENT = 5; + static const unsigned TYPE_EXTERNAL_ENGINE = 6; + static const unsigned TYPE_TRACE = 7; + static const unsigned TYPE_WIRE_CRYPT = 8; + static const unsigned TYPE_DB_CRYPT = 9; + static const unsigned TYPE_KEY_HOLDER = 10; + static const unsigned TYPE_REPLICATOR = 11; + static const unsigned TYPE_COUNT = 12; + + void registerPluginFactory(unsigned pluginType, const char* defaultName, IPluginFactory* factory) + { + static_cast(this->cloopVTable)->registerPluginFactory(this, pluginType, defaultName, factory); + } + + void registerModule(IPluginModule* cleanup) + { + static_cast(this->cloopVTable)->registerModule(this, cleanup); + } + + void unregisterModule(IPluginModule* cleanup) + { + static_cast(this->cloopVTable)->unregisterModule(this, cleanup); + } + + template IPluginSet* getPlugins(StatusType* status, unsigned pluginType, const char* namesList, IFirebirdConf* firebirdConf) + { + StatusType::clearException(status); + IPluginSet* ret = static_cast(this->cloopVTable)->getPlugins(this, status, pluginType, namesList, firebirdConf); + StatusType::checkException(status); + return ret; + } + + template IConfig* getConfig(StatusType* status, const char* filename) + { + StatusType::clearException(status); + IConfig* ret = static_cast(this->cloopVTable)->getConfig(this, status, filename); + StatusType::checkException(status); + return ret; + } + + void releasePlugin(IPluginBase* plugin) + { + static_cast(this->cloopVTable)->releasePlugin(this, plugin); + } + }; + + class ICryptKey : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *setSymmetric)(ICryptKey* self, IStatus* status, const char* type, unsigned keyLength, const void* key) throw(); + void (CLOOP_CARG *setAsymmetric)(ICryptKey* self, IStatus* status, const char* type, unsigned encryptKeyLength, const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) throw(); + const void* (CLOOP_CARG *getEncryptKey)(ICryptKey* self, unsigned* length) throw(); + const void* (CLOOP_CARG *getDecryptKey)(ICryptKey* self, unsigned* length) throw(); + }; + + protected: + ICryptKey(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ICryptKey() + { + } + + public: + static const unsigned VERSION = 2; + + template void setSymmetric(StatusType* status, const char* type, unsigned keyLength, const void* key) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setSymmetric(this, status, type, keyLength, key); + StatusType::checkException(status); + } + + template void setAsymmetric(StatusType* status, const char* type, unsigned encryptKeyLength, const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setAsymmetric(this, status, type, encryptKeyLength, encryptKey, decryptKeyLength, decryptKey); + StatusType::checkException(status); + } + + const void* getEncryptKey(unsigned* length) + { + const void* ret = static_cast(this->cloopVTable)->getEncryptKey(this, length); + return ret; + } + + const void* getDecryptKey(unsigned* length) + { + const void* ret = static_cast(this->cloopVTable)->getDecryptKey(this, length); + return ret; + } + }; + + class IConfigManager : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getDirectory)(IConfigManager* self, unsigned code) throw(); + IFirebirdConf* (CLOOP_CARG *getFirebirdConf)(IConfigManager* self) throw(); + IFirebirdConf* (CLOOP_CARG *getDatabaseConf)(IConfigManager* self, const char* dbName) throw(); + IConfig* (CLOOP_CARG *getPluginConfig)(IConfigManager* self, const char* configuredPlugin) throw(); + const char* (CLOOP_CARG *getInstallDirectory)(IConfigManager* self) throw(); + const char* (CLOOP_CARG *getRootDirectory)(IConfigManager* self) throw(); + const char* (CLOOP_CARG *getDefaultSecurityDb)(IConfigManager* self) throw(); + }; + + protected: + IConfigManager(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IConfigManager() + { + } + + public: + static const unsigned VERSION = 3; + + static const unsigned DIR_BIN = 0; + static const unsigned DIR_SBIN = 1; + static const unsigned DIR_CONF = 2; + static const unsigned DIR_LIB = 3; + static const unsigned DIR_INC = 4; + static const unsigned DIR_DOC = 5; + static const unsigned DIR_UDF = 6; + static const unsigned DIR_SAMPLE = 7; + static const unsigned DIR_SAMPLEDB = 8; + static const unsigned DIR_HELP = 9; + static const unsigned DIR_INTL = 10; + static const unsigned DIR_MISC = 11; + static const unsigned DIR_SECDB = 12; + static const unsigned DIR_MSG = 13; + static const unsigned DIR_LOG = 14; + static const unsigned DIR_GUARD = 15; + static const unsigned DIR_PLUGINS = 16; + static const unsigned DIR_TZDATA = 17; + static const unsigned DIR_COUNT = 18; + + const char* getDirectory(unsigned code) + { + const char* ret = static_cast(this->cloopVTable)->getDirectory(this, code); + return ret; + } + + IFirebirdConf* getFirebirdConf() + { + IFirebirdConf* ret = static_cast(this->cloopVTable)->getFirebirdConf(this); + return ret; + } + + IFirebirdConf* getDatabaseConf(const char* dbName) + { + IFirebirdConf* ret = static_cast(this->cloopVTable)->getDatabaseConf(this, dbName); + return ret; + } + + IConfig* getPluginConfig(const char* configuredPlugin) + { + IConfig* ret = static_cast(this->cloopVTable)->getPluginConfig(this, configuredPlugin); + return ret; + } + + const char* getInstallDirectory() + { + const char* ret = static_cast(this->cloopVTable)->getInstallDirectory(this); + return ret; + } + + const char* getRootDirectory() + { + const char* ret = static_cast(this->cloopVTable)->getRootDirectory(this); + return ret; + } + + const char* getDefaultSecurityDb() + { + if (cloopVTable->version < 3) + { + return 0; + } + const char* ret = static_cast(this->cloopVTable)->getDefaultSecurityDb(this); + return ret; + } + }; + + class IEventCallback : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *eventCallbackFunction)(IEventCallback* self, unsigned length, const unsigned char* events) throw(); + }; + + protected: + IEventCallback(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IEventCallback() + { + } + + public: + static const unsigned VERSION = 3; + + void eventCallbackFunction(unsigned length, const unsigned char* events) + { + static_cast(this->cloopVTable)->eventCallbackFunction(this, length, events); + } + }; + + class IBlob : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *getInfo)(IBlob* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); + int (CLOOP_CARG *getSegment)(IBlob* self, IStatus* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) throw(); + void (CLOOP_CARG *putSegment)(IBlob* self, IStatus* status, unsigned length, const void* buffer) throw(); + void (CLOOP_CARG *deprecatedCancel)(IBlob* self, IStatus* status) throw(); + void (CLOOP_CARG *deprecatedClose)(IBlob* self, IStatus* status) throw(); + int (CLOOP_CARG *seek)(IBlob* self, IStatus* status, int mode, int offset) throw(); + void (CLOOP_CARG *cancel)(IBlob* self, IStatus* status) throw(); + void (CLOOP_CARG *close)(IBlob* self, IStatus* status) throw(); + }; + + protected: + IBlob(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IBlob() + { + } + + public: + static const unsigned VERSION = 4; + + template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getInfo(this, status, itemsLength, items, bufferLength, buffer); + StatusType::checkException(status); + } + + template int getSegment(StatusType* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->getSegment(this, status, bufferLength, buffer, segmentLength); + StatusType::checkException(status); + return ret; + } + + template void putSegment(StatusType* status, unsigned length, const void* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->putSegment(this, status, length, buffer); + StatusType::checkException(status); + } + + template void deprecatedCancel(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedCancel(this, status); + StatusType::checkException(status); + } + + template void deprecatedClose(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedClose(this, status); + StatusType::checkException(status); + } + + template int seek(StatusType* status, int mode, int offset) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->seek(this, status, mode, offset); + StatusType::checkException(status); + return ret; + } + + template void cancel(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IBlob", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedCancel(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->cancel(this, status); + StatusType::checkException(status); + } + + template void close(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IBlob", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedClose(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->close(this, status); + StatusType::checkException(status); + } + }; + + class ITransaction : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *getInfo)(ITransaction* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); + void (CLOOP_CARG *prepare)(ITransaction* self, IStatus* status, unsigned msgLength, const unsigned char* message) throw(); + void (CLOOP_CARG *deprecatedCommit)(ITransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *commitRetaining)(ITransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *deprecatedRollback)(ITransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *rollbackRetaining)(ITransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *deprecatedDisconnect)(ITransaction* self, IStatus* status) throw(); + ITransaction* (CLOOP_CARG *join)(ITransaction* self, IStatus* status, ITransaction* transaction) throw(); + ITransaction* (CLOOP_CARG *validate)(ITransaction* self, IStatus* status, IAttachment* attachment) throw(); + ITransaction* (CLOOP_CARG *enterDtc)(ITransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *commit)(ITransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *rollback)(ITransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *disconnect)(ITransaction* self, IStatus* status) throw(); + }; + + protected: + ITransaction(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~ITransaction() + { + } + + public: + static const unsigned VERSION = 4; + + template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getInfo(this, status, itemsLength, items, bufferLength, buffer); + StatusType::checkException(status); + } + + template void prepare(StatusType* status, unsigned msgLength, const unsigned char* message) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->prepare(this, status, msgLength, message); + StatusType::checkException(status); + } + + template void deprecatedCommit(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedCommit(this, status); + StatusType::checkException(status); + } + + template void commitRetaining(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->commitRetaining(this, status); + StatusType::checkException(status); + } + + template void deprecatedRollback(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedRollback(this, status); + StatusType::checkException(status); + } + + template void rollbackRetaining(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->rollbackRetaining(this, status); + StatusType::checkException(status); + } + + template void deprecatedDisconnect(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedDisconnect(this, status); + StatusType::checkException(status); + } + + template ITransaction* join(StatusType* status, ITransaction* transaction) + { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->join(this, status, transaction); + StatusType::checkException(status); + return ret; + } + + template ITransaction* validate(StatusType* status, IAttachment* attachment) + { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->validate(this, status, attachment); + StatusType::checkException(status); + return ret; + } + + template ITransaction* enterDtc(StatusType* status) + { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->enterDtc(this, status); + StatusType::checkException(status); + return ret; + } + + template void commit(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedCommit(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->commit(this, status); + StatusType::checkException(status); + } + + template void rollback(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedRollback(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->rollback(this, status); + StatusType::checkException(status); + } + + template void disconnect(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedDisconnect(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->disconnect(this, status); + StatusType::checkException(status); + } + }; + + class IMessageMetadata : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + unsigned (CLOOP_CARG *getCount)(IMessageMetadata* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getField)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + const char* (CLOOP_CARG *getRelation)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + const char* (CLOOP_CARG *getOwner)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + const char* (CLOOP_CARG *getAlias)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + unsigned (CLOOP_CARG *getType)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + FB_BOOLEAN (CLOOP_CARG *isNullable)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + int (CLOOP_CARG *getSubType)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + unsigned (CLOOP_CARG *getLength)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + int (CLOOP_CARG *getScale)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + unsigned (CLOOP_CARG *getCharSet)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + unsigned (CLOOP_CARG *getOffset)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + unsigned (CLOOP_CARG *getNullOffset)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); + IMetadataBuilder* (CLOOP_CARG *getBuilder)(IMessageMetadata* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getMessageLength)(IMessageMetadata* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getAlignment)(IMessageMetadata* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getAlignedLength)(IMessageMetadata* self, IStatus* status) throw(); + }; + + protected: + IMessageMetadata(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IMessageMetadata() + { + } + + public: + static const unsigned VERSION = 4; + + template unsigned getCount(StatusType* status) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getCount(this, status); + StatusType::checkException(status); + return ret; + } + + template const char* getField(StatusType* status, unsigned index) + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getField(this, status, index); + StatusType::checkException(status); + return ret; + } + + template const char* getRelation(StatusType* status, unsigned index) + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getRelation(this, status, index); + StatusType::checkException(status); + return ret; + } + + template const char* getOwner(StatusType* status, unsigned index) + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getOwner(this, status, index); + StatusType::checkException(status); + return ret; + } + + template const char* getAlias(StatusType* status, unsigned index) + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getAlias(this, status, index); + StatusType::checkException(status); + return ret; + } + + template unsigned getType(StatusType* status, unsigned index) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getType(this, status, index); + StatusType::checkException(status); + return ret; + } + + template FB_BOOLEAN isNullable(StatusType* status, unsigned index) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->isNullable(this, status, index); + StatusType::checkException(status); + return ret; + } + + template int getSubType(StatusType* status, unsigned index) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->getSubType(this, status, index); + StatusType::checkException(status); + return ret; + } + + template unsigned getLength(StatusType* status, unsigned index) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getLength(this, status, index); + StatusType::checkException(status); + return ret; + } + + template int getScale(StatusType* status, unsigned index) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->getScale(this, status, index); + StatusType::checkException(status); + return ret; + } + + template unsigned getCharSet(StatusType* status, unsigned index) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getCharSet(this, status, index); + StatusType::checkException(status); + return ret; + } + + template unsigned getOffset(StatusType* status, unsigned index) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getOffset(this, status, index); + StatusType::checkException(status); + return ret; + } + + template unsigned getNullOffset(StatusType* status, unsigned index) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getNullOffset(this, status, index); + StatusType::checkException(status); + return ret; + } + + template IMetadataBuilder* getBuilder(StatusType* status) + { + StatusType::clearException(status); + IMetadataBuilder* ret = static_cast(this->cloopVTable)->getBuilder(this, status); + StatusType::checkException(status); + return ret; + } + + template unsigned getMessageLength(StatusType* status) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getMessageLength(this, status); + StatusType::checkException(status); + return ret; + } + + template unsigned getAlignment(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMessageMetadata", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getAlignment(this, status); + StatusType::checkException(status); + return ret; + } + + template unsigned getAlignedLength(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMessageMetadata", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getAlignedLength(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IMetadataBuilder : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *setType)(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned type) throw(); + void (CLOOP_CARG *setSubType)(IMetadataBuilder* self, IStatus* status, unsigned index, int subType) throw(); + void (CLOOP_CARG *setLength)(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned length) throw(); + void (CLOOP_CARG *setCharSet)(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned charSet) throw(); + void (CLOOP_CARG *setScale)(IMetadataBuilder* self, IStatus* status, unsigned index, int scale) throw(); + void (CLOOP_CARG *truncate)(IMetadataBuilder* self, IStatus* status, unsigned count) throw(); + void (CLOOP_CARG *moveNameToIndex)(IMetadataBuilder* self, IStatus* status, const char* name, unsigned index) throw(); + void (CLOOP_CARG *remove)(IMetadataBuilder* self, IStatus* status, unsigned index) throw(); + unsigned (CLOOP_CARG *addField)(IMetadataBuilder* self, IStatus* status) throw(); + IMessageMetadata* (CLOOP_CARG *getMetadata)(IMetadataBuilder* self, IStatus* status) throw(); + void (CLOOP_CARG *setField)(IMetadataBuilder* self, IStatus* status, unsigned index, const char* field) throw(); + void (CLOOP_CARG *setRelation)(IMetadataBuilder* self, IStatus* status, unsigned index, const char* relation) throw(); + void (CLOOP_CARG *setOwner)(IMetadataBuilder* self, IStatus* status, unsigned index, const char* owner) throw(); + void (CLOOP_CARG *setAlias)(IMetadataBuilder* self, IStatus* status, unsigned index, const char* alias) throw(); + }; + + protected: + IMetadataBuilder(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IMetadataBuilder() + { + } + + public: + static const unsigned VERSION = 4; + + template void setType(StatusType* status, unsigned index, unsigned type) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setType(this, status, index, type); + StatusType::checkException(status); + } + + template void setSubType(StatusType* status, unsigned index, int subType) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setSubType(this, status, index, subType); + StatusType::checkException(status); + } + + template void setLength(StatusType* status, unsigned index, unsigned length) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setLength(this, status, index, length); + StatusType::checkException(status); + } + + template void setCharSet(StatusType* status, unsigned index, unsigned charSet) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setCharSet(this, status, index, charSet); + StatusType::checkException(status); + } + + template void setScale(StatusType* status, unsigned index, int scale) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setScale(this, status, index, scale); + StatusType::checkException(status); + } + + template void truncate(StatusType* status, unsigned count) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->truncate(this, status, count); + StatusType::checkException(status); + } + + template void moveNameToIndex(StatusType* status, const char* name, unsigned index) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->moveNameToIndex(this, status, name, index); + StatusType::checkException(status); + } + + template void remove(StatusType* status, unsigned index) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->remove(this, status, index); + StatusType::checkException(status); + } + + template unsigned addField(StatusType* status) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->addField(this, status); + StatusType::checkException(status); + return ret; + } + + template IMessageMetadata* getMetadata(StatusType* status) + { + StatusType::clearException(status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getMetadata(this, status); + StatusType::checkException(status); + return ret; + } + + template void setField(StatusType* status, unsigned index, const char* field) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMetadataBuilder", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setField(this, status, index, field); + StatusType::checkException(status); + } + + template void setRelation(StatusType* status, unsigned index, const char* relation) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMetadataBuilder", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setRelation(this, status, index, relation); + StatusType::checkException(status); + } + + template void setOwner(StatusType* status, unsigned index, const char* owner) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMetadataBuilder", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setOwner(this, status, index, owner); + StatusType::checkException(status); + } + + template void setAlias(StatusType* status, unsigned index, const char* alias) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMetadataBuilder", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setAlias(this, status, index, alias); + StatusType::checkException(status); + } + }; + + class IResultSet : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + int (CLOOP_CARG *fetchNext)(IResultSet* self, IStatus* status, void* message) throw(); + int (CLOOP_CARG *fetchPrior)(IResultSet* self, IStatus* status, void* message) throw(); + int (CLOOP_CARG *fetchFirst)(IResultSet* self, IStatus* status, void* message) throw(); + int (CLOOP_CARG *fetchLast)(IResultSet* self, IStatus* status, void* message) throw(); + int (CLOOP_CARG *fetchAbsolute)(IResultSet* self, IStatus* status, int position, void* message) throw(); + int (CLOOP_CARG *fetchRelative)(IResultSet* self, IStatus* status, int offset, void* message) throw(); + FB_BOOLEAN (CLOOP_CARG *isEof)(IResultSet* self, IStatus* status) throw(); + FB_BOOLEAN (CLOOP_CARG *isBof)(IResultSet* self, IStatus* status) throw(); + IMessageMetadata* (CLOOP_CARG *getMetadata)(IResultSet* self, IStatus* status) throw(); + void (CLOOP_CARG *deprecatedClose)(IResultSet* self, IStatus* status) throw(); + void (CLOOP_CARG *setDelayedOutputFormat)(IResultSet* self, IStatus* status, IMessageMetadata* format) throw(); + void (CLOOP_CARG *close)(IResultSet* self, IStatus* status) throw(); + }; + + protected: + IResultSet(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IResultSet() + { + } + + public: + static const unsigned VERSION = 4; + + template int fetchNext(StatusType* status, void* message) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->fetchNext(this, status, message); + StatusType::checkException(status); + return ret; + } + + template int fetchPrior(StatusType* status, void* message) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->fetchPrior(this, status, message); + StatusType::checkException(status); + return ret; + } + + template int fetchFirst(StatusType* status, void* message) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->fetchFirst(this, status, message); + StatusType::checkException(status); + return ret; + } + + template int fetchLast(StatusType* status, void* message) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->fetchLast(this, status, message); + StatusType::checkException(status); + return ret; + } + + template int fetchAbsolute(StatusType* status, int position, void* message) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->fetchAbsolute(this, status, position, message); + StatusType::checkException(status); + return ret; + } + + template int fetchRelative(StatusType* status, int offset, void* message) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->fetchRelative(this, status, offset, message); + StatusType::checkException(status); + return ret; + } + + template FB_BOOLEAN isEof(StatusType* status) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->isEof(this, status); + StatusType::checkException(status); + return ret; + } + + template FB_BOOLEAN isBof(StatusType* status) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->isBof(this, status); + StatusType::checkException(status); + return ret; + } + + template IMessageMetadata* getMetadata(StatusType* status) + { + StatusType::clearException(status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getMetadata(this, status); + StatusType::checkException(status); + return ret; + } + + template void deprecatedClose(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedClose(this, status); + StatusType::checkException(status); + } + + template void setDelayedOutputFormat(StatusType* status, IMessageMetadata* format) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setDelayedOutputFormat(this, status, format); + StatusType::checkException(status); + } + + template void close(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IResultSet", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedClose(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->close(this, status); + StatusType::checkException(status); + } + }; + + class IStatement : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *getInfo)(IStatement* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); + unsigned (CLOOP_CARG *getType)(IStatement* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getPlan)(IStatement* self, IStatus* status, FB_BOOLEAN detailed) throw(); + ISC_UINT64 (CLOOP_CARG *getAffectedRecords)(IStatement* self, IStatus* status) throw(); + IMessageMetadata* (CLOOP_CARG *getInputMetadata)(IStatement* self, IStatus* status) throw(); + IMessageMetadata* (CLOOP_CARG *getOutputMetadata)(IStatement* self, IStatus* status) throw(); + ITransaction* (CLOOP_CARG *execute)(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) throw(); + IResultSet* (CLOOP_CARG *openCursor)(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) throw(); + void (CLOOP_CARG *setCursorName)(IStatement* self, IStatus* status, const char* name) throw(); + void (CLOOP_CARG *deprecatedFree)(IStatement* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getFlags)(IStatement* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getTimeout)(IStatement* self, IStatus* status) throw(); + void (CLOOP_CARG *setTimeout)(IStatement* self, IStatus* status, unsigned timeOut) throw(); + IBatch* (CLOOP_CARG *createBatch)(IStatement* self, IStatus* status, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) throw(); + void (CLOOP_CARG *free)(IStatement* self, IStatus* status) throw(); + }; + + protected: + IStatement(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IStatement() + { + } + + public: + static const unsigned VERSION = 5; + + static const unsigned PREPARE_PREFETCH_NONE = 0x0; + static const unsigned PREPARE_PREFETCH_TYPE = 0x1; + static const unsigned PREPARE_PREFETCH_INPUT_PARAMETERS = 0x2; + static const unsigned PREPARE_PREFETCH_OUTPUT_PARAMETERS = 0x4; + static const unsigned PREPARE_PREFETCH_LEGACY_PLAN = 0x8; + static const unsigned PREPARE_PREFETCH_DETAILED_PLAN = 0x10; + static const unsigned PREPARE_PREFETCH_AFFECTED_RECORDS = 0x20; + static const unsigned PREPARE_PREFETCH_FLAGS = 0x40; + static const unsigned PREPARE_PREFETCH_METADATA = IStatement::PREPARE_PREFETCH_TYPE | IStatement::PREPARE_PREFETCH_FLAGS | IStatement::PREPARE_PREFETCH_INPUT_PARAMETERS | IStatement::PREPARE_PREFETCH_OUTPUT_PARAMETERS; + static const unsigned PREPARE_PREFETCH_ALL = IStatement::PREPARE_PREFETCH_METADATA | IStatement::PREPARE_PREFETCH_LEGACY_PLAN | IStatement::PREPARE_PREFETCH_DETAILED_PLAN | IStatement::PREPARE_PREFETCH_AFFECTED_RECORDS; + static const unsigned FLAG_HAS_CURSOR = 0x1; + static const unsigned FLAG_REPEAT_EXECUTE = 0x2; + static const unsigned CURSOR_TYPE_SCROLLABLE = 0x1; + + template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getInfo(this, status, itemsLength, items, bufferLength, buffer); + StatusType::checkException(status); + } + + template unsigned getType(StatusType* status) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getType(this, status); + StatusType::checkException(status); + return ret; + } + + template const char* getPlan(StatusType* status, FB_BOOLEAN detailed) + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getPlan(this, status, detailed); + StatusType::checkException(status); + return ret; + } + + template ISC_UINT64 getAffectedRecords(StatusType* status) + { + StatusType::clearException(status); + ISC_UINT64 ret = static_cast(this->cloopVTable)->getAffectedRecords(this, status); + StatusType::checkException(status); + return ret; + } + + template IMessageMetadata* getInputMetadata(StatusType* status) + { + StatusType::clearException(status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getInputMetadata(this, status); + StatusType::checkException(status); + return ret; + } + + template IMessageMetadata* getOutputMetadata(StatusType* status) + { + StatusType::clearException(status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getOutputMetadata(this, status); + StatusType::checkException(status); + return ret; + } + + template ITransaction* execute(StatusType* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) + { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->execute(this, status, transaction, inMetadata, inBuffer, outMetadata, outBuffer); + StatusType::checkException(status); + return ret; + } + + template IResultSet* openCursor(StatusType* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) + { + StatusType::clearException(status); + IResultSet* ret = static_cast(this->cloopVTable)->openCursor(this, status, transaction, inMetadata, inBuffer, outMetadata, flags); + StatusType::checkException(status); + return ret; + } + + template void setCursorName(StatusType* status, const char* name) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setCursorName(this, status, name); + StatusType::checkException(status); + } + + template void deprecatedFree(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedFree(this, status); + StatusType::checkException(status); + } + + template unsigned getFlags(StatusType* status) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getFlags(this, status); + StatusType::checkException(status); + return ret; + } + + template unsigned getTimeout(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IStatement", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getTimeout(this, status); + StatusType::checkException(status); + return ret; + } + + template void setTimeout(StatusType* status, unsigned timeOut) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IStatement", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setTimeout(this, status, timeOut); + StatusType::checkException(status); + } + + template IBatch* createBatch(StatusType* status, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IStatement", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IBatch* ret = static_cast(this->cloopVTable)->createBatch(this, status, inMetadata, parLength, par); + StatusType::checkException(status); + return ret; + } + + template void free(StatusType* status) + { + if (cloopVTable->version < 5) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IStatement", cloopVTable->version, 5); + StatusType::checkException(status); + } + else { + deprecatedFree(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->free(this, status); + StatusType::checkException(status); + } + }; + + class IBatch : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *add)(IBatch* self, IStatus* status, unsigned count, const void* inBuffer) throw(); + void (CLOOP_CARG *addBlob)(IBatch* self, IStatus* status, unsigned length, const void* inBuffer, ISC_QUAD* blobId, unsigned parLength, const unsigned char* par) throw(); + void (CLOOP_CARG *appendBlobData)(IBatch* self, IStatus* status, unsigned length, const void* inBuffer) throw(); + void (CLOOP_CARG *addBlobStream)(IBatch* self, IStatus* status, unsigned length, const void* inBuffer) throw(); + void (CLOOP_CARG *registerBlob)(IBatch* self, IStatus* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) throw(); + IBatchCompletionState* (CLOOP_CARG *execute)(IBatch* self, IStatus* status, ITransaction* transaction) throw(); + void (CLOOP_CARG *cancel)(IBatch* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getBlobAlignment)(IBatch* self, IStatus* status) throw(); + IMessageMetadata* (CLOOP_CARG *getMetadata)(IBatch* self, IStatus* status) throw(); + void (CLOOP_CARG *setDefaultBpb)(IBatch* self, IStatus* status, unsigned parLength, const unsigned char* par) throw(); + void (CLOOP_CARG *deprecatedClose)(IBatch* self, IStatus* status) throw(); + void (CLOOP_CARG *close)(IBatch* self, IStatus* status) throw(); + void (CLOOP_CARG *getInfo)(IBatch* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); + }; + + protected: + IBatch(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IBatch() + { + } + + public: + static const unsigned VERSION = 4; + + static const unsigned char VERSION1 = 1; + static const unsigned char TAG_MULTIERROR = 1; + static const unsigned char TAG_RECORD_COUNTS = 2; + static const unsigned char TAG_BUFFER_BYTES_SIZE = 3; + static const unsigned char TAG_BLOB_POLICY = 4; + static const unsigned char TAG_DETAILED_ERRORS = 5; + static const unsigned char INF_BUFFER_BYTES_SIZE = 10; + static const unsigned char INF_DATA_BYTES_SIZE = 11; + static const unsigned char INF_BLOBS_BYTES_SIZE = 12; + static const unsigned char INF_BLOB_ALIGNMENT = 13; + static const unsigned char INF_BLOB_HEADER = 14; + static const unsigned char BLOB_NONE = 0; + static const unsigned char BLOB_ID_ENGINE = 1; + static const unsigned char BLOB_ID_USER = 2; + static const unsigned char BLOB_STREAM = 3; + static const unsigned BLOB_SEGHDR_ALIGN = 2; + + template void add(StatusType* status, unsigned count, const void* inBuffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->add(this, status, count, inBuffer); + StatusType::checkException(status); + } + + template void addBlob(StatusType* status, unsigned length, const void* inBuffer, ISC_QUAD* blobId, unsigned parLength, const unsigned char* par) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->addBlob(this, status, length, inBuffer, blobId, parLength, par); + StatusType::checkException(status); + } + + template void appendBlobData(StatusType* status, unsigned length, const void* inBuffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->appendBlobData(this, status, length, inBuffer); + StatusType::checkException(status); + } + + template void addBlobStream(StatusType* status, unsigned length, const void* inBuffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->addBlobStream(this, status, length, inBuffer); + StatusType::checkException(status); + } + + template void registerBlob(StatusType* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->registerBlob(this, status, existingBlob, blobId); + StatusType::checkException(status); + } + + template IBatchCompletionState* execute(StatusType* status, ITransaction* transaction) + { + StatusType::clearException(status); + IBatchCompletionState* ret = static_cast(this->cloopVTable)->execute(this, status, transaction); + StatusType::checkException(status); + return ret; + } + + template void cancel(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->cancel(this, status); + StatusType::checkException(status); + } + + template unsigned getBlobAlignment(StatusType* status) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getBlobAlignment(this, status); + StatusType::checkException(status); + return ret; + } + + template IMessageMetadata* getMetadata(StatusType* status) + { + StatusType::clearException(status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getMetadata(this, status); + StatusType::checkException(status); + return ret; + } + + template void setDefaultBpb(StatusType* status, unsigned parLength, const unsigned char* par) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setDefaultBpb(this, status, parLength, par); + StatusType::checkException(status); + } + + template void deprecatedClose(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedClose(this, status); + StatusType::checkException(status); + } + + template void close(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IBatch", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedClose(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->close(this, status); + StatusType::checkException(status); + } + + template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IBatch", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->getInfo(this, status, itemsLength, items, bufferLength, buffer); + StatusType::checkException(status); + } + }; + + class IBatchCompletionState : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + unsigned (CLOOP_CARG *getSize)(IBatchCompletionState* self, IStatus* status) throw(); + int (CLOOP_CARG *getState)(IBatchCompletionState* self, IStatus* status, unsigned pos) throw(); + unsigned (CLOOP_CARG *findError)(IBatchCompletionState* self, IStatus* status, unsigned pos) throw(); + void (CLOOP_CARG *getStatus)(IBatchCompletionState* self, IStatus* status, IStatus* to, unsigned pos) throw(); + }; + + protected: + IBatchCompletionState(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IBatchCompletionState() + { + } + + public: + static const unsigned VERSION = 3; + + static const int EXECUTE_FAILED = -1; + static const int SUCCESS_NO_INFO = -2; + static const unsigned NO_MORE_ERRORS = 0xffffffff; + + template unsigned getSize(StatusType* status) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getSize(this, status); + StatusType::checkException(status); + return ret; + } + + template int getState(StatusType* status, unsigned pos) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->getState(this, status, pos); + StatusType::checkException(status); + return ret; + } + + template unsigned findError(StatusType* status, unsigned pos) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->findError(this, status, pos); + StatusType::checkException(status); + return ret; + } + + template void getStatus(StatusType* status, IStatus* to, unsigned pos) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getStatus(this, status, to, pos); + StatusType::checkException(status); + } + }; + + class IReplicator : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *process)(IReplicator* self, IStatus* status, unsigned length, const unsigned char* data) throw(); + void (CLOOP_CARG *deprecatedClose)(IReplicator* self, IStatus* status) throw(); + void (CLOOP_CARG *close)(IReplicator* self, IStatus* status) throw(); + }; + + protected: + IReplicator(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IReplicator() + { + } + + public: + static const unsigned VERSION = 4; + + template void process(StatusType* status, unsigned length, const unsigned char* data) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->process(this, status, length, data); + StatusType::checkException(status); + } + + template void deprecatedClose(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedClose(this, status); + StatusType::checkException(status); + } + + template void close(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IReplicator", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedClose(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->close(this, status); + StatusType::checkException(status); + } + }; + + class IRequest : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *receive)(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, void* message) throw(); + void (CLOOP_CARG *send)(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, const void* message) throw(); + void (CLOOP_CARG *getInfo)(IRequest* self, IStatus* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); + void (CLOOP_CARG *start)(IRequest* self, IStatus* status, ITransaction* tra, int level) throw(); + void (CLOOP_CARG *startAndSend)(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) throw(); + void (CLOOP_CARG *unwind)(IRequest* self, IStatus* status, int level) throw(); + void (CLOOP_CARG *deprecatedFree)(IRequest* self, IStatus* status) throw(); + void (CLOOP_CARG *free)(IRequest* self, IStatus* status) throw(); + }; + + protected: + IRequest(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IRequest() + { + } + + public: + static const unsigned VERSION = 4; + + template void receive(StatusType* status, int level, unsigned msgType, unsigned length, void* message) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->receive(this, status, level, msgType, length, message); + StatusType::checkException(status); + } + + template void send(StatusType* status, int level, unsigned msgType, unsigned length, const void* message) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->send(this, status, level, msgType, length, message); + StatusType::checkException(status); + } + + template void getInfo(StatusType* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getInfo(this, status, level, itemsLength, items, bufferLength, buffer); + StatusType::checkException(status); + } + + template void start(StatusType* status, ITransaction* tra, int level) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->start(this, status, tra, level); + StatusType::checkException(status); + } + + template void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->startAndSend(this, status, tra, level, msgType, length, message); + StatusType::checkException(status); + } + + template void unwind(StatusType* status, int level) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->unwind(this, status, level); + StatusType::checkException(status); + } + + template void deprecatedFree(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedFree(this, status); + StatusType::checkException(status); + } + + template void free(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IRequest", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedFree(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->free(this, status); + StatusType::checkException(status); + } + }; + + class IEvents : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *deprecatedCancel)(IEvents* self, IStatus* status) throw(); + void (CLOOP_CARG *cancel)(IEvents* self, IStatus* status) throw(); + }; + + protected: + IEvents(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IEvents() + { + } + + public: + static const unsigned VERSION = 4; + + template void deprecatedCancel(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedCancel(this, status); + StatusType::checkException(status); + } + + template void cancel(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IEvents", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedCancel(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->cancel(this, status); + StatusType::checkException(status); + } + }; + + class IAttachment : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *getInfo)(IAttachment* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); + ITransaction* (CLOOP_CARG *startTransaction)(IAttachment* self, IStatus* status, unsigned tpbLength, const unsigned char* tpb) throw(); + ITransaction* (CLOOP_CARG *reconnectTransaction)(IAttachment* self, IStatus* status, unsigned length, const unsigned char* id) throw(); + IRequest* (CLOOP_CARG *compileRequest)(IAttachment* self, IStatus* status, unsigned blrLength, const unsigned char* blr) throw(); + void (CLOOP_CARG *transactRequest)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) throw(); + IBlob* (CLOOP_CARG *createBlob)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) throw(); + IBlob* (CLOOP_CARG *openBlob)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) throw(); + int (CLOOP_CARG *getSlice)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) throw(); + void (CLOOP_CARG *putSlice)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) throw(); + void (CLOOP_CARG *executeDyn)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) throw(); + IStatement* (CLOOP_CARG *prepare)(IAttachment* self, IStatus* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) throw(); + ITransaction* (CLOOP_CARG *execute)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) throw(); + IResultSet* (CLOOP_CARG *openCursor)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) throw(); + IEvents* (CLOOP_CARG *queEvents)(IAttachment* self, IStatus* status, IEventCallback* callback, unsigned length, const unsigned char* events) throw(); + void (CLOOP_CARG *cancelOperation)(IAttachment* self, IStatus* status, int option) throw(); + void (CLOOP_CARG *ping)(IAttachment* self, IStatus* status) throw(); + void (CLOOP_CARG *deprecatedDetach)(IAttachment* self, IStatus* status) throw(); + void (CLOOP_CARG *deprecatedDropDatabase)(IAttachment* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getIdleTimeout)(IAttachment* self, IStatus* status) throw(); + void (CLOOP_CARG *setIdleTimeout)(IAttachment* self, IStatus* status, unsigned timeOut) throw(); + unsigned (CLOOP_CARG *getStatementTimeout)(IAttachment* self, IStatus* status) throw(); + void (CLOOP_CARG *setStatementTimeout)(IAttachment* self, IStatus* status, unsigned timeOut) throw(); + IBatch* (CLOOP_CARG *createBatch)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) throw(); + IReplicator* (CLOOP_CARG *createReplicator)(IAttachment* self, IStatus* status) throw(); + void (CLOOP_CARG *detach)(IAttachment* self, IStatus* status) throw(); + void (CLOOP_CARG *dropDatabase)(IAttachment* self, IStatus* status) throw(); + }; + + protected: + IAttachment(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IAttachment() + { + } + + public: + static const unsigned VERSION = 5; + + template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getInfo(this, status, itemsLength, items, bufferLength, buffer); + StatusType::checkException(status); + } + + template ITransaction* startTransaction(StatusType* status, unsigned tpbLength, const unsigned char* tpb) + { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->startTransaction(this, status, tpbLength, tpb); + StatusType::checkException(status); + return ret; + } + + template ITransaction* reconnectTransaction(StatusType* status, unsigned length, const unsigned char* id) + { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->reconnectTransaction(this, status, length, id); + StatusType::checkException(status); + return ret; + } + + template IRequest* compileRequest(StatusType* status, unsigned blrLength, const unsigned char* blr) + { + StatusType::clearException(status); + IRequest* ret = static_cast(this->cloopVTable)->compileRequest(this, status, blrLength, blr); + StatusType::checkException(status); + return ret; + } + + template void transactRequest(StatusType* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->transactRequest(this, status, transaction, blrLength, blr, inMsgLength, inMsg, outMsgLength, outMsg); + StatusType::checkException(status); + } + + template IBlob* createBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) + { + StatusType::clearException(status); + IBlob* ret = static_cast(this->cloopVTable)->createBlob(this, status, transaction, id, bpbLength, bpb); + StatusType::checkException(status); + return ret; + } + + template IBlob* openBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) + { + StatusType::clearException(status); + IBlob* ret = static_cast(this->cloopVTable)->openBlob(this, status, transaction, id, bpbLength, bpb); + StatusType::checkException(status); + return ret; + } + + template int getSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->getSlice(this, status, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); + StatusType::checkException(status); + return ret; + } + + template void putSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->putSlice(this, status, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); + StatusType::checkException(status); + } + + template void executeDyn(StatusType* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->executeDyn(this, status, transaction, length, dyn); + StatusType::checkException(status); + } + + template IStatement* prepare(StatusType* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) + { + StatusType::clearException(status); + IStatement* ret = static_cast(this->cloopVTable)->prepare(this, status, tra, stmtLength, sqlStmt, dialect, flags); + StatusType::checkException(status); + return ret; + } + + template ITransaction* execute(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) + { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->execute(this, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, outBuffer); + StatusType::checkException(status); + return ret; + } + + template IResultSet* openCursor(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) + { + StatusType::clearException(status); + IResultSet* ret = static_cast(this->cloopVTable)->openCursor(this, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, cursorName, cursorFlags); + StatusType::checkException(status); + return ret; + } + + template IEvents* queEvents(StatusType* status, IEventCallback* callback, unsigned length, const unsigned char* events) + { + StatusType::clearException(status); + IEvents* ret = static_cast(this->cloopVTable)->queEvents(this, status, callback, length, events); + StatusType::checkException(status); + return ret; + } + + template void cancelOperation(StatusType* status, int option) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->cancelOperation(this, status, option); + StatusType::checkException(status); + } + + template void ping(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->ping(this, status); + StatusType::checkException(status); + } + + template void deprecatedDetach(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedDetach(this, status); + StatusType::checkException(status); + } + + template void deprecatedDropDatabase(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedDropDatabase(this, status); + StatusType::checkException(status); + } + + template unsigned getIdleTimeout(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getIdleTimeout(this, status); + StatusType::checkException(status); + return ret; + } + + template void setIdleTimeout(StatusType* status, unsigned timeOut) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setIdleTimeout(this, status, timeOut); + StatusType::checkException(status); + } + + template unsigned getStatementTimeout(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getStatementTimeout(this, status); + StatusType::checkException(status); + return ret; + } + + template void setStatementTimeout(StatusType* status, unsigned timeOut) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setStatementTimeout(this, status, timeOut); + StatusType::checkException(status); + } + + template IBatch* createBatch(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IBatch* ret = static_cast(this->cloopVTable)->createBatch(this, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, parLength, par); + StatusType::checkException(status); + return ret; + } + + template IReplicator* createReplicator(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IReplicator* ret = static_cast(this->cloopVTable)->createReplicator(this, status); + StatusType::checkException(status); + return ret; + } + + template void detach(StatusType* status) + { + if (cloopVTable->version < 5) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 5); + StatusType::checkException(status); + } + else { + deprecatedDetach(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->detach(this, status); + StatusType::checkException(status); + } + + template void dropDatabase(StatusType* status) + { + if (cloopVTable->version < 5) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 5); + StatusType::checkException(status); + } + else { + deprecatedDropDatabase(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->dropDatabase(this, status); + StatusType::checkException(status); + } + }; + + class IService : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *deprecatedDetach)(IService* self, IStatus* status) throw(); + void (CLOOP_CARG *query)(IService* self, IStatus* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) throw(); + void (CLOOP_CARG *start)(IService* self, IStatus* status, unsigned spbLength, const unsigned char* spb) throw(); + void (CLOOP_CARG *detach)(IService* self, IStatus* status) throw(); + void (CLOOP_CARG *cancel)(IService* self, IStatus* status) throw(); + }; + + protected: + IService(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IService() + { + } + + public: + static const unsigned VERSION = 5; + + template void deprecatedDetach(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedDetach(this, status); + StatusType::checkException(status); + } + + template void query(StatusType* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->query(this, status, sendLength, sendItems, receiveLength, receiveItems, bufferLength, buffer); + StatusType::checkException(status); + } + + template void start(StatusType* status, unsigned spbLength, const unsigned char* spb) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->start(this, status, spbLength, spb); + StatusType::checkException(status); + } + + template void detach(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IService", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedDetach(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->detach(this, status); + StatusType::checkException(status); + } + + template void cancel(StatusType* status) + { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IService", cloopVTable->version, 5); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->cancel(this, status); + StatusType::checkException(status); + } + }; + + class IProvider : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + IAttachment* (CLOOP_CARG *attachDatabase)(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) throw(); + IAttachment* (CLOOP_CARG *createDatabase)(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) throw(); + IService* (CLOOP_CARG *attachServiceManager)(IProvider* self, IStatus* status, const char* service, unsigned spbLength, const unsigned char* spb) throw(); + void (CLOOP_CARG *shutdown)(IProvider* self, IStatus* status, unsigned timeout, const int reason) throw(); + void (CLOOP_CARG *setDbCryptCallback)(IProvider* self, IStatus* status, ICryptKeyCallback* cryptCallback) throw(); + }; + + protected: + IProvider(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IProvider() + { + } + + public: + static const unsigned VERSION = 4; + + template IAttachment* attachDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) + { + StatusType::clearException(status); + IAttachment* ret = static_cast(this->cloopVTable)->attachDatabase(this, status, fileName, dpbLength, dpb); + StatusType::checkException(status); + return ret; + } + + template IAttachment* createDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) + { + StatusType::clearException(status); + IAttachment* ret = static_cast(this->cloopVTable)->createDatabase(this, status, fileName, dpbLength, dpb); + StatusType::checkException(status); + return ret; + } + + template IService* attachServiceManager(StatusType* status, const char* service, unsigned spbLength, const unsigned char* spb) + { + StatusType::clearException(status); + IService* ret = static_cast(this->cloopVTable)->attachServiceManager(this, status, service, spbLength, spb); + StatusType::checkException(status); + return ret; + } + + template void shutdown(StatusType* status, unsigned timeout, const int reason) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->shutdown(this, status, timeout, reason); + StatusType::checkException(status); + } + + template void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setDbCryptCallback(this, status, cryptCallback); + StatusType::checkException(status); + } + }; + + class IDtcStart : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *addAttachment)(IDtcStart* self, IStatus* status, IAttachment* att) throw(); + void (CLOOP_CARG *addWithTpb)(IDtcStart* self, IStatus* status, IAttachment* att, unsigned length, const unsigned char* tpb) throw(); + ITransaction* (CLOOP_CARG *start)(IDtcStart* self, IStatus* status) throw(); + }; + + protected: + IDtcStart(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IDtcStart() + { + } + + public: + static const unsigned VERSION = 3; + + template void addAttachment(StatusType* status, IAttachment* att) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->addAttachment(this, status, att); + StatusType::checkException(status); + } + + template void addWithTpb(StatusType* status, IAttachment* att, unsigned length, const unsigned char* tpb) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->addWithTpb(this, status, att, length, tpb); + StatusType::checkException(status); + } + + template ITransaction* start(StatusType* status) + { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->start(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IDtc : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + ITransaction* (CLOOP_CARG *join)(IDtc* self, IStatus* status, ITransaction* one, ITransaction* two) throw(); + IDtcStart* (CLOOP_CARG *startBuilder)(IDtc* self, IStatus* status) throw(); + }; + + protected: + IDtc(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IDtc() + { + } + + public: + static const unsigned VERSION = 2; + + template ITransaction* join(StatusType* status, ITransaction* one, ITransaction* two) + { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->join(this, status, one, two); + StatusType::checkException(status); + return ret; + } + + template IDtcStart* startBuilder(StatusType* status) + { + StatusType::clearException(status); + IDtcStart* ret = static_cast(this->cloopVTable)->startBuilder(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IAuth : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + }; + + protected: + IAuth(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IAuth() + { + } + + public: + static const unsigned VERSION = 4; + + static const int AUTH_FAILED = -1; + static const int AUTH_SUCCESS = 0; + static const int AUTH_MORE_DATA = 1; + static const int AUTH_CONTINUE = 2; + }; + + class IWriter : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *reset)(IWriter* self) throw(); + void (CLOOP_CARG *add)(IWriter* self, IStatus* status, const char* name) throw(); + void (CLOOP_CARG *setType)(IWriter* self, IStatus* status, const char* value) throw(); + void (CLOOP_CARG *setDb)(IWriter* self, IStatus* status, const char* value) throw(); + }; + + protected: + IWriter(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IWriter() + { + } + + public: + static const unsigned VERSION = 2; + + void reset() + { + static_cast(this->cloopVTable)->reset(this); + } + + template void add(StatusType* status, const char* name) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->add(this, status, name); + StatusType::checkException(status); + } + + template void setType(StatusType* status, const char* value) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setType(this, status, value); + StatusType::checkException(status); + } + + template void setDb(StatusType* status, const char* value) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setDb(this, status, value); + StatusType::checkException(status); + } + }; + + class IServerBlock : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getLogin)(IServerBlock* self) throw(); + const unsigned char* (CLOOP_CARG *getData)(IServerBlock* self, unsigned* length) throw(); + void (CLOOP_CARG *putData)(IServerBlock* self, IStatus* status, unsigned length, const void* data) throw(); + ICryptKey* (CLOOP_CARG *newKey)(IServerBlock* self, IStatus* status) throw(); + }; + + protected: + IServerBlock(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IServerBlock() + { + } + + public: + static const unsigned VERSION = 2; + + const char* getLogin() + { + const char* ret = static_cast(this->cloopVTable)->getLogin(this); + return ret; + } + + const unsigned char* getData(unsigned* length) + { + const unsigned char* ret = static_cast(this->cloopVTable)->getData(this, length); + return ret; + } + + template void putData(StatusType* status, unsigned length, const void* data) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->putData(this, status, length, data); + StatusType::checkException(status); + } + + template ICryptKey* newKey(StatusType* status) + { + StatusType::clearException(status); + ICryptKey* ret = static_cast(this->cloopVTable)->newKey(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IClientBlock : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + const char* (CLOOP_CARG *getLogin)(IClientBlock* self) throw(); + const char* (CLOOP_CARG *getPassword)(IClientBlock* self) throw(); + const unsigned char* (CLOOP_CARG *getData)(IClientBlock* self, unsigned* length) throw(); + void (CLOOP_CARG *putData)(IClientBlock* self, IStatus* status, unsigned length, const void* data) throw(); + ICryptKey* (CLOOP_CARG *newKey)(IClientBlock* self, IStatus* status) throw(); + IAuthBlock* (CLOOP_CARG *getAuthBlock)(IClientBlock* self, IStatus* status) throw(); + }; + + protected: + IClientBlock(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IClientBlock() + { + } + + public: + static const unsigned VERSION = 4; + + const char* getLogin() + { + const char* ret = static_cast(this->cloopVTable)->getLogin(this); + return ret; + } + + const char* getPassword() + { + const char* ret = static_cast(this->cloopVTable)->getPassword(this); + return ret; + } + + const unsigned char* getData(unsigned* length) + { + const unsigned char* ret = static_cast(this->cloopVTable)->getData(this, length); + return ret; + } + + template void putData(StatusType* status, unsigned length, const void* data) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->putData(this, status, length, data); + StatusType::checkException(status); + } + + template ICryptKey* newKey(StatusType* status) + { + StatusType::clearException(status); + ICryptKey* ret = static_cast(this->cloopVTable)->newKey(this, status); + StatusType::checkException(status); + return ret; + } + + template IAuthBlock* getAuthBlock(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IClientBlock", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IAuthBlock* ret = static_cast(this->cloopVTable)->getAuthBlock(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IServer : public IAuth + { + public: + struct VTable : public IAuth::VTable + { + int (CLOOP_CARG *authenticate)(IServer* self, IStatus* status, IServerBlock* sBlock, IWriter* writerInterface) throw(); + void (CLOOP_CARG *setDbCryptCallback)(IServer* self, IStatus* status, ICryptKeyCallback* cryptCallback) throw(); + }; + + protected: + IServer(DoNotInherit) + : IAuth(DoNotInherit()) + { + } + + ~IServer() + { + } + + public: + static const unsigned VERSION = 6; + + template int authenticate(StatusType* status, IServerBlock* sBlock, IWriter* writerInterface) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->authenticate(this, status, sBlock, writerInterface); + StatusType::checkException(status); + return ret; + } + + template void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) + { + if (cloopVTable->version < 6) + { + StatusType::setVersionError(status, "IServer", cloopVTable->version, 6); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setDbCryptCallback(this, status, cryptCallback); + StatusType::checkException(status); + } + }; + + class IClient : public IAuth + { + public: + struct VTable : public IAuth::VTable + { + int (CLOOP_CARG *authenticate)(IClient* self, IStatus* status, IClientBlock* cBlock) throw(); + }; + + protected: + IClient(DoNotInherit) + : IAuth(DoNotInherit()) + { + } + + ~IClient() + { + } + + public: + static const unsigned VERSION = 5; + + template int authenticate(StatusType* status, IClientBlock* cBlock) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->authenticate(this, status, cBlock); + StatusType::checkException(status); + return ret; + } + }; + + class IUserField : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + int (CLOOP_CARG *entered)(IUserField* self) throw(); + int (CLOOP_CARG *specified)(IUserField* self) throw(); + void (CLOOP_CARG *setEntered)(IUserField* self, IStatus* status, int newValue) throw(); + }; + + protected: + IUserField(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IUserField() + { + } + + public: + static const unsigned VERSION = 2; + + int entered() + { + int ret = static_cast(this->cloopVTable)->entered(this); + return ret; + } + + int specified() + { + int ret = static_cast(this->cloopVTable)->specified(this); + return ret; + } + + template void setEntered(StatusType* status, int newValue) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setEntered(this, status, newValue); + StatusType::checkException(status); + } + }; + + class ICharUserField : public IUserField + { + public: + struct VTable : public IUserField::VTable + { + const char* (CLOOP_CARG *get)(ICharUserField* self) throw(); + void (CLOOP_CARG *set)(ICharUserField* self, IStatus* status, const char* newValue) throw(); + }; + + protected: + ICharUserField(DoNotInherit) + : IUserField(DoNotInherit()) + { + } + + ~ICharUserField() + { + } + + public: + static const unsigned VERSION = 3; + + const char* get() + { + const char* ret = static_cast(this->cloopVTable)->get(this); + return ret; + } + + template void set(StatusType* status, const char* newValue) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->set(this, status, newValue); + StatusType::checkException(status); + } + }; + + class IIntUserField : public IUserField + { + public: + struct VTable : public IUserField::VTable + { + int (CLOOP_CARG *get)(IIntUserField* self) throw(); + void (CLOOP_CARG *set)(IIntUserField* self, IStatus* status, int newValue) throw(); + }; + + protected: + IIntUserField(DoNotInherit) + : IUserField(DoNotInherit()) + { + } + + ~IIntUserField() + { + } + + public: + static const unsigned VERSION = 3; + + int get() + { + int ret = static_cast(this->cloopVTable)->get(this); + return ret; + } + + template void set(StatusType* status, int newValue) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->set(this, status, newValue); + StatusType::checkException(status); + } + }; + + class IUser : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + unsigned (CLOOP_CARG *operation)(IUser* self) throw(); + ICharUserField* (CLOOP_CARG *userName)(IUser* self) throw(); + ICharUserField* (CLOOP_CARG *password)(IUser* self) throw(); + ICharUserField* (CLOOP_CARG *firstName)(IUser* self) throw(); + ICharUserField* (CLOOP_CARG *lastName)(IUser* self) throw(); + ICharUserField* (CLOOP_CARG *middleName)(IUser* self) throw(); + ICharUserField* (CLOOP_CARG *comment)(IUser* self) throw(); + ICharUserField* (CLOOP_CARG *attributes)(IUser* self) throw(); + IIntUserField* (CLOOP_CARG *active)(IUser* self) throw(); + IIntUserField* (CLOOP_CARG *admin)(IUser* self) throw(); + void (CLOOP_CARG *clear)(IUser* self, IStatus* status) throw(); + }; + + protected: + IUser(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IUser() + { + } + + public: + static const unsigned VERSION = 2; + + static const unsigned OP_USER_ADD = 1; + static const unsigned OP_USER_MODIFY = 2; + static const unsigned OP_USER_DELETE = 3; + static const unsigned OP_USER_DISPLAY = 4; + static const unsigned OP_USER_SET_MAP = 5; + static const unsigned OP_USER_DROP_MAP = 6; + + unsigned operation() + { + unsigned ret = static_cast(this->cloopVTable)->operation(this); + return ret; + } + + ICharUserField* userName() + { + ICharUserField* ret = static_cast(this->cloopVTable)->userName(this); + return ret; + } + + ICharUserField* password() + { + ICharUserField* ret = static_cast(this->cloopVTable)->password(this); + return ret; + } + + ICharUserField* firstName() + { + ICharUserField* ret = static_cast(this->cloopVTable)->firstName(this); + return ret; + } + + ICharUserField* lastName() + { + ICharUserField* ret = static_cast(this->cloopVTable)->lastName(this); + return ret; + } + + ICharUserField* middleName() + { + ICharUserField* ret = static_cast(this->cloopVTable)->middleName(this); + return ret; + } + + ICharUserField* comment() + { + ICharUserField* ret = static_cast(this->cloopVTable)->comment(this); + return ret; + } + + ICharUserField* attributes() + { + ICharUserField* ret = static_cast(this->cloopVTable)->attributes(this); + return ret; + } + + IIntUserField* active() + { + IIntUserField* ret = static_cast(this->cloopVTable)->active(this); + return ret; + } + + IIntUserField* admin() + { + IIntUserField* ret = static_cast(this->cloopVTable)->admin(this); + return ret; + } + + template void clear(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->clear(this, status); + StatusType::checkException(status); + } + }; + + class IListUsers : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *list)(IListUsers* self, IStatus* status, IUser* user) throw(); + }; + + protected: + IListUsers(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IListUsers() + { + } + + public: + static const unsigned VERSION = 2; + + template void list(StatusType* status, IUser* user) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->list(this, status, user); + StatusType::checkException(status); + } + }; + + class ILogonInfo : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *name)(ILogonInfo* self) throw(); + const char* (CLOOP_CARG *role)(ILogonInfo* self) throw(); + const char* (CLOOP_CARG *networkProtocol)(ILogonInfo* self) throw(); + const char* (CLOOP_CARG *remoteAddress)(ILogonInfo* self) throw(); + const unsigned char* (CLOOP_CARG *authBlock)(ILogonInfo* self, unsigned* length) throw(); + IAttachment* (CLOOP_CARG *attachment)(ILogonInfo* self, IStatus* status) throw(); + ITransaction* (CLOOP_CARG *transaction)(ILogonInfo* self, IStatus* status) throw(); + }; + + protected: + ILogonInfo(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ILogonInfo() + { + } + + public: + static const unsigned VERSION = 3; + + const char* name() + { + const char* ret = static_cast(this->cloopVTable)->name(this); + return ret; + } + + const char* role() + { + const char* ret = static_cast(this->cloopVTable)->role(this); + return ret; + } + + const char* networkProtocol() + { + const char* ret = static_cast(this->cloopVTable)->networkProtocol(this); + return ret; + } + + const char* remoteAddress() + { + const char* ret = static_cast(this->cloopVTable)->remoteAddress(this); + return ret; + } + + const unsigned char* authBlock(unsigned* length) + { + const unsigned char* ret = static_cast(this->cloopVTable)->authBlock(this, length); + return ret; + } + + template IAttachment* attachment(StatusType* status) + { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "ILogonInfo", cloopVTable->version, 3); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IAttachment* ret = static_cast(this->cloopVTable)->attachment(this, status); + StatusType::checkException(status); + return ret; + } + + template ITransaction* transaction(StatusType* status) + { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "ILogonInfo", cloopVTable->version, 3); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->transaction(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IManagement : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + void (CLOOP_CARG *start)(IManagement* self, IStatus* status, ILogonInfo* logonInfo) throw(); + int (CLOOP_CARG *execute)(IManagement* self, IStatus* status, IUser* user, IListUsers* callback) throw(); + void (CLOOP_CARG *commit)(IManagement* self, IStatus* status) throw(); + void (CLOOP_CARG *rollback)(IManagement* self, IStatus* status) throw(); + }; + + protected: + IManagement(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IManagement() + { + } + + public: + static const unsigned VERSION = 4; + + template void start(StatusType* status, ILogonInfo* logonInfo) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->start(this, status, logonInfo); + StatusType::checkException(status); + } + + template int execute(StatusType* status, IUser* user, IListUsers* callback) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->execute(this, status, user, callback); + StatusType::checkException(status); + return ret; + } + + template void commit(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->commit(this, status); + StatusType::checkException(status); + } + + template void rollback(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->rollback(this, status); + StatusType::checkException(status); + } + }; + + class IAuthBlock : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getType)(IAuthBlock* self) throw(); + const char* (CLOOP_CARG *getName)(IAuthBlock* self) throw(); + const char* (CLOOP_CARG *getPlugin)(IAuthBlock* self) throw(); + const char* (CLOOP_CARG *getSecurityDb)(IAuthBlock* self) throw(); + const char* (CLOOP_CARG *getOriginalPlugin)(IAuthBlock* self) throw(); + FB_BOOLEAN (CLOOP_CARG *next)(IAuthBlock* self, IStatus* status) throw(); + FB_BOOLEAN (CLOOP_CARG *first)(IAuthBlock* self, IStatus* status) throw(); + }; + + protected: + IAuthBlock(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IAuthBlock() + { + } + + public: + static const unsigned VERSION = 2; + + const char* getType() + { + const char* ret = static_cast(this->cloopVTable)->getType(this); + return ret; + } + + const char* getName() + { + const char* ret = static_cast(this->cloopVTable)->getName(this); + return ret; + } + + const char* getPlugin() + { + const char* ret = static_cast(this->cloopVTable)->getPlugin(this); + return ret; + } + + const char* getSecurityDb() + { + const char* ret = static_cast(this->cloopVTable)->getSecurityDb(this); + return ret; + } + + const char* getOriginalPlugin() + { + const char* ret = static_cast(this->cloopVTable)->getOriginalPlugin(this); + return ret; + } + + template FB_BOOLEAN next(StatusType* status) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->next(this, status); + StatusType::checkException(status); + return ret; + } + + template FB_BOOLEAN first(StatusType* status) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->first(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IWireCryptPlugin : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + const char* (CLOOP_CARG *getKnownTypes)(IWireCryptPlugin* self, IStatus* status) throw(); + void (CLOOP_CARG *setKey)(IWireCryptPlugin* self, IStatus* status, ICryptKey* key) throw(); + void (CLOOP_CARG *encrypt)(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw(); + void (CLOOP_CARG *decrypt)(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw(); + const unsigned char* (CLOOP_CARG *getSpecificData)(IWireCryptPlugin* self, IStatus* status, const char* keyType, unsigned* length) throw(); + void (CLOOP_CARG *setSpecificData)(IWireCryptPlugin* self, IStatus* status, const char* keyType, unsigned length, const unsigned char* data) throw(); + }; + + protected: + IWireCryptPlugin(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IWireCryptPlugin() + { + } + + public: + static const unsigned VERSION = 5; + + template const char* getKnownTypes(StatusType* status) + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getKnownTypes(this, status); + StatusType::checkException(status); + return ret; + } + + template void setKey(StatusType* status, ICryptKey* key) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setKey(this, status, key); + StatusType::checkException(status); + } + + template void encrypt(StatusType* status, unsigned length, const void* from, void* to) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->encrypt(this, status, length, from, to); + StatusType::checkException(status); + } + + template void decrypt(StatusType* status, unsigned length, const void* from, void* to) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->decrypt(this, status, length, from, to); + StatusType::checkException(status); + } + + template const unsigned char* getSpecificData(StatusType* status, const char* keyType, unsigned* length) + { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IWireCryptPlugin", cloopVTable->version, 5); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + const unsigned char* ret = static_cast(this->cloopVTable)->getSpecificData(this, status, keyType, length); + StatusType::checkException(status); + return ret; + } + + template void setSpecificData(StatusType* status, const char* keyType, unsigned length, const unsigned char* data) + { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IWireCryptPlugin", cloopVTable->version, 5); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setSpecificData(this, status, keyType, length, data); + StatusType::checkException(status); + } + }; + + class ICryptKeyCallback : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + unsigned (CLOOP_CARG *callback)(ICryptKeyCallback* self, unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) throw(); + }; + + protected: + ICryptKeyCallback(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ICryptKeyCallback() + { + } + + public: + static const unsigned VERSION = 2; + + unsigned callback(unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) + { + unsigned ret = static_cast(this->cloopVTable)->callback(this, dataLength, data, bufferLength, buffer); + return ret; + } + }; + + class IKeyHolderPlugin : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + int (CLOOP_CARG *keyCallback)(IKeyHolderPlugin* self, IStatus* status, ICryptKeyCallback* callback) throw(); + ICryptKeyCallback* (CLOOP_CARG *keyHandle)(IKeyHolderPlugin* self, IStatus* status, const char* keyName) throw(); + FB_BOOLEAN (CLOOP_CARG *useOnlyOwnKeys)(IKeyHolderPlugin* self, IStatus* status) throw(); + ICryptKeyCallback* (CLOOP_CARG *chainHandle)(IKeyHolderPlugin* self, IStatus* status) throw(); + }; + + protected: + IKeyHolderPlugin(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IKeyHolderPlugin() + { + } + + public: + static const unsigned VERSION = 5; + + template int keyCallback(StatusType* status, ICryptKeyCallback* callback) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->keyCallback(this, status, callback); + StatusType::checkException(status); + return ret; + } + + template ICryptKeyCallback* keyHandle(StatusType* status, const char* keyName) + { + StatusType::clearException(status); + ICryptKeyCallback* ret = static_cast(this->cloopVTable)->keyHandle(this, status, keyName); + StatusType::checkException(status); + return ret; + } + + template FB_BOOLEAN useOnlyOwnKeys(StatusType* status) + { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IKeyHolderPlugin", cloopVTable->version, 5); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->useOnlyOwnKeys(this, status); + StatusType::checkException(status); + return ret; + } + + template ICryptKeyCallback* chainHandle(StatusType* status) + { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IKeyHolderPlugin", cloopVTable->version, 5); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + ICryptKeyCallback* ret = static_cast(this->cloopVTable)->chainHandle(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IDbCryptInfo : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + const char* (CLOOP_CARG *getDatabaseFullPath)(IDbCryptInfo* self, IStatus* status) throw(); + }; + + protected: + IDbCryptInfo(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~IDbCryptInfo() + { + } + + public: + static const unsigned VERSION = 3; + + template const char* getDatabaseFullPath(StatusType* status) + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getDatabaseFullPath(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IDbCryptPlugin : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + void (CLOOP_CARG *setKey)(IDbCryptPlugin* self, IStatus* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) throw(); + void (CLOOP_CARG *encrypt)(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw(); + void (CLOOP_CARG *decrypt)(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw(); + void (CLOOP_CARG *setInfo)(IDbCryptPlugin* self, IStatus* status, IDbCryptInfo* info) throw(); + }; + + protected: + IDbCryptPlugin(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IDbCryptPlugin() + { + } + + public: + static const unsigned VERSION = 5; + + template void setKey(StatusType* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setKey(this, status, length, sources, keyName); + StatusType::checkException(status); + } + + template void encrypt(StatusType* status, unsigned length, const void* from, void* to) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->encrypt(this, status, length, from, to); + StatusType::checkException(status); + } + + template void decrypt(StatusType* status, unsigned length, const void* from, void* to) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->decrypt(this, status, length, from, to); + StatusType::checkException(status); + } + + template void setInfo(StatusType* status, IDbCryptInfo* info) + { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IDbCryptPlugin", cloopVTable->version, 5); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setInfo(this, status, info); + StatusType::checkException(status); + } + }; + + class IExternalContext : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + IMaster* (CLOOP_CARG *getMaster)(IExternalContext* self) throw(); + IExternalEngine* (CLOOP_CARG *getEngine)(IExternalContext* self, IStatus* status) throw(); + IAttachment* (CLOOP_CARG *getAttachment)(IExternalContext* self, IStatus* status) throw(); + ITransaction* (CLOOP_CARG *getTransaction)(IExternalContext* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getUserName)(IExternalContext* self) throw(); + const char* (CLOOP_CARG *getDatabaseName)(IExternalContext* self) throw(); + const char* (CLOOP_CARG *getClientCharSet)(IExternalContext* self) throw(); + int (CLOOP_CARG *obtainInfoCode)(IExternalContext* self) throw(); + void* (CLOOP_CARG *getInfo)(IExternalContext* self, int code) throw(); + void* (CLOOP_CARG *setInfo)(IExternalContext* self, int code, void* value) throw(); + }; + + protected: + IExternalContext(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IExternalContext() + { + } + + public: + static const unsigned VERSION = 2; + + IMaster* getMaster() + { + IMaster* ret = static_cast(this->cloopVTable)->getMaster(this); + return ret; + } + + template IExternalEngine* getEngine(StatusType* status) + { + StatusType::clearException(status); + IExternalEngine* ret = static_cast(this->cloopVTable)->getEngine(this, status); + StatusType::checkException(status); + return ret; + } + + template IAttachment* getAttachment(StatusType* status) + { + StatusType::clearException(status); + IAttachment* ret = static_cast(this->cloopVTable)->getAttachment(this, status); + StatusType::checkException(status); + return ret; + } + + template ITransaction* getTransaction(StatusType* status) + { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->getTransaction(this, status); + StatusType::checkException(status); + return ret; + } + + const char* getUserName() + { + const char* ret = static_cast(this->cloopVTable)->getUserName(this); + return ret; + } + + const char* getDatabaseName() + { + const char* ret = static_cast(this->cloopVTable)->getDatabaseName(this); + return ret; + } + + const char* getClientCharSet() + { + const char* ret = static_cast(this->cloopVTable)->getClientCharSet(this); + return ret; + } + + int obtainInfoCode() + { + int ret = static_cast(this->cloopVTable)->obtainInfoCode(this); + return ret; + } + + void* getInfo(int code) + { + void* ret = static_cast(this->cloopVTable)->getInfo(this, code); + return ret; + } + + void* setInfo(int code, void* value) + { + void* ret = static_cast(this->cloopVTable)->setInfo(this, code, value); + return ret; + } + }; + + class IExternalResultSet : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + FB_BOOLEAN (CLOOP_CARG *fetch)(IExternalResultSet* self, IStatus* status) throw(); + }; + + protected: + IExternalResultSet(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IExternalResultSet() + { + } + + public: + static const unsigned VERSION = 3; + + template FB_BOOLEAN fetch(StatusType* status) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->fetch(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IExternalFunction : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *getCharSet)(IExternalFunction* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw(); + void (CLOOP_CARG *execute)(IExternalFunction* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) throw(); + }; + + protected: + IExternalFunction(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IExternalFunction() + { + } + + public: + static const unsigned VERSION = 3; + + template void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getCharSet(this, status, context, name, nameSize); + StatusType::checkException(status); + } + + template void execute(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->execute(this, status, context, inMsg, outMsg); + StatusType::checkException(status); + } + }; + + class IExternalProcedure : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *getCharSet)(IExternalProcedure* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw(); + IExternalResultSet* (CLOOP_CARG *open)(IExternalProcedure* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) throw(); + }; + + protected: + IExternalProcedure(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IExternalProcedure() + { + } + + public: + static const unsigned VERSION = 3; + + template void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getCharSet(this, status, context, name, nameSize); + StatusType::checkException(status); + } + + template IExternalResultSet* open(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) + { + StatusType::clearException(status); + IExternalResultSet* ret = static_cast(this->cloopVTable)->open(this, status, context, inMsg, outMsg); + StatusType::checkException(status); + return ret; + } + }; + + class IExternalTrigger : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *getCharSet)(IExternalTrigger* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw(); + void (CLOOP_CARG *execute)(IExternalTrigger* self, IStatus* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) throw(); + }; + + protected: + IExternalTrigger(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IExternalTrigger() + { + } + + public: + static const unsigned VERSION = 3; + + static const unsigned TYPE_BEFORE = 1; + static const unsigned TYPE_AFTER = 2; + static const unsigned TYPE_DATABASE = 3; + static const unsigned ACTION_INSERT = 1; + static const unsigned ACTION_UPDATE = 2; + static const unsigned ACTION_DELETE = 3; + static const unsigned ACTION_CONNECT = 4; + static const unsigned ACTION_DISCONNECT = 5; + static const unsigned ACTION_TRANS_START = 6; + static const unsigned ACTION_TRANS_COMMIT = 7; + static const unsigned ACTION_TRANS_ROLLBACK = 8; + static const unsigned ACTION_DDL = 9; + + template void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getCharSet(this, status, context, name, nameSize); + StatusType::checkException(status); + } + + template void execute(StatusType* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->execute(this, status, context, action, oldMsg, newMsg); + StatusType::checkException(status); + } + }; + + class IRoutineMetadata : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getPackage)(const IRoutineMetadata* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getName)(const IRoutineMetadata* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getEntryPoint)(const IRoutineMetadata* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getBody)(const IRoutineMetadata* self, IStatus* status) throw(); + IMessageMetadata* (CLOOP_CARG *getInputMetadata)(const IRoutineMetadata* self, IStatus* status) throw(); + IMessageMetadata* (CLOOP_CARG *getOutputMetadata)(const IRoutineMetadata* self, IStatus* status) throw(); + IMessageMetadata* (CLOOP_CARG *getTriggerMetadata)(const IRoutineMetadata* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getTriggerTable)(const IRoutineMetadata* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getTriggerType)(const IRoutineMetadata* self, IStatus* status) throw(); + }; + + protected: + IRoutineMetadata(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IRoutineMetadata() + { + } + + public: + static const unsigned VERSION = 2; + + template const char* getPackage(StatusType* status) const + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getPackage(this, status); + StatusType::checkException(status); + return ret; + } + + template const char* getName(StatusType* status) const + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getName(this, status); + StatusType::checkException(status); + return ret; + } + + template const char* getEntryPoint(StatusType* status) const + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getEntryPoint(this, status); + StatusType::checkException(status); + return ret; + } + + template const char* getBody(StatusType* status) const + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getBody(this, status); + StatusType::checkException(status); + return ret; + } + + template IMessageMetadata* getInputMetadata(StatusType* status) const + { + StatusType::clearException(status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getInputMetadata(this, status); + StatusType::checkException(status); + return ret; + } + + template IMessageMetadata* getOutputMetadata(StatusType* status) const + { + StatusType::clearException(status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getOutputMetadata(this, status); + StatusType::checkException(status); + return ret; + } + + template IMessageMetadata* getTriggerMetadata(StatusType* status) const + { + StatusType::clearException(status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getTriggerMetadata(this, status); + StatusType::checkException(status); + return ret; + } + + template const char* getTriggerTable(StatusType* status) const + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getTriggerTable(this, status); + StatusType::checkException(status); + return ret; + } + + template unsigned getTriggerType(StatusType* status) const + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getTriggerType(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class IExternalEngine : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + void (CLOOP_CARG *open)(IExternalEngine* self, IStatus* status, IExternalContext* context, char* charSet, unsigned charSetSize) throw(); + void (CLOOP_CARG *openAttachment)(IExternalEngine* self, IStatus* status, IExternalContext* context) throw(); + void (CLOOP_CARG *closeAttachment)(IExternalEngine* self, IStatus* status, IExternalContext* context) throw(); + IExternalFunction* (CLOOP_CARG *makeFunction)(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw(); + IExternalProcedure* (CLOOP_CARG *makeProcedure)(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw(); + IExternalTrigger* (CLOOP_CARG *makeTrigger)(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) throw(); + }; + + protected: + IExternalEngine(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IExternalEngine() + { + } + + public: + static const unsigned VERSION = 4; + + template void open(StatusType* status, IExternalContext* context, char* charSet, unsigned charSetSize) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->open(this, status, context, charSet, charSetSize); + StatusType::checkException(status); + } + + template void openAttachment(StatusType* status, IExternalContext* context) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->openAttachment(this, status, context); + StatusType::checkException(status); + } + + template void closeAttachment(StatusType* status, IExternalContext* context) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->closeAttachment(this, status, context); + StatusType::checkException(status); + } + + template IExternalFunction* makeFunction(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) + { + StatusType::clearException(status); + IExternalFunction* ret = static_cast(this->cloopVTable)->makeFunction(this, status, context, metadata, inBuilder, outBuilder); + StatusType::checkException(status); + return ret; + } + + template IExternalProcedure* makeProcedure(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) + { + StatusType::clearException(status); + IExternalProcedure* ret = static_cast(this->cloopVTable)->makeProcedure(this, status, context, metadata, inBuilder, outBuilder); + StatusType::checkException(status); + return ret; + } + + template IExternalTrigger* makeTrigger(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) + { + StatusType::clearException(status); + IExternalTrigger* ret = static_cast(this->cloopVTable)->makeTrigger(this, status, context, metadata, fieldsBuilder); + StatusType::checkException(status); + return ret; + } + }; + + class ITimer : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + void (CLOOP_CARG *handler)(ITimer* self) throw(); + }; + + protected: + ITimer(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~ITimer() + { + } + + public: + static const unsigned VERSION = 3; + + void handler() + { + static_cast(this->cloopVTable)->handler(this); + } + }; + + class ITimerControl : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *start)(ITimerControl* self, IStatus* status, ITimer* timer, ISC_UINT64 microSeconds) throw(); + void (CLOOP_CARG *stop)(ITimerControl* self, IStatus* status, ITimer* timer) throw(); + }; + + protected: + ITimerControl(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITimerControl() + { + } + + public: + static const unsigned VERSION = 2; + + template void start(StatusType* status, ITimer* timer, ISC_UINT64 microSeconds) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->start(this, status, timer, microSeconds); + StatusType::checkException(status); + } + + template void stop(StatusType* status, ITimer* timer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->stop(this, status, timer); + StatusType::checkException(status); + } + }; + + class IVersionCallback : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *callback)(IVersionCallback* self, IStatus* status, const char* text) throw(); + }; + + protected: + IVersionCallback(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IVersionCallback() + { + } + + public: + static const unsigned VERSION = 2; + + template void callback(StatusType* status, const char* text) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->callback(this, status, text); + StatusType::checkException(status); + } + }; + + class IUtil : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *getFbVersion)(IUtil* self, IStatus* status, IAttachment* att, IVersionCallback* callback) throw(); + void (CLOOP_CARG *loadBlob)(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) throw(); + void (CLOOP_CARG *dumpBlob)(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) throw(); + void (CLOOP_CARG *getPerfCounters)(IUtil* self, IStatus* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) throw(); + IAttachment* (CLOOP_CARG *executeCreateDatabase)(IUtil* self, IStatus* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) throw(); + void (CLOOP_CARG *decodeDate)(IUtil* self, ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) throw(); + void (CLOOP_CARG *decodeTime)(IUtil* self, ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) throw(); + ISC_DATE (CLOOP_CARG *encodeDate)(IUtil* self, unsigned year, unsigned month, unsigned day) throw(); + ISC_TIME (CLOOP_CARG *encodeTime)(IUtil* self, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) throw(); + unsigned (CLOOP_CARG *formatStatus)(IUtil* self, char* buffer, unsigned bufferSize, IStatus* status) throw(); + unsigned (CLOOP_CARG *getClientVersion)(IUtil* self) throw(); + IXpbBuilder* (CLOOP_CARG *getXpbBuilder)(IUtil* self, IStatus* status, unsigned kind, const unsigned char* buf, unsigned len) throw(); + unsigned (CLOOP_CARG *setOffsets)(IUtil* self, IStatus* status, IMessageMetadata* metadata, IOffsetsCallback* callback) throw(); + IDecFloat16* (CLOOP_CARG *getDecFloat16)(IUtil* self, IStatus* status) throw(); + IDecFloat34* (CLOOP_CARG *getDecFloat34)(IUtil* self, IStatus* status) throw(); + void (CLOOP_CARG *decodeTimeTz)(IUtil* self, IStatus* status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) throw(); + void (CLOOP_CARG *decodeTimeStampTz)(IUtil* self, IStatus* status, const ISC_TIMESTAMP_TZ* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) throw(); + void (CLOOP_CARG *encodeTimeTz)(IUtil* self, IStatus* status, ISC_TIME_TZ* timeTz, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) throw(); + void (CLOOP_CARG *encodeTimeStampTz)(IUtil* self, IStatus* status, ISC_TIMESTAMP_TZ* timeStampTz, unsigned year, unsigned month, unsigned day, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) throw(); + IInt128* (CLOOP_CARG *getInt128)(IUtil* self, IStatus* status) throw(); + void (CLOOP_CARG *decodeTimeTzEx)(IUtil* self, IStatus* status, const ISC_TIME_TZ_EX* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) throw(); + void (CLOOP_CARG *decodeTimeStampTzEx)(IUtil* self, IStatus* status, const ISC_TIMESTAMP_TZ_EX* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) throw(); + }; + + protected: + IUtil(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IUtil() + { + } + + public: + static const unsigned VERSION = 4; + + template void getFbVersion(StatusType* status, IAttachment* att, IVersionCallback* callback) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getFbVersion(this, status, att, callback); + StatusType::checkException(status); + } + + template void loadBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->loadBlob(this, status, blobId, att, tra, file, txt); + StatusType::checkException(status); + } + + template void dumpBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->dumpBlob(this, status, blobId, att, tra, file, txt); + StatusType::checkException(status); + } + + template void getPerfCounters(StatusType* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getPerfCounters(this, status, att, countersSet, counters); + StatusType::checkException(status); + } + + template IAttachment* executeCreateDatabase(StatusType* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) + { + StatusType::clearException(status); + IAttachment* ret = static_cast(this->cloopVTable)->executeCreateDatabase(this, status, stmtLength, creatDBstatement, dialect, stmtIsCreateDb); + StatusType::checkException(status); + return ret; + } + + void decodeDate(ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) + { + static_cast(this->cloopVTable)->decodeDate(this, date, year, month, day); + } + + void decodeTime(ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) + { + static_cast(this->cloopVTable)->decodeTime(this, time, hours, minutes, seconds, fractions); + } + + ISC_DATE encodeDate(unsigned year, unsigned month, unsigned day) + { + ISC_DATE ret = static_cast(this->cloopVTable)->encodeDate(this, year, month, day); + return ret; + } + + ISC_TIME encodeTime(unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) + { + ISC_TIME ret = static_cast(this->cloopVTable)->encodeTime(this, hours, minutes, seconds, fractions); + return ret; + } + + unsigned formatStatus(char* buffer, unsigned bufferSize, IStatus* status) + { + unsigned ret = static_cast(this->cloopVTable)->formatStatus(this, buffer, bufferSize, status); + return ret; + } + + unsigned getClientVersion() + { + unsigned ret = static_cast(this->cloopVTable)->getClientVersion(this); + return ret; + } + + template IXpbBuilder* getXpbBuilder(StatusType* status, unsigned kind, const unsigned char* buf, unsigned len) + { + StatusType::clearException(status); + IXpbBuilder* ret = static_cast(this->cloopVTable)->getXpbBuilder(this, status, kind, buf, len); + StatusType::checkException(status); + return ret; + } + + template unsigned setOffsets(StatusType* status, IMessageMetadata* metadata, IOffsetsCallback* callback) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->setOffsets(this, status, metadata, callback); + StatusType::checkException(status); + return ret; + } + + template IDecFloat16* getDecFloat16(StatusType* status) + { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IDecFloat16* ret = static_cast(this->cloopVTable)->getDecFloat16(this, status); + StatusType::checkException(status); + return ret; + } + + template IDecFloat34* getDecFloat34(StatusType* status) + { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IDecFloat34* ret = static_cast(this->cloopVTable)->getDecFloat34(this, status); + StatusType::checkException(status); + return ret; + } + + template void decodeTimeTz(StatusType* status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) + { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->decodeTimeTz(this, status, timeTz, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + StatusType::checkException(status); + } + + template void decodeTimeStampTz(StatusType* status, const ISC_TIMESTAMP_TZ* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) + { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->decodeTimeStampTz(this, status, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + StatusType::checkException(status); + } + + template void encodeTimeTz(StatusType* status, ISC_TIME_TZ* timeTz, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) + { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->encodeTimeTz(this, status, timeTz, hours, minutes, seconds, fractions, timeZone); + StatusType::checkException(status); + } + + template void encodeTimeStampTz(StatusType* status, ISC_TIMESTAMP_TZ* timeStampTz, unsigned year, unsigned month, unsigned day, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) + { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->encodeTimeStampTz(this, status, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZone); + StatusType::checkException(status); + } + + template IInt128* getInt128(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IInt128* ret = static_cast(this->cloopVTable)->getInt128(this, status); + StatusType::checkException(status); + return ret; + } + + template void decodeTimeTzEx(StatusType* status, const ISC_TIME_TZ_EX* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->decodeTimeTzEx(this, status, timeTz, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + StatusType::checkException(status); + } + + template void decodeTimeStampTzEx(StatusType* status, const ISC_TIMESTAMP_TZ_EX* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->decodeTimeStampTzEx(this, status, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + StatusType::checkException(status); + } + }; + + class IOffsetsCallback : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *setOffset)(IOffsetsCallback* self, IStatus* status, unsigned index, unsigned offset, unsigned nullOffset) throw(); + }; + + protected: + IOffsetsCallback(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IOffsetsCallback() + { + } + + public: + static const unsigned VERSION = 2; + + template void setOffset(StatusType* status, unsigned index, unsigned offset, unsigned nullOffset) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setOffset(this, status, index, offset, nullOffset); + StatusType::checkException(status); + } + }; + + class IXpbBuilder : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *clear)(IXpbBuilder* self, IStatus* status) throw(); + void (CLOOP_CARG *removeCurrent)(IXpbBuilder* self, IStatus* status) throw(); + void (CLOOP_CARG *insertInt)(IXpbBuilder* self, IStatus* status, unsigned char tag, int value) throw(); + void (CLOOP_CARG *insertBigInt)(IXpbBuilder* self, IStatus* status, unsigned char tag, ISC_INT64 value) throw(); + void (CLOOP_CARG *insertBytes)(IXpbBuilder* self, IStatus* status, unsigned char tag, const void* bytes, unsigned length) throw(); + void (CLOOP_CARG *insertString)(IXpbBuilder* self, IStatus* status, unsigned char tag, const char* str) throw(); + void (CLOOP_CARG *insertTag)(IXpbBuilder* self, IStatus* status, unsigned char tag) throw(); + FB_BOOLEAN (CLOOP_CARG *isEof)(IXpbBuilder* self, IStatus* status) throw(); + void (CLOOP_CARG *moveNext)(IXpbBuilder* self, IStatus* status) throw(); + void (CLOOP_CARG *rewind)(IXpbBuilder* self, IStatus* status) throw(); + FB_BOOLEAN (CLOOP_CARG *findFirst)(IXpbBuilder* self, IStatus* status, unsigned char tag) throw(); + FB_BOOLEAN (CLOOP_CARG *findNext)(IXpbBuilder* self, IStatus* status) throw(); + unsigned char (CLOOP_CARG *getTag)(IXpbBuilder* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getLength)(IXpbBuilder* self, IStatus* status) throw(); + int (CLOOP_CARG *getInt)(IXpbBuilder* self, IStatus* status) throw(); + ISC_INT64 (CLOOP_CARG *getBigInt)(IXpbBuilder* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getString)(IXpbBuilder* self, IStatus* status) throw(); + const unsigned char* (CLOOP_CARG *getBytes)(IXpbBuilder* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getBufferLength)(IXpbBuilder* self, IStatus* status) throw(); + const unsigned char* (CLOOP_CARG *getBuffer)(IXpbBuilder* self, IStatus* status) throw(); + }; + + protected: + IXpbBuilder(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IXpbBuilder() + { + } + + public: + static const unsigned VERSION = 3; + + static const unsigned DPB = 1; + static const unsigned SPB_ATTACH = 2; + static const unsigned SPB_START = 3; + static const unsigned TPB = 4; + static const unsigned BATCH = 5; + static const unsigned BPB = 6; + static const unsigned SPB_SEND = 7; + static const unsigned SPB_RECEIVE = 8; + static const unsigned SPB_RESPONSE = 9; + static const unsigned INFO_SEND = 10; + static const unsigned INFO_RESPONSE = 11; + + template void clear(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->clear(this, status); + StatusType::checkException(status); + } + + template void removeCurrent(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->removeCurrent(this, status); + StatusType::checkException(status); + } + + template void insertInt(StatusType* status, unsigned char tag, int value) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertInt(this, status, tag, value); + StatusType::checkException(status); + } + + template void insertBigInt(StatusType* status, unsigned char tag, ISC_INT64 value) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertBigInt(this, status, tag, value); + StatusType::checkException(status); + } + + template void insertBytes(StatusType* status, unsigned char tag, const void* bytes, unsigned length) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertBytes(this, status, tag, bytes, length); + StatusType::checkException(status); + } + + template void insertString(StatusType* status, unsigned char tag, const char* str) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertString(this, status, tag, str); + StatusType::checkException(status); + } + + template void insertTag(StatusType* status, unsigned char tag) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertTag(this, status, tag); + StatusType::checkException(status); + } + + template FB_BOOLEAN isEof(StatusType* status) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->isEof(this, status); + StatusType::checkException(status); + return ret; + } + + template void moveNext(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->moveNext(this, status); + StatusType::checkException(status); + } + + template void rewind(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->rewind(this, status); + StatusType::checkException(status); + } + + template FB_BOOLEAN findFirst(StatusType* status, unsigned char tag) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->findFirst(this, status, tag); + StatusType::checkException(status); + return ret; + } + + template FB_BOOLEAN findNext(StatusType* status) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->findNext(this, status); + StatusType::checkException(status); + return ret; + } + + template unsigned char getTag(StatusType* status) + { + StatusType::clearException(status); + unsigned char ret = static_cast(this->cloopVTable)->getTag(this, status); + StatusType::checkException(status); + return ret; + } + + template unsigned getLength(StatusType* status) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getLength(this, status); + StatusType::checkException(status); + return ret; + } + + template int getInt(StatusType* status) + { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->getInt(this, status); + StatusType::checkException(status); + return ret; + } + + template ISC_INT64 getBigInt(StatusType* status) + { + StatusType::clearException(status); + ISC_INT64 ret = static_cast(this->cloopVTable)->getBigInt(this, status); + StatusType::checkException(status); + return ret; + } + + template const char* getString(StatusType* status) + { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getString(this, status); + StatusType::checkException(status); + return ret; + } + + template const unsigned char* getBytes(StatusType* status) + { + StatusType::clearException(status); + const unsigned char* ret = static_cast(this->cloopVTable)->getBytes(this, status); + StatusType::checkException(status); + return ret; + } + + template unsigned getBufferLength(StatusType* status) + { + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getBufferLength(this, status); + StatusType::checkException(status); + return ret; + } + + template const unsigned char* getBuffer(StatusType* status) + { + StatusType::clearException(status); + const unsigned char* ret = static_cast(this->cloopVTable)->getBuffer(this, status); + StatusType::checkException(status); + return ret; + } + }; + + class ITraceConnection : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + unsigned (CLOOP_CARG *getKind)(ITraceConnection* self) throw(); + int (CLOOP_CARG *getProcessID)(ITraceConnection* self) throw(); + const char* (CLOOP_CARG *getUserName)(ITraceConnection* self) throw(); + const char* (CLOOP_CARG *getRoleName)(ITraceConnection* self) throw(); + const char* (CLOOP_CARG *getCharSet)(ITraceConnection* self) throw(); + const char* (CLOOP_CARG *getRemoteProtocol)(ITraceConnection* self) throw(); + const char* (CLOOP_CARG *getRemoteAddress)(ITraceConnection* self) throw(); + int (CLOOP_CARG *getRemoteProcessID)(ITraceConnection* self) throw(); + const char* (CLOOP_CARG *getRemoteProcessName)(ITraceConnection* self) throw(); + }; + + protected: + ITraceConnection(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceConnection() + { + } + + public: + static const unsigned VERSION = 2; + + static const unsigned KIND_DATABASE = 1; + static const unsigned KIND_SERVICE = 2; + + unsigned getKind() + { + unsigned ret = static_cast(this->cloopVTable)->getKind(this); + return ret; + } + + int getProcessID() + { + int ret = static_cast(this->cloopVTable)->getProcessID(this); + return ret; + } + + const char* getUserName() + { + const char* ret = static_cast(this->cloopVTable)->getUserName(this); + return ret; + } + + const char* getRoleName() + { + const char* ret = static_cast(this->cloopVTable)->getRoleName(this); + return ret; + } + + const char* getCharSet() + { + const char* ret = static_cast(this->cloopVTable)->getCharSet(this); + return ret; + } + + const char* getRemoteProtocol() + { + const char* ret = static_cast(this->cloopVTable)->getRemoteProtocol(this); + return ret; + } + + const char* getRemoteAddress() + { + const char* ret = static_cast(this->cloopVTable)->getRemoteAddress(this); + return ret; + } + + int getRemoteProcessID() + { + int ret = static_cast(this->cloopVTable)->getRemoteProcessID(this); + return ret; + } + + const char* getRemoteProcessName() + { + const char* ret = static_cast(this->cloopVTable)->getRemoteProcessName(this); + return ret; + } + }; + + class ITraceDatabaseConnection : public ITraceConnection + { + public: + struct VTable : public ITraceConnection::VTable + { + ISC_INT64 (CLOOP_CARG *getConnectionID)(ITraceDatabaseConnection* self) throw(); + const char* (CLOOP_CARG *getDatabaseName)(ITraceDatabaseConnection* self) throw(); + }; + + protected: + ITraceDatabaseConnection(DoNotInherit) + : ITraceConnection(DoNotInherit()) + { + } + + ~ITraceDatabaseConnection() + { + } + + public: + static const unsigned VERSION = 3; + + ISC_INT64 getConnectionID() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getConnectionID(this); + return ret; + } + + const char* getDatabaseName() + { + const char* ret = static_cast(this->cloopVTable)->getDatabaseName(this); + return ret; + } + }; + + class ITraceTransaction : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + ISC_INT64 (CLOOP_CARG *getTransactionID)(ITraceTransaction* self) throw(); + FB_BOOLEAN (CLOOP_CARG *getReadOnly)(ITraceTransaction* self) throw(); + int (CLOOP_CARG *getWait)(ITraceTransaction* self) throw(); + unsigned (CLOOP_CARG *getIsolation)(ITraceTransaction* self) throw(); + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceTransaction* self) throw(); + ISC_INT64 (CLOOP_CARG *getInitialID)(ITraceTransaction* self) throw(); + ISC_INT64 (CLOOP_CARG *getPreviousID)(ITraceTransaction* self) throw(); + }; + + protected: + ITraceTransaction(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceTransaction() + { + } + + public: + static const unsigned VERSION = 3; + + static const unsigned ISOLATION_CONSISTENCY = 1; + static const unsigned ISOLATION_CONCURRENCY = 2; + static const unsigned ISOLATION_READ_COMMITTED_RECVER = 3; + static const unsigned ISOLATION_READ_COMMITTED_NORECVER = 4; + static const unsigned ISOLATION_READ_COMMITTED_READ_CONSISTENCY = 5; + + ISC_INT64 getTransactionID() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getTransactionID(this); + return ret; + } + + FB_BOOLEAN getReadOnly() + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->getReadOnly(this); + return ret; + } + + int getWait() + { + int ret = static_cast(this->cloopVTable)->getWait(this); + return ret; + } + + unsigned getIsolation() + { + unsigned ret = static_cast(this->cloopVTable)->getIsolation(this); + return ret; + } + + PerformanceInfo* getPerf() + { + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + return ret; + } + + ISC_INT64 getInitialID() + { + if (cloopVTable->version < 3) + { + return 0; + } + ISC_INT64 ret = static_cast(this->cloopVTable)->getInitialID(this); + return ret; + } + + ISC_INT64 getPreviousID() + { + if (cloopVTable->version < 3) + { + return 0; + } + ISC_INT64 ret = static_cast(this->cloopVTable)->getPreviousID(this); + return ret; + } + }; + + class ITraceParams : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + unsigned (CLOOP_CARG *getCount)(ITraceParams* self) throw(); + const dsc* (CLOOP_CARG *getParam)(ITraceParams* self, unsigned idx) throw(); + const char* (CLOOP_CARG *getTextUTF8)(ITraceParams* self, IStatus* status, unsigned idx) throw(); + }; + + protected: + ITraceParams(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceParams() + { + } + + public: + static const unsigned VERSION = 3; + + unsigned getCount() + { + unsigned ret = static_cast(this->cloopVTable)->getCount(this); + return ret; + } + + const dsc* getParam(unsigned idx) + { + const dsc* ret = static_cast(this->cloopVTable)->getParam(this, idx); + return ret; + } + + template const char* getTextUTF8(StatusType* status, unsigned idx) + { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "ITraceParams", cloopVTable->version, 3); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getTextUTF8(this, status, idx); + StatusType::checkException(status); + return ret; + } + }; + + class ITraceStatement : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + ISC_INT64 (CLOOP_CARG *getStmtID)(ITraceStatement* self) throw(); + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceStatement* self) throw(); + }; + + protected: + ITraceStatement(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceStatement() + { + } + + public: + static const unsigned VERSION = 2; + + ISC_INT64 getStmtID() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getStmtID(this); + return ret; + } + + PerformanceInfo* getPerf() + { + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + return ret; + } + }; + + class ITraceSQLStatement : public ITraceStatement + { + public: + struct VTable : public ITraceStatement::VTable + { + const char* (CLOOP_CARG *getText)(ITraceSQLStatement* self) throw(); + const char* (CLOOP_CARG *getPlan)(ITraceSQLStatement* self) throw(); + ITraceParams* (CLOOP_CARG *getInputs)(ITraceSQLStatement* self) throw(); + const char* (CLOOP_CARG *getTextUTF8)(ITraceSQLStatement* self) throw(); + const char* (CLOOP_CARG *getExplainedPlan)(ITraceSQLStatement* self) throw(); + }; + + protected: + ITraceSQLStatement(DoNotInherit) + : ITraceStatement(DoNotInherit()) + { + } + + ~ITraceSQLStatement() + { + } + + public: + static const unsigned VERSION = 3; + + const char* getText() + { + const char* ret = static_cast(this->cloopVTable)->getText(this); + return ret; + } + + const char* getPlan() + { + const char* ret = static_cast(this->cloopVTable)->getPlan(this); + return ret; + } + + ITraceParams* getInputs() + { + ITraceParams* ret = static_cast(this->cloopVTable)->getInputs(this); + return ret; + } + + const char* getTextUTF8() + { + const char* ret = static_cast(this->cloopVTable)->getTextUTF8(this); + return ret; + } + + const char* getExplainedPlan() + { + const char* ret = static_cast(this->cloopVTable)->getExplainedPlan(this); + return ret; + } + }; + + class ITraceBLRStatement : public ITraceStatement + { + public: + struct VTable : public ITraceStatement::VTable + { + const unsigned char* (CLOOP_CARG *getData)(ITraceBLRStatement* self) throw(); + unsigned (CLOOP_CARG *getDataLength)(ITraceBLRStatement* self) throw(); + const char* (CLOOP_CARG *getText)(ITraceBLRStatement* self) throw(); + }; + + protected: + ITraceBLRStatement(DoNotInherit) + : ITraceStatement(DoNotInherit()) + { + } + + ~ITraceBLRStatement() + { + } + + public: + static const unsigned VERSION = 3; + + const unsigned char* getData() + { + const unsigned char* ret = static_cast(this->cloopVTable)->getData(this); + return ret; + } + + unsigned getDataLength() + { + unsigned ret = static_cast(this->cloopVTable)->getDataLength(this); + return ret; + } + + const char* getText() + { + const char* ret = static_cast(this->cloopVTable)->getText(this); + return ret; + } + }; + + class ITraceDYNRequest : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const unsigned char* (CLOOP_CARG *getData)(ITraceDYNRequest* self) throw(); + unsigned (CLOOP_CARG *getDataLength)(ITraceDYNRequest* self) throw(); + const char* (CLOOP_CARG *getText)(ITraceDYNRequest* self) throw(); + }; + + protected: + ITraceDYNRequest(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceDYNRequest() + { + } + + public: + static const unsigned VERSION = 2; + + const unsigned char* getData() + { + const unsigned char* ret = static_cast(this->cloopVTable)->getData(this); + return ret; + } + + unsigned getDataLength() + { + unsigned ret = static_cast(this->cloopVTable)->getDataLength(this); + return ret; + } + + const char* getText() + { + const char* ret = static_cast(this->cloopVTable)->getText(this); + return ret; + } + }; + + class ITraceContextVariable : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getNameSpace)(ITraceContextVariable* self) throw(); + const char* (CLOOP_CARG *getVarName)(ITraceContextVariable* self) throw(); + const char* (CLOOP_CARG *getVarValue)(ITraceContextVariable* self) throw(); + }; + + protected: + ITraceContextVariable(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceContextVariable() + { + } + + public: + static const unsigned VERSION = 2; + + const char* getNameSpace() + { + const char* ret = static_cast(this->cloopVTable)->getNameSpace(this); + return ret; + } + + const char* getVarName() + { + const char* ret = static_cast(this->cloopVTable)->getVarName(this); + return ret; + } + + const char* getVarValue() + { + const char* ret = static_cast(this->cloopVTable)->getVarValue(this); + return ret; + } + }; + + class ITraceProcedure : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getProcName)(ITraceProcedure* self) throw(); + ITraceParams* (CLOOP_CARG *getInputs)(ITraceProcedure* self) throw(); + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceProcedure* self) throw(); + }; + + protected: + ITraceProcedure(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceProcedure() + { + } + + public: + static const unsigned VERSION = 2; + + const char* getProcName() + { + const char* ret = static_cast(this->cloopVTable)->getProcName(this); + return ret; + } + + ITraceParams* getInputs() + { + ITraceParams* ret = static_cast(this->cloopVTable)->getInputs(this); + return ret; + } + + PerformanceInfo* getPerf() + { + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + return ret; + } + }; + + class ITraceFunction : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getFuncName)(ITraceFunction* self) throw(); + ITraceParams* (CLOOP_CARG *getInputs)(ITraceFunction* self) throw(); + ITraceParams* (CLOOP_CARG *getResult)(ITraceFunction* self) throw(); + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceFunction* self) throw(); + }; + + protected: + ITraceFunction(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceFunction() + { + } + + public: + static const unsigned VERSION = 2; + + const char* getFuncName() + { + const char* ret = static_cast(this->cloopVTable)->getFuncName(this); + return ret; + } + + ITraceParams* getInputs() + { + ITraceParams* ret = static_cast(this->cloopVTable)->getInputs(this); + return ret; + } + + ITraceParams* getResult() + { + ITraceParams* ret = static_cast(this->cloopVTable)->getResult(this); + return ret; + } + + PerformanceInfo* getPerf() + { + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + return ret; + } + }; + + class ITraceTrigger : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getTriggerName)(ITraceTrigger* self) throw(); + const char* (CLOOP_CARG *getRelationName)(ITraceTrigger* self) throw(); + int (CLOOP_CARG *getAction)(ITraceTrigger* self) throw(); + int (CLOOP_CARG *getWhich)(ITraceTrigger* self) throw(); + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceTrigger* self) throw(); + }; + + protected: + ITraceTrigger(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceTrigger() + { + } + + public: + static const unsigned VERSION = 2; + + static const unsigned TYPE_ALL = 0; + static const unsigned TYPE_BEFORE = 1; + static const unsigned TYPE_AFTER = 2; + + const char* getTriggerName() + { + const char* ret = static_cast(this->cloopVTable)->getTriggerName(this); + return ret; + } + + const char* getRelationName() + { + const char* ret = static_cast(this->cloopVTable)->getRelationName(this); + return ret; + } + + int getAction() + { + int ret = static_cast(this->cloopVTable)->getAction(this); + return ret; + } + + int getWhich() + { + int ret = static_cast(this->cloopVTable)->getWhich(this); + return ret; + } + + PerformanceInfo* getPerf() + { + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + return ret; + } + }; + + class ITraceServiceConnection : public ITraceConnection + { + public: + struct VTable : public ITraceConnection::VTable + { + void* (CLOOP_CARG *getServiceID)(ITraceServiceConnection* self) throw(); + const char* (CLOOP_CARG *getServiceMgr)(ITraceServiceConnection* self) throw(); + const char* (CLOOP_CARG *getServiceName)(ITraceServiceConnection* self) throw(); + }; + + protected: + ITraceServiceConnection(DoNotInherit) + : ITraceConnection(DoNotInherit()) + { + } + + ~ITraceServiceConnection() + { + } + + public: + static const unsigned VERSION = 3; + + void* getServiceID() + { + void* ret = static_cast(this->cloopVTable)->getServiceID(this); + return ret; + } + + const char* getServiceMgr() + { + const char* ret = static_cast(this->cloopVTable)->getServiceMgr(this); + return ret; + } + + const char* getServiceName() + { + const char* ret = static_cast(this->cloopVTable)->getServiceName(this); + return ret; + } + }; + + class ITraceStatusVector : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + FB_BOOLEAN (CLOOP_CARG *hasError)(ITraceStatusVector* self) throw(); + FB_BOOLEAN (CLOOP_CARG *hasWarning)(ITraceStatusVector* self) throw(); + IStatus* (CLOOP_CARG *getStatus)(ITraceStatusVector* self) throw(); + const char* (CLOOP_CARG *getText)(ITraceStatusVector* self) throw(); + }; + + protected: + ITraceStatusVector(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceStatusVector() + { + } + + public: + static const unsigned VERSION = 2; + + FB_BOOLEAN hasError() + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->hasError(this); + return ret; + } + + FB_BOOLEAN hasWarning() + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->hasWarning(this); + return ret; + } + + IStatus* getStatus() + { + IStatus* ret = static_cast(this->cloopVTable)->getStatus(this); + return ret; + } + + const char* getText() + { + const char* ret = static_cast(this->cloopVTable)->getText(this); + return ret; + } + }; + + class ITraceSweepInfo : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + ISC_INT64 (CLOOP_CARG *getOIT)(ITraceSweepInfo* self) throw(); + ISC_INT64 (CLOOP_CARG *getOST)(ITraceSweepInfo* self) throw(); + ISC_INT64 (CLOOP_CARG *getOAT)(ITraceSweepInfo* self) throw(); + ISC_INT64 (CLOOP_CARG *getNext)(ITraceSweepInfo* self) throw(); + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceSweepInfo* self) throw(); + }; + + protected: + ITraceSweepInfo(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceSweepInfo() + { + } + + public: + static const unsigned VERSION = 2; + + ISC_INT64 getOIT() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getOIT(this); + return ret; + } + + ISC_INT64 getOST() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getOST(this); + return ret; + } + + ISC_INT64 getOAT() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getOAT(this); + return ret; + } + + ISC_INT64 getNext() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getNext(this); + return ret; + } + + PerformanceInfo* getPerf() + { + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + return ret; + } + }; + + class ITraceLogWriter : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + unsigned (CLOOP_CARG *write)(ITraceLogWriter* self, const void* buf, unsigned size) throw(); + unsigned (CLOOP_CARG *write_s)(ITraceLogWriter* self, IStatus* status, const void* buf, unsigned size) throw(); + }; + + protected: + ITraceLogWriter(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~ITraceLogWriter() + { + } + + public: + static const unsigned VERSION = 4; + + unsigned write(const void* buf, unsigned size) + { + unsigned ret = static_cast(this->cloopVTable)->write(this, buf, size); + return ret; + } + + template unsigned write_s(StatusType* status, const void* buf, unsigned size) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "ITraceLogWriter", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->write_s(this, status, buf, size); + StatusType::checkException(status); + return ret; + } + }; + + class ITraceInitInfo : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getConfigText)(ITraceInitInfo* self) throw(); + int (CLOOP_CARG *getTraceSessionID)(ITraceInitInfo* self) throw(); + const char* (CLOOP_CARG *getTraceSessionName)(ITraceInitInfo* self) throw(); + const char* (CLOOP_CARG *getFirebirdRootDirectory)(ITraceInitInfo* self) throw(); + const char* (CLOOP_CARG *getDatabaseName)(ITraceInitInfo* self) throw(); + ITraceDatabaseConnection* (CLOOP_CARG *getConnection)(ITraceInitInfo* self) throw(); + ITraceLogWriter* (CLOOP_CARG *getLogWriter)(ITraceInitInfo* self) throw(); + }; + + protected: + ITraceInitInfo(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceInitInfo() + { + } + + public: + static const unsigned VERSION = 2; + + const char* getConfigText() + { + const char* ret = static_cast(this->cloopVTable)->getConfigText(this); + return ret; + } + + int getTraceSessionID() + { + int ret = static_cast(this->cloopVTable)->getTraceSessionID(this); + return ret; + } + + const char* getTraceSessionName() + { + const char* ret = static_cast(this->cloopVTable)->getTraceSessionName(this); + return ret; + } + + const char* getFirebirdRootDirectory() + { + const char* ret = static_cast(this->cloopVTable)->getFirebirdRootDirectory(this); + return ret; + } + + const char* getDatabaseName() + { + const char* ret = static_cast(this->cloopVTable)->getDatabaseName(this); + return ret; + } + + ITraceDatabaseConnection* getConnection() + { + ITraceDatabaseConnection* ret = static_cast(this->cloopVTable)->getConnection(this); + return ret; + } + + ITraceLogWriter* getLogWriter() + { + ITraceLogWriter* ret = static_cast(this->cloopVTable)->getLogWriter(this); + return ret; + } + }; + + class ITracePlugin : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + const char* (CLOOP_CARG *trace_get_error)(ITracePlugin* self) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_attach)(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_detach)(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_transaction_start)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_transaction_end)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_proc_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_trigger_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_set_context)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_dsql_prepare)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_dsql_free)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_dsql_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_blr_compile)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_blr_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_dyn_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_service_attach)(ITracePlugin* self, ITraceServiceConnection* service, unsigned att_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_service_start)(ITracePlugin* self, ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_service_query)(ITracePlugin* self, ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_service_detach)(ITracePlugin* self, ITraceServiceConnection* service, unsigned detach_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_event_error)(ITracePlugin* self, ITraceConnection* connection, ITraceStatusVector* status, const char* function) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_event_sweep)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_func_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) throw(); + FB_BOOLEAN (CLOOP_CARG *trace_dsql_restart)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, unsigned number) throw(); + }; + + protected: + ITracePlugin(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~ITracePlugin() + { + } + + public: + static const unsigned VERSION = 4; + + static const unsigned RESULT_SUCCESS = 0; + static const unsigned RESULT_FAILED = 1; + static const unsigned RESULT_UNAUTHORIZED = 2; + static const unsigned SWEEP_STATE_STARTED = 1; + static const unsigned SWEEP_STATE_FINISHED = 2; + static const unsigned SWEEP_STATE_FAILED = 3; + static const unsigned SWEEP_STATE_PROGRESS = 4; + + const char* trace_get_error() + { + const char* ret = static_cast(this->cloopVTable)->trace_get_error(this); + return ret; + } + + FB_BOOLEAN trace_attach(ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_attach(this, connection, create_db, att_result); + return ret; + } + + FB_BOOLEAN trace_detach(ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_detach(this, connection, drop_db); + return ret; + } + + FB_BOOLEAN trace_transaction_start(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_transaction_start(this, connection, transaction, tpb_length, tpb, tra_result); + return ret; + } + + FB_BOOLEAN trace_transaction_end(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_transaction_end(this, connection, transaction, commit, retain_context, tra_result); + return ret; + } + + FB_BOOLEAN trace_proc_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_proc_execute(this, connection, transaction, procedure, started, proc_result); + return ret; + } + + FB_BOOLEAN trace_trigger_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_trigger_execute(this, connection, transaction, trigger, started, trig_result); + return ret; + } + + FB_BOOLEAN trace_set_context(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_set_context(this, connection, transaction, variable); + return ret; + } + + FB_BOOLEAN trace_dsql_prepare(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_prepare(this, connection, transaction, statement, time_millis, req_result); + return ret; + } + + FB_BOOLEAN trace_dsql_free(ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_free(this, connection, statement, option); + return ret; + } + + FB_BOOLEAN trace_dsql_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_execute(this, connection, transaction, statement, started, req_result); + return ret; + } + + FB_BOOLEAN trace_blr_compile(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_blr_compile(this, connection, transaction, statement, time_millis, req_result); + return ret; + } + + FB_BOOLEAN trace_blr_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_blr_execute(this, connection, transaction, statement, req_result); + return ret; + } + + FB_BOOLEAN trace_dyn_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dyn_execute(this, connection, transaction, request, time_millis, req_result); + return ret; + } + + FB_BOOLEAN trace_service_attach(ITraceServiceConnection* service, unsigned att_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_attach(this, service, att_result); + return ret; + } + + FB_BOOLEAN trace_service_start(ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_start(this, service, switches_length, switches, start_result); + return ret; + } + + FB_BOOLEAN trace_service_query(ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_query(this, service, send_item_length, send_items, recv_item_length, recv_items, query_result); + return ret; + } + + FB_BOOLEAN trace_service_detach(ITraceServiceConnection* service, unsigned detach_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_detach(this, service, detach_result); + return ret; + } + + FB_BOOLEAN trace_event_error(ITraceConnection* connection, ITraceStatusVector* status, const char* function) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_event_error(this, connection, status, function); + return ret; + } + + FB_BOOLEAN trace_event_sweep(ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_event_sweep(this, connection, sweep, sweep_state); + return ret; + } + + FB_BOOLEAN trace_func_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_func_execute(this, connection, transaction, function, started, func_result); + return ret; + } + + FB_BOOLEAN trace_dsql_restart(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, unsigned number) + { + if (cloopVTable->version < 4) + { + return 0; + } + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_restart(this, connection, transaction, statement, number); + return ret; + } + }; + + class ITraceFactory : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + ISC_UINT64 (CLOOP_CARG *trace_needs)(ITraceFactory* self) throw(); + ITracePlugin* (CLOOP_CARG *trace_create)(ITraceFactory* self, IStatus* status, ITraceInitInfo* init_info) throw(); + }; + + protected: + ITraceFactory(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~ITraceFactory() + { + } + + public: + static const unsigned VERSION = 4; + + static const unsigned TRACE_EVENT_ATTACH = 0; + static const unsigned TRACE_EVENT_DETACH = 1; + static const unsigned TRACE_EVENT_TRANSACTION_START = 2; + static const unsigned TRACE_EVENT_TRANSACTION_END = 3; + static const unsigned TRACE_EVENT_SET_CONTEXT = 4; + static const unsigned TRACE_EVENT_PROC_EXECUTE = 5; + static const unsigned TRACE_EVENT_TRIGGER_EXECUTE = 6; + static const unsigned TRACE_EVENT_DSQL_PREPARE = 7; + static const unsigned TRACE_EVENT_DSQL_FREE = 8; + static const unsigned TRACE_EVENT_DSQL_EXECUTE = 9; + static const unsigned TRACE_EVENT_BLR_COMPILE = 10; + static const unsigned TRACE_EVENT_BLR_EXECUTE = 11; + static const unsigned TRACE_EVENT_DYN_EXECUTE = 12; + static const unsigned TRACE_EVENT_SERVICE_ATTACH = 13; + static const unsigned TRACE_EVENT_SERVICE_START = 14; + static const unsigned TRACE_EVENT_SERVICE_QUERY = 15; + static const unsigned TRACE_EVENT_SERVICE_DETACH = 16; + static const unsigned TRACE_EVENT_ERROR = 17; + static const unsigned TRACE_EVENT_SWEEP = 18; + static const unsigned TRACE_EVENT_FUNC_EXECUTE = 19; + static const unsigned TRACE_EVENT_MAX = 20; + + ISC_UINT64 trace_needs() + { + ISC_UINT64 ret = static_cast(this->cloopVTable)->trace_needs(this); + return ret; + } + + template ITracePlugin* trace_create(StatusType* status, ITraceInitInfo* init_info) + { + StatusType::clearException(status); + ITracePlugin* ret = static_cast(this->cloopVTable)->trace_create(this, status, init_info); + StatusType::checkException(status); + return ret; + } + }; + + class IUdrFunctionFactory : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *setup)(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw(); + IExternalFunction* (CLOOP_CARG *newItem)(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw(); + }; + + protected: + IUdrFunctionFactory(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IUdrFunctionFactory() + { + } + + public: + static const unsigned VERSION = 3; + + template void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setup(this, status, context, metadata, inBuilder, outBuilder); + StatusType::checkException(status); + } + + template IExternalFunction* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) + { + StatusType::clearException(status); + IExternalFunction* ret = static_cast(this->cloopVTable)->newItem(this, status, context, metadata); + StatusType::checkException(status); + return ret; + } + }; + + class IUdrProcedureFactory : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *setup)(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw(); + IExternalProcedure* (CLOOP_CARG *newItem)(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw(); + }; + + protected: + IUdrProcedureFactory(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IUdrProcedureFactory() + { + } + + public: + static const unsigned VERSION = 3; + + template void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setup(this, status, context, metadata, inBuilder, outBuilder); + StatusType::checkException(status); + } + + template IExternalProcedure* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) + { + StatusType::clearException(status); + IExternalProcedure* ret = static_cast(this->cloopVTable)->newItem(this, status, context, metadata); + StatusType::checkException(status); + return ret; + } + }; + + class IUdrTriggerFactory : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *setup)(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) throw(); + IExternalTrigger* (CLOOP_CARG *newItem)(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw(); + }; + + protected: + IUdrTriggerFactory(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IUdrTriggerFactory() + { + } + + public: + static const unsigned VERSION = 3; + + template void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setup(this, status, context, metadata, fieldsBuilder); + StatusType::checkException(status); + } + + template IExternalTrigger* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) + { + StatusType::clearException(status); + IExternalTrigger* ret = static_cast(this->cloopVTable)->newItem(this, status, context, metadata); + StatusType::checkException(status); + return ret; + } + }; + + class IUdrPlugin : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + IMaster* (CLOOP_CARG *getMaster)(IUdrPlugin* self) throw(); + void (CLOOP_CARG *registerFunction)(IUdrPlugin* self, IStatus* status, const char* name, IUdrFunctionFactory* factory) throw(); + void (CLOOP_CARG *registerProcedure)(IUdrPlugin* self, IStatus* status, const char* name, IUdrProcedureFactory* factory) throw(); + void (CLOOP_CARG *registerTrigger)(IUdrPlugin* self, IStatus* status, const char* name, IUdrTriggerFactory* factory) throw(); + }; + + protected: + IUdrPlugin(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IUdrPlugin() + { + } + + public: + static const unsigned VERSION = 2; + + IMaster* getMaster() + { + IMaster* ret = static_cast(this->cloopVTable)->getMaster(this); + return ret; + } + + template void registerFunction(StatusType* status, const char* name, IUdrFunctionFactory* factory) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->registerFunction(this, status, name, factory); + StatusType::checkException(status); + } + + template void registerProcedure(StatusType* status, const char* name, IUdrProcedureFactory* factory) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->registerProcedure(this, status, name, factory); + StatusType::checkException(status); + } + + template void registerTrigger(StatusType* status, const char* name, IUdrTriggerFactory* factory) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->registerTrigger(this, status, name, factory); + StatusType::checkException(status); + } + }; + + class IDecFloat16 : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *toBcd)(IDecFloat16* self, const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) throw(); + void (CLOOP_CARG *toString)(IDecFloat16* self, IStatus* status, const FB_DEC16* from, unsigned bufferLength, char* buffer) throw(); + void (CLOOP_CARG *fromBcd)(IDecFloat16* self, int sign, const unsigned char* bcd, int exp, FB_DEC16* to) throw(); + void (CLOOP_CARG *fromString)(IDecFloat16* self, IStatus* status, const char* from, FB_DEC16* to) throw(); + }; + + protected: + IDecFloat16(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IDecFloat16() + { + } + + public: + static const unsigned VERSION = 2; + + static const unsigned BCD_SIZE = 16; + static const unsigned STRING_SIZE = 24; + + void toBcd(const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) + { + static_cast(this->cloopVTable)->toBcd(this, from, sign, bcd, exp); + } + + template void toString(StatusType* status, const FB_DEC16* from, unsigned bufferLength, char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->toString(this, status, from, bufferLength, buffer); + StatusType::checkException(status); + } + + void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC16* to) + { + static_cast(this->cloopVTable)->fromBcd(this, sign, bcd, exp, to); + } + + template void fromString(StatusType* status, const char* from, FB_DEC16* to) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->fromString(this, status, from, to); + StatusType::checkException(status); + } + }; + + class IDecFloat34 : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *toBcd)(IDecFloat34* self, const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) throw(); + void (CLOOP_CARG *toString)(IDecFloat34* self, IStatus* status, const FB_DEC34* from, unsigned bufferLength, char* buffer) throw(); + void (CLOOP_CARG *fromBcd)(IDecFloat34* self, int sign, const unsigned char* bcd, int exp, FB_DEC34* to) throw(); + void (CLOOP_CARG *fromString)(IDecFloat34* self, IStatus* status, const char* from, FB_DEC34* to) throw(); + }; + + protected: + IDecFloat34(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IDecFloat34() + { + } + + public: + static const unsigned VERSION = 2; + + static const unsigned BCD_SIZE = 34; + static const unsigned STRING_SIZE = 43; + + void toBcd(const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) + { + static_cast(this->cloopVTable)->toBcd(this, from, sign, bcd, exp); + } + + template void toString(StatusType* status, const FB_DEC34* from, unsigned bufferLength, char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->toString(this, status, from, bufferLength, buffer); + StatusType::checkException(status); + } + + void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC34* to) + { + static_cast(this->cloopVTable)->fromBcd(this, sign, bcd, exp, to); + } + + template void fromString(StatusType* status, const char* from, FB_DEC34* to) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->fromString(this, status, from, to); + StatusType::checkException(status); + } + }; + + class IInt128 : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *toString)(IInt128* self, IStatus* status, const FB_I128* from, int scale, unsigned bufferLength, char* buffer) throw(); + void (CLOOP_CARG *fromString)(IInt128* self, IStatus* status, int scale, const char* from, FB_I128* to) throw(); + }; + + protected: + IInt128(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IInt128() + { + } + + public: + static const unsigned VERSION = 2; + + static const unsigned STRING_SIZE = 46; + + template void toString(StatusType* status, const FB_I128* from, int scale, unsigned bufferLength, char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->toString(this, status, from, scale, bufferLength, buffer); + StatusType::checkException(status); + } + + template void fromString(StatusType* status, int scale, const char* from, FB_I128* to) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->fromString(this, status, scale, from, to); + StatusType::checkException(status); + } + }; + + class IReplicatedField : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getName)(IReplicatedField* self) throw(); + unsigned (CLOOP_CARG *getType)(IReplicatedField* self) throw(); + int (CLOOP_CARG *getSubType)(IReplicatedField* self) throw(); + int (CLOOP_CARG *getScale)(IReplicatedField* self) throw(); + unsigned (CLOOP_CARG *getLength)(IReplicatedField* self) throw(); + unsigned (CLOOP_CARG *getCharSet)(IReplicatedField* self) throw(); + const void* (CLOOP_CARG *getData)(IReplicatedField* self) throw(); + }; + + protected: + IReplicatedField(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IReplicatedField() + { + } + + public: + static const unsigned VERSION = 2; + + const char* getName() + { + const char* ret = static_cast(this->cloopVTable)->getName(this); + return ret; + } + + unsigned getType() + { + unsigned ret = static_cast(this->cloopVTable)->getType(this); + return ret; + } + + int getSubType() + { + int ret = static_cast(this->cloopVTable)->getSubType(this); + return ret; + } + + int getScale() + { + int ret = static_cast(this->cloopVTable)->getScale(this); + return ret; + } + + unsigned getLength() + { + unsigned ret = static_cast(this->cloopVTable)->getLength(this); + return ret; + } + + unsigned getCharSet() + { + unsigned ret = static_cast(this->cloopVTable)->getCharSet(this); + return ret; + } + + const void* getData() + { + const void* ret = static_cast(this->cloopVTable)->getData(this); + return ret; + } + }; + + class IReplicatedRecord : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + unsigned (CLOOP_CARG *getCount)(IReplicatedRecord* self) throw(); + IReplicatedField* (CLOOP_CARG *getField)(IReplicatedRecord* self, unsigned index) throw(); + unsigned (CLOOP_CARG *getRawLength)(IReplicatedRecord* self) throw(); + const unsigned char* (CLOOP_CARG *getRawData)(IReplicatedRecord* self) throw(); + }; + + protected: + IReplicatedRecord(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IReplicatedRecord() + { + } + + public: + static const unsigned VERSION = 2; + + unsigned getCount() + { + unsigned ret = static_cast(this->cloopVTable)->getCount(this); + return ret; + } + + IReplicatedField* getField(unsigned index) + { + IReplicatedField* ret = static_cast(this->cloopVTable)->getField(this, index); + return ret; + } + + unsigned getRawLength() + { + unsigned ret = static_cast(this->cloopVTable)->getRawLength(this); + return ret; + } + + const unsigned char* getRawData() + { + const unsigned char* ret = static_cast(this->cloopVTable)->getRawData(this); + return ret; + } + }; + + class IReplicatedTransaction : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *prepare)(IReplicatedTransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *commit)(IReplicatedTransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *rollback)(IReplicatedTransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *startSavepoint)(IReplicatedTransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *releaseSavepoint)(IReplicatedTransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *rollbackSavepoint)(IReplicatedTransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *insertRecord)(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* record) throw(); + void (CLOOP_CARG *updateRecord)(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* orgRecord, IReplicatedRecord* newRecord) throw(); + void (CLOOP_CARG *deleteRecord)(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* record) throw(); + void (CLOOP_CARG *executeSql)(IReplicatedTransaction* self, IStatus* status, const char* sql) throw(); + void (CLOOP_CARG *executeSqlIntl)(IReplicatedTransaction* self, IStatus* status, unsigned charset, const char* sql) throw(); + }; + + protected: + IReplicatedTransaction(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IReplicatedTransaction() + { + } + + public: + static const unsigned VERSION = 3; + + template void prepare(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->prepare(this, status); + StatusType::checkException(status); + } + + template void commit(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->commit(this, status); + StatusType::checkException(status); + } + + template void rollback(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->rollback(this, status); + StatusType::checkException(status); + } + + template void startSavepoint(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->startSavepoint(this, status); + StatusType::checkException(status); + } + + template void releaseSavepoint(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->releaseSavepoint(this, status); + StatusType::checkException(status); + } + + template void rollbackSavepoint(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->rollbackSavepoint(this, status); + StatusType::checkException(status); + } + + template void insertRecord(StatusType* status, const char* name, IReplicatedRecord* record) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertRecord(this, status, name, record); + StatusType::checkException(status); + } + + template void updateRecord(StatusType* status, const char* name, IReplicatedRecord* orgRecord, IReplicatedRecord* newRecord) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->updateRecord(this, status, name, orgRecord, newRecord); + StatusType::checkException(status); + } + + template void deleteRecord(StatusType* status, const char* name, IReplicatedRecord* record) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deleteRecord(this, status, name, record); + StatusType::checkException(status); + } + + template void executeSql(StatusType* status, const char* sql) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->executeSql(this, status, sql); + StatusType::checkException(status); + } + + template void executeSqlIntl(StatusType* status, unsigned charset, const char* sql) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->executeSqlIntl(this, status, charset, sql); + StatusType::checkException(status); + } + }; + + class IReplicatedSession : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + FB_BOOLEAN (CLOOP_CARG *init)(IReplicatedSession* self, IStatus* status, IAttachment* attachment) throw(); + IReplicatedTransaction* (CLOOP_CARG *startTransaction)(IReplicatedSession* self, IStatus* status, ITransaction* transaction, ISC_INT64 number) throw(); + void (CLOOP_CARG *cleanupTransaction)(IReplicatedSession* self, IStatus* status, ISC_INT64 number) throw(); + void (CLOOP_CARG *setSequence)(IReplicatedSession* self, IStatus* status, const char* name, ISC_INT64 value) throw(); + }; + + protected: + IReplicatedSession(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IReplicatedSession() + { + } + + public: + static const unsigned VERSION = 4; + + template FB_BOOLEAN init(StatusType* status, IAttachment* attachment) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->init(this, status, attachment); + StatusType::checkException(status); + return ret; + } + + template IReplicatedTransaction* startTransaction(StatusType* status, ITransaction* transaction, ISC_INT64 number) + { + StatusType::clearException(status); + IReplicatedTransaction* ret = static_cast(this->cloopVTable)->startTransaction(this, status, transaction, number); + StatusType::checkException(status); + return ret; + } + + template void cleanupTransaction(StatusType* status, ISC_INT64 number) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->cleanupTransaction(this, status, number); + StatusType::checkException(status); + } + + template void setSequence(StatusType* status, const char* name, ISC_INT64 value) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setSequence(this, status, name, value); + StatusType::checkException(status); + } + }; + + // Interfaces implementations + + template + class IVersionedBaseImpl : public Base + { + public: + typedef IVersioned Declaration; + + IVersionedBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + } + } vTable; + + this->cloopVTable = &vTable; + } + }; + + template > + class IVersionedImpl : public IVersionedBaseImpl + { + protected: + IVersionedImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IVersionedImpl() + { + } + + }; + + template + class IReferenceCountedBaseImpl : public Base + { + public: + typedef IReferenceCounted Declaration; + + IReferenceCountedBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class IReferenceCountedImpl : public IReferenceCountedBaseImpl + { + protected: + IReferenceCountedImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IReferenceCountedImpl() + { + } + + virtual void addRef() = 0; + virtual int release() = 0; + }; + + template + class IDisposableBaseImpl : public Base + { + public: + typedef IDisposable Declaration; + + IDisposableBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > + class IDisposableImpl : public IDisposableBaseImpl + { + protected: + IDisposableImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IDisposableImpl() + { + } + + virtual void dispose() = 0; + }; + + template + class IStatusBaseImpl : public Base + { + public: + typedef IStatus Declaration; + + IStatusBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->init = &Name::cloopinitDispatcher; + this->getState = &Name::cloopgetStateDispatcher; + this->setErrors2 = &Name::cloopsetErrors2Dispatcher; + this->setWarnings2 = &Name::cloopsetWarnings2Dispatcher; + this->setErrors = &Name::cloopsetErrorsDispatcher; + this->setWarnings = &Name::cloopsetWarningsDispatcher; + this->getErrors = &Name::cloopgetErrorsDispatcher; + this->getWarnings = &Name::cloopgetWarningsDispatcher; + this->clone = &Name::cloopcloneDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopinitDispatcher(IStatus* self) throw() + { + try + { + static_cast(self)->Name::init(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static unsigned CLOOP_CARG cloopgetStateDispatcher(const IStatus* self) throw() + { + try + { + return static_cast(self)->Name::getState(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetErrors2Dispatcher(IStatus* self, unsigned length, const intptr_t* value) throw() + { + try + { + static_cast(self)->Name::setErrors2(length, value); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopsetWarnings2Dispatcher(IStatus* self, unsigned length, const intptr_t* value) throw() + { + try + { + static_cast(self)->Name::setWarnings2(length, value); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopsetErrorsDispatcher(IStatus* self, const intptr_t* value) throw() + { + try + { + static_cast(self)->Name::setErrors(value); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopsetWarningsDispatcher(IStatus* self, const intptr_t* value) throw() + { + try + { + static_cast(self)->Name::setWarnings(value); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static const intptr_t* CLOOP_CARG cloopgetErrorsDispatcher(const IStatus* self) throw() + { + try + { + return static_cast(self)->Name::getErrors(); + } + catch (...) + { + StatusType::catchException(0); + return stubError(); + } + } + + static const intptr_t* CLOOP_CARG cloopgetWarningsDispatcher(const IStatus* self) throw() + { + try + { + return static_cast(self)->Name::getWarnings(); + } + catch (...) + { + StatusType::catchException(0); + return stubError(); + } + } + + static IStatus* CLOOP_CARG cloopcloneDispatcher(const IStatus* self) throw() + { + try + { + return static_cast(self)->Name::clone(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IStatusImpl : public IStatusBaseImpl + { + protected: + IStatusImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IStatusImpl() + { + } + + virtual void init() = 0; + virtual unsigned getState() const = 0; + virtual void setErrors2(unsigned length, const intptr_t* value) = 0; + virtual void setWarnings2(unsigned length, const intptr_t* value) = 0; + virtual void setErrors(const intptr_t* value) = 0; + virtual void setWarnings(const intptr_t* value) = 0; + virtual const intptr_t* getErrors() const = 0; + virtual const intptr_t* getWarnings() const = 0; + virtual IStatus* clone() const = 0; + }; + + template + class IMasterBaseImpl : public Base + { + public: + typedef IMaster Declaration; + + IMasterBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getStatus = &Name::cloopgetStatusDispatcher; + this->getDispatcher = &Name::cloopgetDispatcherDispatcher; + this->getPluginManager = &Name::cloopgetPluginManagerDispatcher; + this->getTimerControl = &Name::cloopgetTimerControlDispatcher; + this->getDtc = &Name::cloopgetDtcDispatcher; + this->registerAttachment = &Name::cloopregisterAttachmentDispatcher; + this->registerTransaction = &Name::cloopregisterTransactionDispatcher; + this->getMetadataBuilder = &Name::cloopgetMetadataBuilderDispatcher; + this->serverMode = &Name::cloopserverModeDispatcher; + this->getUtilInterface = &Name::cloopgetUtilInterfaceDispatcher; + this->getConfigManager = &Name::cloopgetConfigManagerDispatcher; + this->getProcessExiting = &Name::cloopgetProcessExitingDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static IStatus* CLOOP_CARG cloopgetStatusDispatcher(IMaster* self) throw() + { + try + { + return static_cast(self)->Name::getStatus(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IProvider* CLOOP_CARG cloopgetDispatcherDispatcher(IMaster* self) throw() + { + try + { + return static_cast(self)->Name::getDispatcher(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IPluginManager* CLOOP_CARG cloopgetPluginManagerDispatcher(IMaster* self) throw() + { + try + { + return static_cast(self)->Name::getPluginManager(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITimerControl* CLOOP_CARG cloopgetTimerControlDispatcher(IMaster* self) throw() + { + try + { + return static_cast(self)->Name::getTimerControl(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IDtc* CLOOP_CARG cloopgetDtcDispatcher(IMaster* self) throw() + { + try + { + return static_cast(self)->Name::getDtc(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IAttachment* CLOOP_CARG cloopregisterAttachmentDispatcher(IMaster* self, IProvider* provider, IAttachment* attachment) throw() + { + try + { + return static_cast(self)->Name::registerAttachment(provider, attachment); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopregisterTransactionDispatcher(IMaster* self, IAttachment* attachment, ITransaction* transaction) throw() + { + try + { + return static_cast(self)->Name::registerTransaction(attachment, transaction); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IMetadataBuilder* CLOOP_CARG cloopgetMetadataBuilderDispatcher(IMaster* self, IStatus* status, unsigned fieldCount) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getMetadataBuilder(&status2, fieldCount); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopserverModeDispatcher(IMaster* self, int mode) throw() + { + try + { + return static_cast(self)->Name::serverMode(mode); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IUtil* CLOOP_CARG cloopgetUtilInterfaceDispatcher(IMaster* self) throw() + { + try + { + return static_cast(self)->Name::getUtilInterface(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IConfigManager* CLOOP_CARG cloopgetConfigManagerDispatcher(IMaster* self) throw() + { + try + { + return static_cast(self)->Name::getConfigManager(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopgetProcessExitingDispatcher(IMaster* self) throw() + { + try + { + return static_cast(self)->Name::getProcessExiting(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class IMasterImpl : public IMasterBaseImpl + { + protected: + IMasterImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IMasterImpl() + { + } + + virtual IStatus* getStatus() = 0; + virtual IProvider* getDispatcher() = 0; + virtual IPluginManager* getPluginManager() = 0; + virtual ITimerControl* getTimerControl() = 0; + virtual IDtc* getDtc() = 0; + virtual IAttachment* registerAttachment(IProvider* provider, IAttachment* attachment) = 0; + virtual ITransaction* registerTransaction(IAttachment* attachment, ITransaction* transaction) = 0; + virtual IMetadataBuilder* getMetadataBuilder(StatusType* status, unsigned fieldCount) = 0; + virtual int serverMode(int mode) = 0; + virtual IUtil* getUtilInterface() = 0; + virtual IConfigManager* getConfigManager() = 0; + virtual FB_BOOLEAN getProcessExiting() = 0; + }; + + template + class IPluginBaseBaseImpl : public Base + { + public: + typedef IPluginBase Declaration; + + IPluginBaseBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IPluginBaseImpl : public IPluginBaseBaseImpl + { + protected: + IPluginBaseImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginBaseImpl() + { + } + + virtual void setOwner(IReferenceCounted* r) = 0; + virtual IReferenceCounted* getOwner() = 0; + }; + + template + class IPluginSetBaseImpl : public Base + { + public: + typedef IPluginSet Declaration; + + IPluginSetBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getName = &Name::cloopgetNameDispatcher; + this->getModuleName = &Name::cloopgetModuleNameDispatcher; + this->getPlugin = &Name::cloopgetPluginDispatcher; + this->next = &Name::cloopnextDispatcher; + this->set = &Name::cloopsetDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetNameDispatcher(const IPluginSet* self) throw() + { + try + { + return static_cast(self)->Name::getName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetModuleNameDispatcher(const IPluginSet* self) throw() + { + try + { + return static_cast(self)->Name::getModuleName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IPluginBase* CLOOP_CARG cloopgetPluginDispatcher(IPluginSet* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getPlugin(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopnextDispatcher(IPluginSet* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::next(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetDispatcher(IPluginSet* self, IStatus* status, const char* s) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::set(&status2, s); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IPluginSetImpl : public IPluginSetBaseImpl + { + protected: + IPluginSetImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginSetImpl() + { + } + + virtual const char* getName() const = 0; + virtual const char* getModuleName() const = 0; + virtual IPluginBase* getPlugin(StatusType* status) = 0; + virtual void next(StatusType* status) = 0; + virtual void set(StatusType* status, const char* s) = 0; + }; + + template + class IConfigEntryBaseImpl : public Base + { + public: + typedef IConfigEntry Declaration; + + IConfigEntryBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getName = &Name::cloopgetNameDispatcher; + this->getValue = &Name::cloopgetValueDispatcher; + this->getIntValue = &Name::cloopgetIntValueDispatcher; + this->getBoolValue = &Name::cloopgetBoolValueDispatcher; + this->getSubConfig = &Name::cloopgetSubConfigDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetNameDispatcher(IConfigEntry* self) throw() + { + try + { + return static_cast(self)->Name::getName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetValueDispatcher(IConfigEntry* self) throw() + { + try + { + return static_cast(self)->Name::getValue(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopgetIntValueDispatcher(IConfigEntry* self) throw() + { + try + { + return static_cast(self)->Name::getIntValue(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopgetBoolValueDispatcher(IConfigEntry* self) throw() + { + try + { + return static_cast(self)->Name::getBoolValue(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IConfig* CLOOP_CARG cloopgetSubConfigDispatcher(IConfigEntry* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getSubConfig(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IConfigEntryImpl : public IConfigEntryBaseImpl + { + protected: + IConfigEntryImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IConfigEntryImpl() + { + } + + virtual const char* getName() = 0; + virtual const char* getValue() = 0; + virtual ISC_INT64 getIntValue() = 0; + virtual FB_BOOLEAN getBoolValue() = 0; + virtual IConfig* getSubConfig(StatusType* status) = 0; + }; + + template + class IConfigBaseImpl : public Base + { + public: + typedef IConfig Declaration; + + IConfigBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->find = &Name::cloopfindDispatcher; + this->findValue = &Name::cloopfindValueDispatcher; + this->findPos = &Name::cloopfindPosDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static IConfigEntry* CLOOP_CARG cloopfindDispatcher(IConfig* self, IStatus* status, const char* name) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::find(&status2, name); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IConfigEntry* CLOOP_CARG cloopfindValueDispatcher(IConfig* self, IStatus* status, const char* name, const char* value) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::findValue(&status2, name, value); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IConfigEntry* CLOOP_CARG cloopfindPosDispatcher(IConfig* self, IStatus* status, const char* name, unsigned pos) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::findPos(&status2, name, pos); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IConfigImpl : public IConfigBaseImpl + { + protected: + IConfigImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IConfigImpl() + { + } + + virtual IConfigEntry* find(StatusType* status, const char* name) = 0; + virtual IConfigEntry* findValue(StatusType* status, const char* name, const char* value) = 0; + virtual IConfigEntry* findPos(StatusType* status, const char* name, unsigned pos) = 0; + }; + + template + class IFirebirdConfBaseImpl : public Base + { + public: + typedef IFirebirdConf Declaration; + + IFirebirdConfBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getKey = &Name::cloopgetKeyDispatcher; + this->asInteger = &Name::cloopasIntegerDispatcher; + this->asString = &Name::cloopasStringDispatcher; + this->asBoolean = &Name::cloopasBooleanDispatcher; + this->getVersion = &Name::cloopgetVersionDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopgetKeyDispatcher(IFirebirdConf* self, const char* name) throw() + { + try + { + return static_cast(self)->Name::getKey(name); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopasIntegerDispatcher(IFirebirdConf* self, unsigned key) throw() + { + try + { + return static_cast(self)->Name::asInteger(key); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopasStringDispatcher(IFirebirdConf* self, unsigned key) throw() + { + try + { + return static_cast(self)->Name::asString(key); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopasBooleanDispatcher(IFirebirdConf* self, unsigned key) throw() + { + try + { + return static_cast(self)->Name::asBoolean(key); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetVersionDispatcher(IFirebirdConf* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getVersion(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IFirebirdConfImpl : public IFirebirdConfBaseImpl + { + protected: + IFirebirdConfImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IFirebirdConfImpl() + { + } + + virtual unsigned getKey(const char* name) = 0; + virtual ISC_INT64 asInteger(unsigned key) = 0; + virtual const char* asString(unsigned key) = 0; + virtual FB_BOOLEAN asBoolean(unsigned key) = 0; + virtual unsigned getVersion(StatusType* status) = 0; + }; + + template + class IPluginConfigBaseImpl : public Base + { + public: + typedef IPluginConfig Declaration; + + IPluginConfigBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getConfigFileName = &Name::cloopgetConfigFileNameDispatcher; + this->getDefaultConfig = &Name::cloopgetDefaultConfigDispatcher; + this->getFirebirdConf = &Name::cloopgetFirebirdConfDispatcher; + this->setReleaseDelay = &Name::cloopsetReleaseDelayDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetConfigFileNameDispatcher(IPluginConfig* self) throw() + { + try + { + return static_cast(self)->Name::getConfigFileName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IConfig* CLOOP_CARG cloopgetDefaultConfigDispatcher(IPluginConfig* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getDefaultConfig(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IFirebirdConf* CLOOP_CARG cloopgetFirebirdConfDispatcher(IPluginConfig* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getFirebirdConf(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetReleaseDelayDispatcher(IPluginConfig* self, IStatus* status, ISC_UINT64 microSeconds) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setReleaseDelay(&status2, microSeconds); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IPluginConfigImpl : public IPluginConfigBaseImpl + { + protected: + IPluginConfigImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginConfigImpl() + { + } + + virtual const char* getConfigFileName() = 0; + virtual IConfig* getDefaultConfig(StatusType* status) = 0; + virtual IFirebirdConf* getFirebirdConf(StatusType* status) = 0; + virtual void setReleaseDelay(StatusType* status, ISC_UINT64 microSeconds) = 0; + }; + + template + class IPluginFactoryBaseImpl : public Base + { + public: + typedef IPluginFactory Declaration; + + IPluginFactoryBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->createPlugin = &Name::cloopcreatePluginDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static IPluginBase* CLOOP_CARG cloopcreatePluginDispatcher(IPluginFactory* self, IStatus* status, IPluginConfig* factoryParameter) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::createPlugin(&status2, factoryParameter); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + }; + + template > > + class IPluginFactoryImpl : public IPluginFactoryBaseImpl + { + protected: + IPluginFactoryImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginFactoryImpl() + { + } + + virtual IPluginBase* createPlugin(StatusType* status, IPluginConfig* factoryParameter) = 0; + }; + + template + class IPluginModuleBaseImpl : public Base + { + public: + typedef IPluginModule Declaration; + + IPluginModuleBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->doClean = &Name::cloopdoCleanDispatcher; + this->threadDetach = &Name::cloopthreadDetachDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopdoCleanDispatcher(IPluginModule* self) throw() + { + try + { + static_cast(self)->Name::doClean(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopthreadDetachDispatcher(IPluginModule* self) throw() + { + try + { + static_cast(self)->Name::threadDetach(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > + class IPluginModuleImpl : public IPluginModuleBaseImpl + { + protected: + IPluginModuleImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginModuleImpl() + { + } + + virtual void doClean() = 0; + virtual void threadDetach() = 0; + }; + + template + class IPluginManagerBaseImpl : public Base + { + public: + typedef IPluginManager Declaration; + + IPluginManagerBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->registerPluginFactory = &Name::cloopregisterPluginFactoryDispatcher; + this->registerModule = &Name::cloopregisterModuleDispatcher; + this->unregisterModule = &Name::cloopunregisterModuleDispatcher; + this->getPlugins = &Name::cloopgetPluginsDispatcher; + this->getConfig = &Name::cloopgetConfigDispatcher; + this->releasePlugin = &Name::cloopreleasePluginDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopregisterPluginFactoryDispatcher(IPluginManager* self, unsigned pluginType, const char* defaultName, IPluginFactory* factory) throw() + { + try + { + static_cast(self)->Name::registerPluginFactory(pluginType, defaultName, factory); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopregisterModuleDispatcher(IPluginManager* self, IPluginModule* cleanup) throw() + { + try + { + static_cast(self)->Name::registerModule(cleanup); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopunregisterModuleDispatcher(IPluginManager* self, IPluginModule* cleanup) throw() + { + try + { + static_cast(self)->Name::unregisterModule(cleanup); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IPluginSet* CLOOP_CARG cloopgetPluginsDispatcher(IPluginManager* self, IStatus* status, unsigned pluginType, const char* namesList, IFirebirdConf* firebirdConf) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getPlugins(&status2, pluginType, namesList, firebirdConf); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IConfig* CLOOP_CARG cloopgetConfigDispatcher(IPluginManager* self, IStatus* status, const char* filename) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getConfig(&status2, filename); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopreleasePluginDispatcher(IPluginManager* self, IPluginBase* plugin) throw() + { + try + { + static_cast(self)->Name::releasePlugin(plugin); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > + class IPluginManagerImpl : public IPluginManagerBaseImpl + { + protected: + IPluginManagerImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginManagerImpl() + { + } + + virtual void registerPluginFactory(unsigned pluginType, const char* defaultName, IPluginFactory* factory) = 0; + virtual void registerModule(IPluginModule* cleanup) = 0; + virtual void unregisterModule(IPluginModule* cleanup) = 0; + virtual IPluginSet* getPlugins(StatusType* status, unsigned pluginType, const char* namesList, IFirebirdConf* firebirdConf) = 0; + virtual IConfig* getConfig(StatusType* status, const char* filename) = 0; + virtual void releasePlugin(IPluginBase* plugin) = 0; + }; + + template + class ICryptKeyBaseImpl : public Base + { + public: + typedef ICryptKey Declaration; + + ICryptKeyBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->setSymmetric = &Name::cloopsetSymmetricDispatcher; + this->setAsymmetric = &Name::cloopsetAsymmetricDispatcher; + this->getEncryptKey = &Name::cloopgetEncryptKeyDispatcher; + this->getDecryptKey = &Name::cloopgetDecryptKeyDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetSymmetricDispatcher(ICryptKey* self, IStatus* status, const char* type, unsigned keyLength, const void* key) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setSymmetric(&status2, type, keyLength, key); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetAsymmetricDispatcher(ICryptKey* self, IStatus* status, const char* type, unsigned encryptKeyLength, const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setAsymmetric(&status2, type, encryptKeyLength, encryptKey, decryptKeyLength, decryptKey); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static const void* CLOOP_CARG cloopgetEncryptKeyDispatcher(ICryptKey* self, unsigned* length) throw() + { + try + { + return static_cast(self)->Name::getEncryptKey(length); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const void* CLOOP_CARG cloopgetDecryptKeyDispatcher(ICryptKey* self, unsigned* length) throw() + { + try + { + return static_cast(self)->Name::getDecryptKey(length); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ICryptKeyImpl : public ICryptKeyBaseImpl + { + protected: + ICryptKeyImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ICryptKeyImpl() + { + } + + virtual void setSymmetric(StatusType* status, const char* type, unsigned keyLength, const void* key) = 0; + virtual void setAsymmetric(StatusType* status, const char* type, unsigned encryptKeyLength, const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) = 0; + virtual const void* getEncryptKey(unsigned* length) = 0; + virtual const void* getDecryptKey(unsigned* length) = 0; + }; + + template + class IConfigManagerBaseImpl : public Base + { + public: + typedef IConfigManager Declaration; + + IConfigManagerBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getDirectory = &Name::cloopgetDirectoryDispatcher; + this->getFirebirdConf = &Name::cloopgetFirebirdConfDispatcher; + this->getDatabaseConf = &Name::cloopgetDatabaseConfDispatcher; + this->getPluginConfig = &Name::cloopgetPluginConfigDispatcher; + this->getInstallDirectory = &Name::cloopgetInstallDirectoryDispatcher; + this->getRootDirectory = &Name::cloopgetRootDirectoryDispatcher; + this->getDefaultSecurityDb = &Name::cloopgetDefaultSecurityDbDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetDirectoryDispatcher(IConfigManager* self, unsigned code) throw() + { + try + { + return static_cast(self)->Name::getDirectory(code); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IFirebirdConf* CLOOP_CARG cloopgetFirebirdConfDispatcher(IConfigManager* self) throw() + { + try + { + return static_cast(self)->Name::getFirebirdConf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IFirebirdConf* CLOOP_CARG cloopgetDatabaseConfDispatcher(IConfigManager* self, const char* dbName) throw() + { + try + { + return static_cast(self)->Name::getDatabaseConf(dbName); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IConfig* CLOOP_CARG cloopgetPluginConfigDispatcher(IConfigManager* self, const char* configuredPlugin) throw() + { + try + { + return static_cast(self)->Name::getPluginConfig(configuredPlugin); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetInstallDirectoryDispatcher(IConfigManager* self) throw() + { + try + { + return static_cast(self)->Name::getInstallDirectory(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRootDirectoryDispatcher(IConfigManager* self) throw() + { + try + { + return static_cast(self)->Name::getRootDirectory(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetDefaultSecurityDbDispatcher(IConfigManager* self) throw() + { + try + { + return static_cast(self)->Name::getDefaultSecurityDb(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class IConfigManagerImpl : public IConfigManagerBaseImpl + { + protected: + IConfigManagerImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IConfigManagerImpl() + { + } + + virtual const char* getDirectory(unsigned code) = 0; + virtual IFirebirdConf* getFirebirdConf() = 0; + virtual IFirebirdConf* getDatabaseConf(const char* dbName) = 0; + virtual IConfig* getPluginConfig(const char* configuredPlugin) = 0; + virtual const char* getInstallDirectory() = 0; + virtual const char* getRootDirectory() = 0; + virtual const char* getDefaultSecurityDb() = 0; + }; + + template + class IEventCallbackBaseImpl : public Base + { + public: + typedef IEventCallback Declaration; + + IEventCallbackBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->eventCallbackFunction = &Name::cloopeventCallbackFunctionDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopeventCallbackFunctionDispatcher(IEventCallback* self, unsigned length, const unsigned char* events) throw() + { + try + { + static_cast(self)->Name::eventCallbackFunction(length, events); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IEventCallbackImpl : public IEventCallbackBaseImpl + { + protected: + IEventCallbackImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IEventCallbackImpl() + { + } + + virtual void eventCallbackFunction(unsigned length, const unsigned char* events) = 0; + }; + + template + class IBlobBaseImpl : public Base + { + public: + typedef IBlob Declaration; + + IBlobBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->getSegment = &Name::cloopgetSegmentDispatcher; + this->putSegment = &Name::cloopputSegmentDispatcher; + this->deprecatedCancel = &Name::cloopdeprecatedCancelDispatcher; + this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher; + this->seek = &Name::cloopseekDispatcher; + this->cancel = &Name::cloopcancelDispatcher; + this->close = &Name::cloopcloseDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopgetInfoDispatcher(IBlob* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static int CLOOP_CARG cloopgetSegmentDispatcher(IBlob* self, IStatus* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getSegment(&status2, bufferLength, buffer, segmentLength); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopputSegmentDispatcher(IBlob* self, IStatus* status, unsigned length, const void* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::putSegment(&status2, length, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedCancelDispatcher(IBlob* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedCancel(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IBlob* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedClose(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static int CLOOP_CARG cloopseekDispatcher(IBlob* self, IStatus* status, int mode, int offset) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::seek(&status2, mode, offset); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopcancelDispatcher(IBlob* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::cancel(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcloseDispatcher(IBlob* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::close(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IBlobImpl : public IBlobBaseImpl + { + protected: + IBlobImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IBlobImpl() + { + } + + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + virtual int getSegment(StatusType* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) = 0; + virtual void putSegment(StatusType* status, unsigned length, const void* buffer) = 0; + virtual void deprecatedCancel(StatusType* status) = 0; + virtual void deprecatedClose(StatusType* status) = 0; + virtual int seek(StatusType* status, int mode, int offset) = 0; + virtual void cancel(StatusType* status) = 0; + virtual void close(StatusType* status) = 0; + }; + + template + class ITransactionBaseImpl : public Base + { + public: + typedef ITransaction Declaration; + + ITransactionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->prepare = &Name::cloopprepareDispatcher; + this->deprecatedCommit = &Name::cloopdeprecatedCommitDispatcher; + this->commitRetaining = &Name::cloopcommitRetainingDispatcher; + this->deprecatedRollback = &Name::cloopdeprecatedRollbackDispatcher; + this->rollbackRetaining = &Name::clooprollbackRetainingDispatcher; + this->deprecatedDisconnect = &Name::cloopdeprecatedDisconnectDispatcher; + this->join = &Name::cloopjoinDispatcher; + this->validate = &Name::cloopvalidateDispatcher; + this->enterDtc = &Name::cloopenterDtcDispatcher; + this->commit = &Name::cloopcommitDispatcher; + this->rollback = &Name::clooprollbackDispatcher; + this->disconnect = &Name::cloopdisconnectDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopgetInfoDispatcher(ITransaction* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopprepareDispatcher(ITransaction* self, IStatus* status, unsigned msgLength, const unsigned char* message) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::prepare(&status2, msgLength, message); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedCommitDispatcher(ITransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedCommit(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcommitRetainingDispatcher(ITransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::commitRetaining(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedRollbackDispatcher(ITransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedRollback(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooprollbackRetainingDispatcher(ITransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::rollbackRetaining(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedDisconnectDispatcher(ITransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedDisconnect(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static ITransaction* CLOOP_CARG cloopjoinDispatcher(ITransaction* self, IStatus* status, ITransaction* transaction) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::join(&status2, transaction); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopvalidateDispatcher(ITransaction* self, IStatus* status, IAttachment* attachment) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::validate(&status2, attachment); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopenterDtcDispatcher(ITransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::enterDtc(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopcommitDispatcher(ITransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::commit(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooprollbackDispatcher(ITransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::rollback(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdisconnectDispatcher(ITransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::disconnect(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class ITransactionImpl : public ITransactionBaseImpl + { + protected: + ITransactionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITransactionImpl() + { + } + + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + virtual void prepare(StatusType* status, unsigned msgLength, const unsigned char* message) = 0; + virtual void deprecatedCommit(StatusType* status) = 0; + virtual void commitRetaining(StatusType* status) = 0; + virtual void deprecatedRollback(StatusType* status) = 0; + virtual void rollbackRetaining(StatusType* status) = 0; + virtual void deprecatedDisconnect(StatusType* status) = 0; + virtual ITransaction* join(StatusType* status, ITransaction* transaction) = 0; + virtual ITransaction* validate(StatusType* status, IAttachment* attachment) = 0; + virtual ITransaction* enterDtc(StatusType* status) = 0; + virtual void commit(StatusType* status) = 0; + virtual void rollback(StatusType* status) = 0; + virtual void disconnect(StatusType* status) = 0; + }; + + template + class IMessageMetadataBaseImpl : public Base + { + public: + typedef IMessageMetadata Declaration; + + IMessageMetadataBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getCount = &Name::cloopgetCountDispatcher; + this->getField = &Name::cloopgetFieldDispatcher; + this->getRelation = &Name::cloopgetRelationDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->getAlias = &Name::cloopgetAliasDispatcher; + this->getType = &Name::cloopgetTypeDispatcher; + this->isNullable = &Name::cloopisNullableDispatcher; + this->getSubType = &Name::cloopgetSubTypeDispatcher; + this->getLength = &Name::cloopgetLengthDispatcher; + this->getScale = &Name::cloopgetScaleDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->getOffset = &Name::cloopgetOffsetDispatcher; + this->getNullOffset = &Name::cloopgetNullOffsetDispatcher; + this->getBuilder = &Name::cloopgetBuilderDispatcher; + this->getMessageLength = &Name::cloopgetMessageLengthDispatcher; + this->getAlignment = &Name::cloopgetAlignmentDispatcher; + this->getAlignedLength = &Name::cloopgetAlignedLengthDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopgetCountDispatcher(IMessageMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getCount(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetFieldDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getField(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRelationDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getRelation(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetOwnerDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getOwner(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetAliasDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getAlias(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetTypeDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getType(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopisNullableDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::isNullable(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetSubTypeDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getSubType(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetLengthDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getLength(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetScaleDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getScale(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetCharSetDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getCharSet(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetOffsetDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getOffset(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetNullOffsetDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getNullOffset(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMetadataBuilder* CLOOP_CARG cloopgetBuilderDispatcher(IMessageMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getBuilder(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetMessageLengthDispatcher(IMessageMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getMessageLength(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetAlignmentDispatcher(IMessageMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getAlignment(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetAlignedLengthDispatcher(IMessageMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getAlignedLength(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IMessageMetadataImpl : public IMessageMetadataBaseImpl + { + protected: + IMessageMetadataImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IMessageMetadataImpl() + { + } + + virtual unsigned getCount(StatusType* status) = 0; + virtual const char* getField(StatusType* status, unsigned index) = 0; + virtual const char* getRelation(StatusType* status, unsigned index) = 0; + virtual const char* getOwner(StatusType* status, unsigned index) = 0; + virtual const char* getAlias(StatusType* status, unsigned index) = 0; + virtual unsigned getType(StatusType* status, unsigned index) = 0; + virtual FB_BOOLEAN isNullable(StatusType* status, unsigned index) = 0; + virtual int getSubType(StatusType* status, unsigned index) = 0; + virtual unsigned getLength(StatusType* status, unsigned index) = 0; + virtual int getScale(StatusType* status, unsigned index) = 0; + virtual unsigned getCharSet(StatusType* status, unsigned index) = 0; + virtual unsigned getOffset(StatusType* status, unsigned index) = 0; + virtual unsigned getNullOffset(StatusType* status, unsigned index) = 0; + virtual IMetadataBuilder* getBuilder(StatusType* status) = 0; + virtual unsigned getMessageLength(StatusType* status) = 0; + virtual unsigned getAlignment(StatusType* status) = 0; + virtual unsigned getAlignedLength(StatusType* status) = 0; + }; + + template + class IMetadataBuilderBaseImpl : public Base + { + public: + typedef IMetadataBuilder Declaration; + + IMetadataBuilderBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setType = &Name::cloopsetTypeDispatcher; + this->setSubType = &Name::cloopsetSubTypeDispatcher; + this->setLength = &Name::cloopsetLengthDispatcher; + this->setCharSet = &Name::cloopsetCharSetDispatcher; + this->setScale = &Name::cloopsetScaleDispatcher; + this->truncate = &Name::clooptruncateDispatcher; + this->moveNameToIndex = &Name::cloopmoveNameToIndexDispatcher; + this->remove = &Name::cloopremoveDispatcher; + this->addField = &Name::cloopaddFieldDispatcher; + this->getMetadata = &Name::cloopgetMetadataDispatcher; + this->setField = &Name::cloopsetFieldDispatcher; + this->setRelation = &Name::cloopsetRelationDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->setAlias = &Name::cloopsetAliasDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetTypeDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned type) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setType(&status2, index, type); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetSubTypeDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, int subType) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setSubType(&status2, index, subType); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetLengthDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned length) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setLength(&status2, index, length); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetCharSetDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned charSet) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setCharSet(&status2, index, charSet); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetScaleDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, int scale) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setScale(&status2, index, scale); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooptruncateDispatcher(IMetadataBuilder* self, IStatus* status, unsigned count) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::truncate(&status2, count); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopmoveNameToIndexDispatcher(IMetadataBuilder* self, IStatus* status, const char* name, unsigned index) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::moveNameToIndex(&status2, name, index); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopremoveDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::remove(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static unsigned CLOOP_CARG cloopaddFieldDispatcher(IMetadataBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::addField(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMessageMetadata* CLOOP_CARG cloopgetMetadataDispatcher(IMetadataBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetFieldDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, const char* field) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setField(&status2, index, field); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetRelationDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, const char* relation) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setRelation(&status2, index, relation); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, const char* owner) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setOwner(&status2, index, owner); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetAliasDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, const char* alias) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setAlias(&status2, index, alias); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IMetadataBuilderImpl : public IMetadataBuilderBaseImpl + { + protected: + IMetadataBuilderImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IMetadataBuilderImpl() + { + } + + virtual void setType(StatusType* status, unsigned index, unsigned type) = 0; + virtual void setSubType(StatusType* status, unsigned index, int subType) = 0; + virtual void setLength(StatusType* status, unsigned index, unsigned length) = 0; + virtual void setCharSet(StatusType* status, unsigned index, unsigned charSet) = 0; + virtual void setScale(StatusType* status, unsigned index, int scale) = 0; + virtual void truncate(StatusType* status, unsigned count) = 0; + virtual void moveNameToIndex(StatusType* status, const char* name, unsigned index) = 0; + virtual void remove(StatusType* status, unsigned index) = 0; + virtual unsigned addField(StatusType* status) = 0; + virtual IMessageMetadata* getMetadata(StatusType* status) = 0; + virtual void setField(StatusType* status, unsigned index, const char* field) = 0; + virtual void setRelation(StatusType* status, unsigned index, const char* relation) = 0; + virtual void setOwner(StatusType* status, unsigned index, const char* owner) = 0; + virtual void setAlias(StatusType* status, unsigned index, const char* alias) = 0; + }; + + template + class IResultSetBaseImpl : public Base + { + public: + typedef IResultSet Declaration; + + IResultSetBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->fetchNext = &Name::cloopfetchNextDispatcher; + this->fetchPrior = &Name::cloopfetchPriorDispatcher; + this->fetchFirst = &Name::cloopfetchFirstDispatcher; + this->fetchLast = &Name::cloopfetchLastDispatcher; + this->fetchAbsolute = &Name::cloopfetchAbsoluteDispatcher; + this->fetchRelative = &Name::cloopfetchRelativeDispatcher; + this->isEof = &Name::cloopisEofDispatcher; + this->isBof = &Name::cloopisBofDispatcher; + this->getMetadata = &Name::cloopgetMetadataDispatcher; + this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher; + this->setDelayedOutputFormat = &Name::cloopsetDelayedOutputFormatDispatcher; + this->close = &Name::cloopcloseDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static int CLOOP_CARG cloopfetchNextDispatcher(IResultSet* self, IStatus* status, void* message) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchNext(&status2, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopfetchPriorDispatcher(IResultSet* self, IStatus* status, void* message) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchPrior(&status2, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopfetchFirstDispatcher(IResultSet* self, IStatus* status, void* message) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchFirst(&status2, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopfetchLastDispatcher(IResultSet* self, IStatus* status, void* message) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchLast(&status2, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopfetchAbsoluteDispatcher(IResultSet* self, IStatus* status, int position, void* message) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchAbsolute(&status2, position, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopfetchRelativeDispatcher(IResultSet* self, IStatus* status, int offset, void* message) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchRelative(&status2, offset, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopisEofDispatcher(IResultSet* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::isEof(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopisBofDispatcher(IResultSet* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::isBof(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMessageMetadata* CLOOP_CARG cloopgetMetadataDispatcher(IResultSet* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IResultSet* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedClose(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetDelayedOutputFormatDispatcher(IResultSet* self, IStatus* status, IMessageMetadata* format) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setDelayedOutputFormat(&status2, format); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcloseDispatcher(IResultSet* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::close(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IResultSetImpl : public IResultSetBaseImpl + { + protected: + IResultSetImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IResultSetImpl() + { + } + + virtual int fetchNext(StatusType* status, void* message) = 0; + virtual int fetchPrior(StatusType* status, void* message) = 0; + virtual int fetchFirst(StatusType* status, void* message) = 0; + virtual int fetchLast(StatusType* status, void* message) = 0; + virtual int fetchAbsolute(StatusType* status, int position, void* message) = 0; + virtual int fetchRelative(StatusType* status, int offset, void* message) = 0; + virtual FB_BOOLEAN isEof(StatusType* status) = 0; + virtual FB_BOOLEAN isBof(StatusType* status) = 0; + virtual IMessageMetadata* getMetadata(StatusType* status) = 0; + virtual void deprecatedClose(StatusType* status) = 0; + virtual void setDelayedOutputFormat(StatusType* status, IMessageMetadata* format) = 0; + virtual void close(StatusType* status) = 0; + }; + + template + class IStatementBaseImpl : public Base + { + public: + typedef IStatement Declaration; + + IStatementBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->getType = &Name::cloopgetTypeDispatcher; + this->getPlan = &Name::cloopgetPlanDispatcher; + this->getAffectedRecords = &Name::cloopgetAffectedRecordsDispatcher; + this->getInputMetadata = &Name::cloopgetInputMetadataDispatcher; + this->getOutputMetadata = &Name::cloopgetOutputMetadataDispatcher; + this->execute = &Name::cloopexecuteDispatcher; + this->openCursor = &Name::cloopopenCursorDispatcher; + this->setCursorName = &Name::cloopsetCursorNameDispatcher; + this->deprecatedFree = &Name::cloopdeprecatedFreeDispatcher; + this->getFlags = &Name::cloopgetFlagsDispatcher; + this->getTimeout = &Name::cloopgetTimeoutDispatcher; + this->setTimeout = &Name::cloopsetTimeoutDispatcher; + this->createBatch = &Name::cloopcreateBatchDispatcher; + this->free = &Name::cloopfreeDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopgetInfoDispatcher(IStatement* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static unsigned CLOOP_CARG cloopgetTypeDispatcher(IStatement* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getType(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetPlanDispatcher(IStatement* self, IStatus* status, FB_BOOLEAN detailed) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getPlan(&status2, detailed); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ISC_UINT64 CLOOP_CARG cloopgetAffectedRecordsDispatcher(IStatement* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getAffectedRecords(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMessageMetadata* CLOOP_CARG cloopgetInputMetadataDispatcher(IStatement* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getInputMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMessageMetadata* CLOOP_CARG cloopgetOutputMetadataDispatcher(IStatement* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getOutputMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopexecuteDispatcher(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::execute(&status2, transaction, inMetadata, inBuffer, outMetadata, outBuffer); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IResultSet* CLOOP_CARG cloopopenCursorDispatcher(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::openCursor(&status2, transaction, inMetadata, inBuffer, outMetadata, flags); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetCursorNameDispatcher(IStatement* self, IStatus* status, const char* name) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setCursorName(&status2, name); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedFreeDispatcher(IStatement* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedFree(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static unsigned CLOOP_CARG cloopgetFlagsDispatcher(IStatement* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getFlags(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetTimeoutDispatcher(IStatement* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getTimeout(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetTimeoutDispatcher(IStatement* self, IStatus* status, unsigned timeOut) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setTimeout(&status2, timeOut); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IBatch* CLOOP_CARG cloopcreateBatchDispatcher(IStatement* self, IStatus* status, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::createBatch(&status2, inMetadata, parLength, par); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopfreeDispatcher(IStatement* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::free(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IStatementImpl : public IStatementBaseImpl + { + protected: + IStatementImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IStatementImpl() + { + } + + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + virtual unsigned getType(StatusType* status) = 0; + virtual const char* getPlan(StatusType* status, FB_BOOLEAN detailed) = 0; + virtual ISC_UINT64 getAffectedRecords(StatusType* status) = 0; + virtual IMessageMetadata* getInputMetadata(StatusType* status) = 0; + virtual IMessageMetadata* getOutputMetadata(StatusType* status) = 0; + virtual ITransaction* execute(StatusType* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) = 0; + virtual IResultSet* openCursor(StatusType* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) = 0; + virtual void setCursorName(StatusType* status, const char* name) = 0; + virtual void deprecatedFree(StatusType* status) = 0; + virtual unsigned getFlags(StatusType* status) = 0; + virtual unsigned getTimeout(StatusType* status) = 0; + virtual void setTimeout(StatusType* status, unsigned timeOut) = 0; + virtual IBatch* createBatch(StatusType* status, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) = 0; + virtual void free(StatusType* status) = 0; + }; + + template + class IBatchBaseImpl : public Base + { + public: + typedef IBatch Declaration; + + IBatchBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->add = &Name::cloopaddDispatcher; + this->addBlob = &Name::cloopaddBlobDispatcher; + this->appendBlobData = &Name::cloopappendBlobDataDispatcher; + this->addBlobStream = &Name::cloopaddBlobStreamDispatcher; + this->registerBlob = &Name::cloopregisterBlobDispatcher; + this->execute = &Name::cloopexecuteDispatcher; + this->cancel = &Name::cloopcancelDispatcher; + this->getBlobAlignment = &Name::cloopgetBlobAlignmentDispatcher; + this->getMetadata = &Name::cloopgetMetadataDispatcher; + this->setDefaultBpb = &Name::cloopsetDefaultBpbDispatcher; + this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher; + this->close = &Name::cloopcloseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopaddDispatcher(IBatch* self, IStatus* status, unsigned count, const void* inBuffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::add(&status2, count, inBuffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddBlobDispatcher(IBatch* self, IStatus* status, unsigned length, const void* inBuffer, ISC_QUAD* blobId, unsigned parLength, const unsigned char* par) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::addBlob(&status2, length, inBuffer, blobId, parLength, par); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopappendBlobDataDispatcher(IBatch* self, IStatus* status, unsigned length, const void* inBuffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::appendBlobData(&status2, length, inBuffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddBlobStreamDispatcher(IBatch* self, IStatus* status, unsigned length, const void* inBuffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::addBlobStream(&status2, length, inBuffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopregisterBlobDispatcher(IBatch* self, IStatus* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::registerBlob(&status2, existingBlob, blobId); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IBatchCompletionState* CLOOP_CARG cloopexecuteDispatcher(IBatch* self, IStatus* status, ITransaction* transaction) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::execute(&status2, transaction); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopcancelDispatcher(IBatch* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::cancel(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static unsigned CLOOP_CARG cloopgetBlobAlignmentDispatcher(IBatch* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getBlobAlignment(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMessageMetadata* CLOOP_CARG cloopgetMetadataDispatcher(IBatch* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetDefaultBpbDispatcher(IBatch* self, IStatus* status, unsigned parLength, const unsigned char* par) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setDefaultBpb(&status2, parLength, par); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IBatch* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedClose(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcloseDispatcher(IBatch* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::close(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopgetInfoDispatcher(IBatch* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IBatchImpl : public IBatchBaseImpl + { + protected: + IBatchImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IBatchImpl() + { + } + + virtual void add(StatusType* status, unsigned count, const void* inBuffer) = 0; + virtual void addBlob(StatusType* status, unsigned length, const void* inBuffer, ISC_QUAD* blobId, unsigned parLength, const unsigned char* par) = 0; + virtual void appendBlobData(StatusType* status, unsigned length, const void* inBuffer) = 0; + virtual void addBlobStream(StatusType* status, unsigned length, const void* inBuffer) = 0; + virtual void registerBlob(StatusType* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) = 0; + virtual IBatchCompletionState* execute(StatusType* status, ITransaction* transaction) = 0; + virtual void cancel(StatusType* status) = 0; + virtual unsigned getBlobAlignment(StatusType* status) = 0; + virtual IMessageMetadata* getMetadata(StatusType* status) = 0; + virtual void setDefaultBpb(StatusType* status, unsigned parLength, const unsigned char* par) = 0; + virtual void deprecatedClose(StatusType* status) = 0; + virtual void close(StatusType* status) = 0; + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + }; + + template + class IBatchCompletionStateBaseImpl : public Base + { + public: + typedef IBatchCompletionState Declaration; + + IBatchCompletionStateBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->getSize = &Name::cloopgetSizeDispatcher; + this->getState = &Name::cloopgetStateDispatcher; + this->findError = &Name::cloopfindErrorDispatcher; + this->getStatus = &Name::cloopgetStatusDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopgetSizeDispatcher(IBatchCompletionState* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getSize(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetStateDispatcher(IBatchCompletionState* self, IStatus* status, unsigned pos) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getState(&status2, pos); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopfindErrorDispatcher(IBatchCompletionState* self, IStatus* status, unsigned pos) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::findError(&status2, pos); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopgetStatusDispatcher(IBatchCompletionState* self, IStatus* status, IStatus* to, unsigned pos) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getStatus(&status2, to, pos); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IBatchCompletionStateImpl : public IBatchCompletionStateBaseImpl + { + protected: + IBatchCompletionStateImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IBatchCompletionStateImpl() + { + } + + virtual unsigned getSize(StatusType* status) = 0; + virtual int getState(StatusType* status, unsigned pos) = 0; + virtual unsigned findError(StatusType* status, unsigned pos) = 0; + virtual void getStatus(StatusType* status, IStatus* to, unsigned pos) = 0; + }; + + template + class IReplicatorBaseImpl : public Base + { + public: + typedef IReplicator Declaration; + + IReplicatorBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->process = &Name::cloopprocessDispatcher; + this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher; + this->close = &Name::cloopcloseDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopprocessDispatcher(IReplicator* self, IStatus* status, unsigned length, const unsigned char* data) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::process(&status2, length, data); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IReplicator* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedClose(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcloseDispatcher(IReplicator* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::close(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IReplicatorImpl : public IReplicatorBaseImpl + { + protected: + IReplicatorImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IReplicatorImpl() + { + } + + virtual void process(StatusType* status, unsigned length, const unsigned char* data) = 0; + virtual void deprecatedClose(StatusType* status) = 0; + virtual void close(StatusType* status) = 0; + }; + + template + class IRequestBaseImpl : public Base + { + public: + typedef IRequest Declaration; + + IRequestBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->receive = &Name::cloopreceiveDispatcher; + this->send = &Name::cloopsendDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->start = &Name::cloopstartDispatcher; + this->startAndSend = &Name::cloopstartAndSendDispatcher; + this->unwind = &Name::cloopunwindDispatcher; + this->deprecatedFree = &Name::cloopdeprecatedFreeDispatcher; + this->free = &Name::cloopfreeDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopreceiveDispatcher(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, void* message) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::receive(&status2, level, msgType, length, message); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsendDispatcher(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, const void* message) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::send(&status2, level, msgType, length, message); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopgetInfoDispatcher(IRequest* self, IStatus* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getInfo(&status2, level, itemsLength, items, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopstartDispatcher(IRequest* self, IStatus* status, ITransaction* tra, int level) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::start(&status2, tra, level); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopstartAndSendDispatcher(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::startAndSend(&status2, tra, level, msgType, length, message); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopunwindDispatcher(IRequest* self, IStatus* status, int level) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::unwind(&status2, level); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedFreeDispatcher(IRequest* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedFree(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopfreeDispatcher(IRequest* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::free(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IRequestImpl : public IRequestBaseImpl + { + protected: + IRequestImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IRequestImpl() + { + } + + virtual void receive(StatusType* status, int level, unsigned msgType, unsigned length, void* message) = 0; + virtual void send(StatusType* status, int level, unsigned msgType, unsigned length, const void* message) = 0; + virtual void getInfo(StatusType* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + virtual void start(StatusType* status, ITransaction* tra, int level) = 0; + virtual void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) = 0; + virtual void unwind(StatusType* status, int level) = 0; + virtual void deprecatedFree(StatusType* status) = 0; + virtual void free(StatusType* status) = 0; + }; + + template + class IEventsBaseImpl : public Base + { + public: + typedef IEvents Declaration; + + IEventsBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->deprecatedCancel = &Name::cloopdeprecatedCancelDispatcher; + this->cancel = &Name::cloopcancelDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopdeprecatedCancelDispatcher(IEvents* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedCancel(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcancelDispatcher(IEvents* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::cancel(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IEventsImpl : public IEventsBaseImpl + { + protected: + IEventsImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IEventsImpl() + { + } + + virtual void deprecatedCancel(StatusType* status) = 0; + virtual void cancel(StatusType* status) = 0; + }; + + template + class IAttachmentBaseImpl : public Base + { + public: + typedef IAttachment Declaration; + + IAttachmentBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->startTransaction = &Name::cloopstartTransactionDispatcher; + this->reconnectTransaction = &Name::cloopreconnectTransactionDispatcher; + this->compileRequest = &Name::cloopcompileRequestDispatcher; + this->transactRequest = &Name::clooptransactRequestDispatcher; + this->createBlob = &Name::cloopcreateBlobDispatcher; + this->openBlob = &Name::cloopopenBlobDispatcher; + this->getSlice = &Name::cloopgetSliceDispatcher; + this->putSlice = &Name::cloopputSliceDispatcher; + this->executeDyn = &Name::cloopexecuteDynDispatcher; + this->prepare = &Name::cloopprepareDispatcher; + this->execute = &Name::cloopexecuteDispatcher; + this->openCursor = &Name::cloopopenCursorDispatcher; + this->queEvents = &Name::cloopqueEventsDispatcher; + this->cancelOperation = &Name::cloopcancelOperationDispatcher; + this->ping = &Name::clooppingDispatcher; + this->deprecatedDetach = &Name::cloopdeprecatedDetachDispatcher; + this->deprecatedDropDatabase = &Name::cloopdeprecatedDropDatabaseDispatcher; + this->getIdleTimeout = &Name::cloopgetIdleTimeoutDispatcher; + this->setIdleTimeout = &Name::cloopsetIdleTimeoutDispatcher; + this->getStatementTimeout = &Name::cloopgetStatementTimeoutDispatcher; + this->setStatementTimeout = &Name::cloopsetStatementTimeoutDispatcher; + this->createBatch = &Name::cloopcreateBatchDispatcher; + this->createReplicator = &Name::cloopcreateReplicatorDispatcher; + this->detach = &Name::cloopdetachDispatcher; + this->dropDatabase = &Name::cloopdropDatabaseDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopgetInfoDispatcher(IAttachment* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static ITransaction* CLOOP_CARG cloopstartTransactionDispatcher(IAttachment* self, IStatus* status, unsigned tpbLength, const unsigned char* tpb) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::startTransaction(&status2, tpbLength, tpb); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopreconnectTransactionDispatcher(IAttachment* self, IStatus* status, unsigned length, const unsigned char* id) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::reconnectTransaction(&status2, length, id); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IRequest* CLOOP_CARG cloopcompileRequestDispatcher(IAttachment* self, IStatus* status, unsigned blrLength, const unsigned char* blr) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::compileRequest(&status2, blrLength, blr); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG clooptransactRequestDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::transactRequest(&status2, transaction, blrLength, blr, inMsgLength, inMsg, outMsgLength, outMsg); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IBlob* CLOOP_CARG cloopcreateBlobDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::createBlob(&status2, transaction, id, bpbLength, bpb); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IBlob* CLOOP_CARG cloopopenBlobDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::openBlob(&status2, transaction, id, bpbLength, bpb); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetSliceDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getSlice(&status2, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopputSliceDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::putSlice(&status2, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopexecuteDynDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::executeDyn(&status2, transaction, length, dyn); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IStatement* CLOOP_CARG cloopprepareDispatcher(IAttachment* self, IStatus* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::prepare(&status2, tra, stmtLength, sqlStmt, dialect, flags); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopexecuteDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::execute(&status2, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, outBuffer); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IResultSet* CLOOP_CARG cloopopenCursorDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::openCursor(&status2, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, cursorName, cursorFlags); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IEvents* CLOOP_CARG cloopqueEventsDispatcher(IAttachment* self, IStatus* status, IEventCallback* callback, unsigned length, const unsigned char* events) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::queEvents(&status2, callback, length, events); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopcancelOperationDispatcher(IAttachment* self, IStatus* status, int option) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::cancelOperation(&status2, option); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooppingDispatcher(IAttachment* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::ping(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedDetachDispatcher(IAttachment* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedDetach(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedDropDatabaseDispatcher(IAttachment* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedDropDatabase(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static unsigned CLOOP_CARG cloopgetIdleTimeoutDispatcher(IAttachment* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getIdleTimeout(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetIdleTimeoutDispatcher(IAttachment* self, IStatus* status, unsigned timeOut) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setIdleTimeout(&status2, timeOut); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static unsigned CLOOP_CARG cloopgetStatementTimeoutDispatcher(IAttachment* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getStatementTimeout(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetStatementTimeoutDispatcher(IAttachment* self, IStatus* status, unsigned timeOut) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setStatementTimeout(&status2, timeOut); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IBatch* CLOOP_CARG cloopcreateBatchDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::createBatch(&status2, transaction, stmtLength, sqlStmt, dialect, inMetadata, parLength, par); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IReplicator* CLOOP_CARG cloopcreateReplicatorDispatcher(IAttachment* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::createReplicator(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdetachDispatcher(IAttachment* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::detach(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdropDatabaseDispatcher(IAttachment* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::dropDatabase(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IAttachmentImpl : public IAttachmentBaseImpl + { + protected: + IAttachmentImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IAttachmentImpl() + { + } + + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + virtual ITransaction* startTransaction(StatusType* status, unsigned tpbLength, const unsigned char* tpb) = 0; + virtual ITransaction* reconnectTransaction(StatusType* status, unsigned length, const unsigned char* id) = 0; + virtual IRequest* compileRequest(StatusType* status, unsigned blrLength, const unsigned char* blr) = 0; + virtual void transactRequest(StatusType* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) = 0; + virtual IBlob* createBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) = 0; + virtual IBlob* openBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) = 0; + virtual int getSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) = 0; + virtual void putSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) = 0; + virtual void executeDyn(StatusType* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) = 0; + virtual IStatement* prepare(StatusType* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) = 0; + virtual ITransaction* execute(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) = 0; + virtual IResultSet* openCursor(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) = 0; + virtual IEvents* queEvents(StatusType* status, IEventCallback* callback, unsigned length, const unsigned char* events) = 0; + virtual void cancelOperation(StatusType* status, int option) = 0; + virtual void ping(StatusType* status) = 0; + virtual void deprecatedDetach(StatusType* status) = 0; + virtual void deprecatedDropDatabase(StatusType* status) = 0; + virtual unsigned getIdleTimeout(StatusType* status) = 0; + virtual void setIdleTimeout(StatusType* status, unsigned timeOut) = 0; + virtual unsigned getStatementTimeout(StatusType* status) = 0; + virtual void setStatementTimeout(StatusType* status, unsigned timeOut) = 0; + virtual IBatch* createBatch(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) = 0; + virtual IReplicator* createReplicator(StatusType* status) = 0; + virtual void detach(StatusType* status) = 0; + virtual void dropDatabase(StatusType* status) = 0; + }; + + template + class IServiceBaseImpl : public Base + { + public: + typedef IService Declaration; + + IServiceBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->deprecatedDetach = &Name::cloopdeprecatedDetachDispatcher; + this->query = &Name::cloopqueryDispatcher; + this->start = &Name::cloopstartDispatcher; + this->detach = &Name::cloopdetachDispatcher; + this->cancel = &Name::cloopcancelDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopdeprecatedDetachDispatcher(IService* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedDetach(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopqueryDispatcher(IService* self, IStatus* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::query(&status2, sendLength, sendItems, receiveLength, receiveItems, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopstartDispatcher(IService* self, IStatus* status, unsigned spbLength, const unsigned char* spb) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::start(&status2, spbLength, spb); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdetachDispatcher(IService* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::detach(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcancelDispatcher(IService* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::cancel(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IServiceImpl : public IServiceBaseImpl + { + protected: + IServiceImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IServiceImpl() + { + } + + virtual void deprecatedDetach(StatusType* status) = 0; + virtual void query(StatusType* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) = 0; + virtual void start(StatusType* status, unsigned spbLength, const unsigned char* spb) = 0; + virtual void detach(StatusType* status) = 0; + virtual void cancel(StatusType* status) = 0; + }; + + template + class IProviderBaseImpl : public Base + { + public: + typedef IProvider Declaration; + + IProviderBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->attachDatabase = &Name::cloopattachDatabaseDispatcher; + this->createDatabase = &Name::cloopcreateDatabaseDispatcher; + this->attachServiceManager = &Name::cloopattachServiceManagerDispatcher; + this->shutdown = &Name::cloopshutdownDispatcher; + this->setDbCryptCallback = &Name::cloopsetDbCryptCallbackDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static IAttachment* CLOOP_CARG cloopattachDatabaseDispatcher(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::attachDatabase(&status2, fileName, dpbLength, dpb); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IAttachment* CLOOP_CARG cloopcreateDatabaseDispatcher(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::createDatabase(&status2, fileName, dpbLength, dpb); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IService* CLOOP_CARG cloopattachServiceManagerDispatcher(IProvider* self, IStatus* status, const char* service, unsigned spbLength, const unsigned char* spb) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::attachServiceManager(&status2, service, spbLength, spb); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopshutdownDispatcher(IProvider* self, IStatus* status, unsigned timeout, const int reason) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::shutdown(&status2, timeout, reason); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetDbCryptCallbackDispatcher(IProvider* self, IStatus* status, ICryptKeyCallback* cryptCallback) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setDbCryptCallback(&status2, cryptCallback); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > + class IProviderImpl : public IProviderBaseImpl + { + protected: + IProviderImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IProviderImpl() + { + } + + virtual IAttachment* attachDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) = 0; + virtual IAttachment* createDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) = 0; + virtual IService* attachServiceManager(StatusType* status, const char* service, unsigned spbLength, const unsigned char* spb) = 0; + virtual void shutdown(StatusType* status, unsigned timeout, const int reason) = 0; + virtual void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) = 0; + }; + + template + class IDtcStartBaseImpl : public Base + { + public: + typedef IDtcStart Declaration; + + IDtcStartBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->addAttachment = &Name::cloopaddAttachmentDispatcher; + this->addWithTpb = &Name::cloopaddWithTpbDispatcher; + this->start = &Name::cloopstartDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopaddAttachmentDispatcher(IDtcStart* self, IStatus* status, IAttachment* att) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::addAttachment(&status2, att); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddWithTpbDispatcher(IDtcStart* self, IStatus* status, IAttachment* att, unsigned length, const unsigned char* tpb) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::addWithTpb(&status2, att, length, tpb); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static ITransaction* CLOOP_CARG cloopstartDispatcher(IDtcStart* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::start(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IDtcStartImpl : public IDtcStartBaseImpl + { + protected: + IDtcStartImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IDtcStartImpl() + { + } + + virtual void addAttachment(StatusType* status, IAttachment* att) = 0; + virtual void addWithTpb(StatusType* status, IAttachment* att, unsigned length, const unsigned char* tpb) = 0; + virtual ITransaction* start(StatusType* status) = 0; + }; + + template + class IDtcBaseImpl : public Base + { + public: + typedef IDtc Declaration; + + IDtcBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->join = &Name::cloopjoinDispatcher; + this->startBuilder = &Name::cloopstartBuilderDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static ITransaction* CLOOP_CARG cloopjoinDispatcher(IDtc* self, IStatus* status, ITransaction* one, ITransaction* two) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::join(&status2, one, two); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IDtcStart* CLOOP_CARG cloopstartBuilderDispatcher(IDtc* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::startBuilder(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + }; + + template > > + class IDtcImpl : public IDtcBaseImpl + { + protected: + IDtcImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IDtcImpl() + { + } + + virtual ITransaction* join(StatusType* status, ITransaction* one, ITransaction* two) = 0; + virtual IDtcStart* startBuilder(StatusType* status) = 0; + }; + + template + class IAuthBaseImpl : public Base + { + public: + typedef IAuth Declaration; + + IAuthBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > + class IAuthImpl : public IAuthBaseImpl + { + protected: + IAuthImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IAuthImpl() + { + } + + }; + + template + class IWriterBaseImpl : public Base + { + public: + typedef IWriter Declaration; + + IWriterBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->reset = &Name::cloopresetDispatcher; + this->add = &Name::cloopaddDispatcher; + this->setType = &Name::cloopsetTypeDispatcher; + this->setDb = &Name::cloopsetDbDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopresetDispatcher(IWriter* self) throw() + { + try + { + static_cast(self)->Name::reset(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopaddDispatcher(IWriter* self, IStatus* status, const char* name) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::add(&status2, name); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetTypeDispatcher(IWriter* self, IStatus* status, const char* value) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setType(&status2, value); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetDbDispatcher(IWriter* self, IStatus* status, const char* value) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setDb(&status2, value); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IWriterImpl : public IWriterBaseImpl + { + protected: + IWriterImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IWriterImpl() + { + } + + virtual void reset() = 0; + virtual void add(StatusType* status, const char* name) = 0; + virtual void setType(StatusType* status, const char* value) = 0; + virtual void setDb(StatusType* status, const char* value) = 0; + }; + + template + class IServerBlockBaseImpl : public Base + { + public: + typedef IServerBlock Declaration; + + IServerBlockBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getLogin = &Name::cloopgetLoginDispatcher; + this->getData = &Name::cloopgetDataDispatcher; + this->putData = &Name::cloopputDataDispatcher; + this->newKey = &Name::cloopnewKeyDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetLoginDispatcher(IServerBlock* self) throw() + { + try + { + return static_cast(self)->Name::getLogin(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(IServerBlock* self, unsigned* length) throw() + { + try + { + return static_cast(self)->Name::getData(length); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopputDataDispatcher(IServerBlock* self, IStatus* status, unsigned length, const void* data) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::putData(&status2, length, data); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static ICryptKey* CLOOP_CARG cloopnewKeyDispatcher(IServerBlock* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::newKey(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + }; + + template > > + class IServerBlockImpl : public IServerBlockBaseImpl + { + protected: + IServerBlockImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IServerBlockImpl() + { + } + + virtual const char* getLogin() = 0; + virtual const unsigned char* getData(unsigned* length) = 0; + virtual void putData(StatusType* status, unsigned length, const void* data) = 0; + virtual ICryptKey* newKey(StatusType* status) = 0; + }; + + template + class IClientBlockBaseImpl : public Base + { + public: + typedef IClientBlock Declaration; + + IClientBlockBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getLogin = &Name::cloopgetLoginDispatcher; + this->getPassword = &Name::cloopgetPasswordDispatcher; + this->getData = &Name::cloopgetDataDispatcher; + this->putData = &Name::cloopputDataDispatcher; + this->newKey = &Name::cloopnewKeyDispatcher; + this->getAuthBlock = &Name::cloopgetAuthBlockDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetLoginDispatcher(IClientBlock* self) throw() + { + try + { + return static_cast(self)->Name::getLogin(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetPasswordDispatcher(IClientBlock* self) throw() + { + try + { + return static_cast(self)->Name::getPassword(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(IClientBlock* self, unsigned* length) throw() + { + try + { + return static_cast(self)->Name::getData(length); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopputDataDispatcher(IClientBlock* self, IStatus* status, unsigned length, const void* data) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::putData(&status2, length, data); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static ICryptKey* CLOOP_CARG cloopnewKeyDispatcher(IClientBlock* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::newKey(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IAuthBlock* CLOOP_CARG cloopgetAuthBlockDispatcher(IClientBlock* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getAuthBlock(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IClientBlockImpl : public IClientBlockBaseImpl + { + protected: + IClientBlockImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IClientBlockImpl() + { + } + + virtual const char* getLogin() = 0; + virtual const char* getPassword() = 0; + virtual const unsigned char* getData(unsigned* length) = 0; + virtual void putData(StatusType* status, unsigned length, const void* data) = 0; + virtual ICryptKey* newKey(StatusType* status) = 0; + virtual IAuthBlock* getAuthBlock(StatusType* status) = 0; + }; + + template + class IServerBaseImpl : public Base + { + public: + typedef IServer Declaration; + + IServerBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->authenticate = &Name::cloopauthenticateDispatcher; + this->setDbCryptCallback = &Name::cloopsetDbCryptCallbackDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static int CLOOP_CARG cloopauthenticateDispatcher(IServer* self, IStatus* status, IServerBlock* sBlock, IWriter* writerInterface) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::authenticate(&status2, sBlock, writerInterface); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetDbCryptCallbackDispatcher(IServer* self, IStatus* status, ICryptKeyCallback* cryptCallback) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setDbCryptCallback(&status2, cryptCallback); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > > > + class IServerImpl : public IServerBaseImpl + { + protected: + IServerImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IServerImpl() + { + } + + virtual int authenticate(StatusType* status, IServerBlock* sBlock, IWriter* writerInterface) = 0; + virtual void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) = 0; + }; + + template + class IClientBaseImpl : public Base + { + public: + typedef IClient Declaration; + + IClientBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->authenticate = &Name::cloopauthenticateDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static int CLOOP_CARG cloopauthenticateDispatcher(IClient* self, IStatus* status, IClientBlock* cBlock) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::authenticate(&status2, cBlock); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > > > + class IClientImpl : public IClientBaseImpl + { + protected: + IClientImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IClientImpl() + { + } + + virtual int authenticate(StatusType* status, IClientBlock* cBlock) = 0; + }; + + template + class IUserFieldBaseImpl : public Base + { + public: + typedef IUserField Declaration; + + IUserFieldBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->entered = &Name::cloopenteredDispatcher; + this->specified = &Name::cloopspecifiedDispatcher; + this->setEntered = &Name::cloopsetEnteredDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static int CLOOP_CARG cloopenteredDispatcher(IUserField* self) throw() + { + try + { + return static_cast(self)->Name::entered(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopspecifiedDispatcher(IUserField* self) throw() + { + try + { + return static_cast(self)->Name::specified(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetEnteredDispatcher(IUserField* self, IStatus* status, int newValue) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setEntered(&status2, newValue); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IUserFieldImpl : public IUserFieldBaseImpl + { + protected: + IUserFieldImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IUserFieldImpl() + { + } + + virtual int entered() = 0; + virtual int specified() = 0; + virtual void setEntered(StatusType* status, int newValue) = 0; + }; + + template + class ICharUserFieldBaseImpl : public Base + { + public: + typedef ICharUserField Declaration; + + ICharUserFieldBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->entered = &Name::cloopenteredDispatcher; + this->specified = &Name::cloopspecifiedDispatcher; + this->setEntered = &Name::cloopsetEnteredDispatcher; + this->get = &Name::cloopgetDispatcher; + this->set = &Name::cloopsetDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetDispatcher(ICharUserField* self) throw() + { + try + { + return static_cast(self)->Name::get(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetDispatcher(ICharUserField* self, IStatus* status, const char* newValue) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::set(&status2, newValue); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static int CLOOP_CARG cloopenteredDispatcher(IUserField* self) throw() + { + try + { + return static_cast(self)->Name::entered(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopspecifiedDispatcher(IUserField* self) throw() + { + try + { + return static_cast(self)->Name::specified(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetEnteredDispatcher(IUserField* self, IStatus* status, int newValue) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setEntered(&status2, newValue); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > > > + class ICharUserFieldImpl : public ICharUserFieldBaseImpl + { + protected: + ICharUserFieldImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ICharUserFieldImpl() + { + } + + virtual const char* get() = 0; + virtual void set(StatusType* status, const char* newValue) = 0; + }; + + template + class IIntUserFieldBaseImpl : public Base + { + public: + typedef IIntUserField Declaration; + + IIntUserFieldBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->entered = &Name::cloopenteredDispatcher; + this->specified = &Name::cloopspecifiedDispatcher; + this->setEntered = &Name::cloopsetEnteredDispatcher; + this->get = &Name::cloopgetDispatcher; + this->set = &Name::cloopsetDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static int CLOOP_CARG cloopgetDispatcher(IIntUserField* self) throw() + { + try + { + return static_cast(self)->Name::get(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetDispatcher(IIntUserField* self, IStatus* status, int newValue) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::set(&status2, newValue); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static int CLOOP_CARG cloopenteredDispatcher(IUserField* self) throw() + { + try + { + return static_cast(self)->Name::entered(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopspecifiedDispatcher(IUserField* self) throw() + { + try + { + return static_cast(self)->Name::specified(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetEnteredDispatcher(IUserField* self, IStatus* status, int newValue) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setEntered(&status2, newValue); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > > > + class IIntUserFieldImpl : public IIntUserFieldBaseImpl + { + protected: + IIntUserFieldImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IIntUserFieldImpl() + { + } + + virtual int get() = 0; + virtual void set(StatusType* status, int newValue) = 0; + }; + + template + class IUserBaseImpl : public Base + { + public: + typedef IUser Declaration; + + IUserBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->operation = &Name::cloopoperationDispatcher; + this->userName = &Name::cloopuserNameDispatcher; + this->password = &Name::clooppasswordDispatcher; + this->firstName = &Name::cloopfirstNameDispatcher; + this->lastName = &Name::clooplastNameDispatcher; + this->middleName = &Name::cloopmiddleNameDispatcher; + this->comment = &Name::cloopcommentDispatcher; + this->attributes = &Name::cloopattributesDispatcher; + this->active = &Name::cloopactiveDispatcher; + this->admin = &Name::cloopadminDispatcher; + this->clear = &Name::cloopclearDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopoperationDispatcher(IUser* self) throw() + { + try + { + return static_cast(self)->Name::operation(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ICharUserField* CLOOP_CARG cloopuserNameDispatcher(IUser* self) throw() + { + try + { + return static_cast(self)->Name::userName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ICharUserField* CLOOP_CARG clooppasswordDispatcher(IUser* self) throw() + { + try + { + return static_cast(self)->Name::password(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ICharUserField* CLOOP_CARG cloopfirstNameDispatcher(IUser* self) throw() + { + try + { + return static_cast(self)->Name::firstName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ICharUserField* CLOOP_CARG clooplastNameDispatcher(IUser* self) throw() + { + try + { + return static_cast(self)->Name::lastName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ICharUserField* CLOOP_CARG cloopmiddleNameDispatcher(IUser* self) throw() + { + try + { + return static_cast(self)->Name::middleName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ICharUserField* CLOOP_CARG cloopcommentDispatcher(IUser* self) throw() + { + try + { + return static_cast(self)->Name::comment(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ICharUserField* CLOOP_CARG cloopattributesDispatcher(IUser* self) throw() + { + try + { + return static_cast(self)->Name::attributes(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IIntUserField* CLOOP_CARG cloopactiveDispatcher(IUser* self) throw() + { + try + { + return static_cast(self)->Name::active(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IIntUserField* CLOOP_CARG cloopadminDispatcher(IUser* self) throw() + { + try + { + return static_cast(self)->Name::admin(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopclearDispatcher(IUser* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::clear(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IUserImpl : public IUserBaseImpl + { + protected: + IUserImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IUserImpl() + { + } + + virtual unsigned operation() = 0; + virtual ICharUserField* userName() = 0; + virtual ICharUserField* password() = 0; + virtual ICharUserField* firstName() = 0; + virtual ICharUserField* lastName() = 0; + virtual ICharUserField* middleName() = 0; + virtual ICharUserField* comment() = 0; + virtual ICharUserField* attributes() = 0; + virtual IIntUserField* active() = 0; + virtual IIntUserField* admin() = 0; + virtual void clear(StatusType* status) = 0; + }; + + template + class IListUsersBaseImpl : public Base + { + public: + typedef IListUsers Declaration; + + IListUsersBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->list = &Name::clooplistDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG clooplistDispatcher(IListUsers* self, IStatus* status, IUser* user) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::list(&status2, user); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IListUsersImpl : public IListUsersBaseImpl + { + protected: + IListUsersImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IListUsersImpl() + { + } + + virtual void list(StatusType* status, IUser* user) = 0; + }; + + template + class ILogonInfoBaseImpl : public Base + { + public: + typedef ILogonInfo Declaration; + + ILogonInfoBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->name = &Name::cloopnameDispatcher; + this->role = &Name::clooproleDispatcher; + this->networkProtocol = &Name::cloopnetworkProtocolDispatcher; + this->remoteAddress = &Name::cloopremoteAddressDispatcher; + this->authBlock = &Name::cloopauthBlockDispatcher; + this->attachment = &Name::cloopattachmentDispatcher; + this->transaction = &Name::clooptransactionDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopnameDispatcher(ILogonInfo* self) throw() + { + try + { + return static_cast(self)->Name::name(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG clooproleDispatcher(ILogonInfo* self) throw() + { + try + { + return static_cast(self)->Name::role(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopnetworkProtocolDispatcher(ILogonInfo* self) throw() + { + try + { + return static_cast(self)->Name::networkProtocol(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopremoteAddressDispatcher(ILogonInfo* self) throw() + { + try + { + return static_cast(self)->Name::remoteAddress(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const unsigned char* CLOOP_CARG cloopauthBlockDispatcher(ILogonInfo* self, unsigned* length) throw() + { + try + { + return static_cast(self)->Name::authBlock(length); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IAttachment* CLOOP_CARG cloopattachmentDispatcher(ILogonInfo* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::attachment(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG clooptransactionDispatcher(ILogonInfo* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::transaction(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + }; + + template > > + class ILogonInfoImpl : public ILogonInfoBaseImpl + { + protected: + ILogonInfoImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ILogonInfoImpl() + { + } + + virtual const char* name() = 0; + virtual const char* role() = 0; + virtual const char* networkProtocol() = 0; + virtual const char* remoteAddress() = 0; + virtual const unsigned char* authBlock(unsigned* length) = 0; + virtual IAttachment* attachment(StatusType* status) = 0; + virtual ITransaction* transaction(StatusType* status) = 0; + }; + + template + class IManagementBaseImpl : public Base + { + public: + typedef IManagement Declaration; + + IManagementBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->start = &Name::cloopstartDispatcher; + this->execute = &Name::cloopexecuteDispatcher; + this->commit = &Name::cloopcommitDispatcher; + this->rollback = &Name::clooprollbackDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopstartDispatcher(IManagement* self, IStatus* status, ILogonInfo* logonInfo) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::start(&status2, logonInfo); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static int CLOOP_CARG cloopexecuteDispatcher(IManagement* self, IStatus* status, IUser* user, IListUsers* callback) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::execute(&status2, user, callback); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopcommitDispatcher(IManagement* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::commit(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooprollbackDispatcher(IManagement* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::rollback(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > + class IManagementImpl : public IManagementBaseImpl + { + protected: + IManagementImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IManagementImpl() + { + } + + virtual void start(StatusType* status, ILogonInfo* logonInfo) = 0; + virtual int execute(StatusType* status, IUser* user, IListUsers* callback) = 0; + virtual void commit(StatusType* status) = 0; + virtual void rollback(StatusType* status) = 0; + }; + + template + class IAuthBlockBaseImpl : public Base + { + public: + typedef IAuthBlock Declaration; + + IAuthBlockBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getType = &Name::cloopgetTypeDispatcher; + this->getName = &Name::cloopgetNameDispatcher; + this->getPlugin = &Name::cloopgetPluginDispatcher; + this->getSecurityDb = &Name::cloopgetSecurityDbDispatcher; + this->getOriginalPlugin = &Name::cloopgetOriginalPluginDispatcher; + this->next = &Name::cloopnextDispatcher; + this->first = &Name::cloopfirstDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetTypeDispatcher(IAuthBlock* self) throw() + { + try + { + return static_cast(self)->Name::getType(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetNameDispatcher(IAuthBlock* self) throw() + { + try + { + return static_cast(self)->Name::getName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetPluginDispatcher(IAuthBlock* self) throw() + { + try + { + return static_cast(self)->Name::getPlugin(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetSecurityDbDispatcher(IAuthBlock* self) throw() + { + try + { + return static_cast(self)->Name::getSecurityDb(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetOriginalPluginDispatcher(IAuthBlock* self) throw() + { + try + { + return static_cast(self)->Name::getOriginalPlugin(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopnextDispatcher(IAuthBlock* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::next(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopfirstDispatcher(IAuthBlock* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::first(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + }; + + template > > + class IAuthBlockImpl : public IAuthBlockBaseImpl + { + protected: + IAuthBlockImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IAuthBlockImpl() + { + } + + virtual const char* getType() = 0; + virtual const char* getName() = 0; + virtual const char* getPlugin() = 0; + virtual const char* getSecurityDb() = 0; + virtual const char* getOriginalPlugin() = 0; + virtual FB_BOOLEAN next(StatusType* status) = 0; + virtual FB_BOOLEAN first(StatusType* status) = 0; + }; + + template + class IWireCryptPluginBaseImpl : public Base + { + public: + typedef IWireCryptPlugin Declaration; + + IWireCryptPluginBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->getKnownTypes = &Name::cloopgetKnownTypesDispatcher; + this->setKey = &Name::cloopsetKeyDispatcher; + this->encrypt = &Name::cloopencryptDispatcher; + this->decrypt = &Name::cloopdecryptDispatcher; + this->getSpecificData = &Name::cloopgetSpecificDataDispatcher; + this->setSpecificData = &Name::cloopsetSpecificDataDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetKnownTypesDispatcher(IWireCryptPlugin* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getKnownTypes(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetKeyDispatcher(IWireCryptPlugin* self, IStatus* status, ICryptKey* key) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setKey(&status2, key); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopencryptDispatcher(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::encrypt(&status2, length, from, to); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdecryptDispatcher(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::decrypt(&status2, length, from, to); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static const unsigned char* CLOOP_CARG cloopgetSpecificDataDispatcher(IWireCryptPlugin* self, IStatus* status, const char* keyType, unsigned* length) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getSpecificData(&status2, keyType, length); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetSpecificDataDispatcher(IWireCryptPlugin* self, IStatus* status, const char* keyType, unsigned length, const unsigned char* data) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setSpecificData(&status2, keyType, length, data); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > + class IWireCryptPluginImpl : public IWireCryptPluginBaseImpl + { + protected: + IWireCryptPluginImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IWireCryptPluginImpl() + { + } + + virtual const char* getKnownTypes(StatusType* status) = 0; + virtual void setKey(StatusType* status, ICryptKey* key) = 0; + virtual void encrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; + virtual void decrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; + virtual const unsigned char* getSpecificData(StatusType* status, const char* keyType, unsigned* length) = 0; + virtual void setSpecificData(StatusType* status, const char* keyType, unsigned length, const unsigned char* data) = 0; + }; + + template + class ICryptKeyCallbackBaseImpl : public Base + { + public: + typedef ICryptKeyCallback Declaration; + + ICryptKeyCallbackBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->callback = &Name::cloopcallbackDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopcallbackDispatcher(ICryptKeyCallback* self, unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) throw() + { + try + { + return static_cast(self)->Name::callback(dataLength, data, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ICryptKeyCallbackImpl : public ICryptKeyCallbackBaseImpl + { + protected: + ICryptKeyCallbackImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ICryptKeyCallbackImpl() + { + } + + virtual unsigned callback(unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) = 0; + }; + + template + class IKeyHolderPluginBaseImpl : public Base + { + public: + typedef IKeyHolderPlugin Declaration; + + IKeyHolderPluginBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->keyCallback = &Name::cloopkeyCallbackDispatcher; + this->keyHandle = &Name::cloopkeyHandleDispatcher; + this->useOnlyOwnKeys = &Name::cloopuseOnlyOwnKeysDispatcher; + this->chainHandle = &Name::cloopchainHandleDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static int CLOOP_CARG cloopkeyCallbackDispatcher(IKeyHolderPlugin* self, IStatus* status, ICryptKeyCallback* callback) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::keyCallback(&status2, callback); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ICryptKeyCallback* CLOOP_CARG cloopkeyHandleDispatcher(IKeyHolderPlugin* self, IStatus* status, const char* keyName) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::keyHandle(&status2, keyName); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopuseOnlyOwnKeysDispatcher(IKeyHolderPlugin* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::useOnlyOwnKeys(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ICryptKeyCallback* CLOOP_CARG cloopchainHandleDispatcher(IKeyHolderPlugin* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::chainHandle(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > + class IKeyHolderPluginImpl : public IKeyHolderPluginBaseImpl + { + protected: + IKeyHolderPluginImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IKeyHolderPluginImpl() + { + } + + virtual int keyCallback(StatusType* status, ICryptKeyCallback* callback) = 0; + virtual ICryptKeyCallback* keyHandle(StatusType* status, const char* keyName) = 0; + virtual FB_BOOLEAN useOnlyOwnKeys(StatusType* status) = 0; + virtual ICryptKeyCallback* chainHandle(StatusType* status) = 0; + }; + + template + class IDbCryptInfoBaseImpl : public Base + { + public: + typedef IDbCryptInfo Declaration; + + IDbCryptInfoBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getDatabaseFullPath = &Name::cloopgetDatabaseFullPathDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetDatabaseFullPathDispatcher(IDbCryptInfo* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getDatabaseFullPath(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IDbCryptInfoImpl : public IDbCryptInfoBaseImpl + { + protected: + IDbCryptInfoImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IDbCryptInfoImpl() + { + } + + virtual const char* getDatabaseFullPath(StatusType* status) = 0; + }; + + template + class IDbCryptPluginBaseImpl : public Base + { + public: + typedef IDbCryptPlugin Declaration; + + IDbCryptPluginBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->setKey = &Name::cloopsetKeyDispatcher; + this->encrypt = &Name::cloopencryptDispatcher; + this->decrypt = &Name::cloopdecryptDispatcher; + this->setInfo = &Name::cloopsetInfoDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetKeyDispatcher(IDbCryptPlugin* self, IStatus* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setKey(&status2, length, sources, keyName); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopencryptDispatcher(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::encrypt(&status2, length, from, to); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdecryptDispatcher(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::decrypt(&status2, length, from, to); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetInfoDispatcher(IDbCryptPlugin* self, IStatus* status, IDbCryptInfo* info) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setInfo(&status2, info); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > + class IDbCryptPluginImpl : public IDbCryptPluginBaseImpl + { + protected: + IDbCryptPluginImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IDbCryptPluginImpl() + { + } + + virtual void setKey(StatusType* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) = 0; + virtual void encrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; + virtual void decrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; + virtual void setInfo(StatusType* status, IDbCryptInfo* info) = 0; + }; + + template + class IExternalContextBaseImpl : public Base + { + public: + typedef IExternalContext Declaration; + + IExternalContextBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getMaster = &Name::cloopgetMasterDispatcher; + this->getEngine = &Name::cloopgetEngineDispatcher; + this->getAttachment = &Name::cloopgetAttachmentDispatcher; + this->getTransaction = &Name::cloopgetTransactionDispatcher; + this->getUserName = &Name::cloopgetUserNameDispatcher; + this->getDatabaseName = &Name::cloopgetDatabaseNameDispatcher; + this->getClientCharSet = &Name::cloopgetClientCharSetDispatcher; + this->obtainInfoCode = &Name::cloopobtainInfoCodeDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->setInfo = &Name::cloopsetInfoDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static IMaster* CLOOP_CARG cloopgetMasterDispatcher(IExternalContext* self) throw() + { + try + { + return static_cast(self)->Name::getMaster(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IExternalEngine* CLOOP_CARG cloopgetEngineDispatcher(IExternalContext* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getEngine(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IAttachment* CLOOP_CARG cloopgetAttachmentDispatcher(IExternalContext* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getAttachment(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopgetTransactionDispatcher(IExternalContext* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getTransaction(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetUserNameDispatcher(IExternalContext* self) throw() + { + try + { + return static_cast(self)->Name::getUserName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetDatabaseNameDispatcher(IExternalContext* self) throw() + { + try + { + return static_cast(self)->Name::getDatabaseName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetClientCharSetDispatcher(IExternalContext* self) throw() + { + try + { + return static_cast(self)->Name::getClientCharSet(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopobtainInfoCodeDispatcher(IExternalContext* self) throw() + { + try + { + return static_cast(self)->Name::obtainInfoCode(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void* CLOOP_CARG cloopgetInfoDispatcher(IExternalContext* self, int code) throw() + { + try + { + return static_cast(self)->Name::getInfo(code); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void* CLOOP_CARG cloopsetInfoDispatcher(IExternalContext* self, int code, void* value) throw() + { + try + { + return static_cast(self)->Name::setInfo(code, value); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class IExternalContextImpl : public IExternalContextBaseImpl + { + protected: + IExternalContextImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IExternalContextImpl() + { + } + + virtual IMaster* getMaster() = 0; + virtual IExternalEngine* getEngine(StatusType* status) = 0; + virtual IAttachment* getAttachment(StatusType* status) = 0; + virtual ITransaction* getTransaction(StatusType* status) = 0; + virtual const char* getUserName() = 0; + virtual const char* getDatabaseName() = 0; + virtual const char* getClientCharSet() = 0; + virtual int obtainInfoCode() = 0; + virtual void* getInfo(int code) = 0; + virtual void* setInfo(int code, void* value) = 0; + }; + + template + class IExternalResultSetBaseImpl : public Base + { + public: + typedef IExternalResultSet Declaration; + + IExternalResultSetBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->fetch = &Name::cloopfetchDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static FB_BOOLEAN CLOOP_CARG cloopfetchDispatcher(IExternalResultSet* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetch(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IExternalResultSetImpl : public IExternalResultSetBaseImpl + { + protected: + IExternalResultSetImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IExternalResultSetImpl() + { + } + + virtual FB_BOOLEAN fetch(StatusType* status) = 0; + }; + + template + class IExternalFunctionBaseImpl : public Base + { + public: + typedef IExternalFunction Declaration; + + IExternalFunctionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->execute = &Name::cloopexecuteDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopgetCharSetDispatcher(IExternalFunction* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getCharSet(&status2, context, name, nameSize); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopexecuteDispatcher(IExternalFunction* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::execute(&status2, context, inMsg, outMsg); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IExternalFunctionImpl : public IExternalFunctionBaseImpl + { + protected: + IExternalFunctionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IExternalFunctionImpl() + { + } + + virtual void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) = 0; + virtual void execute(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) = 0; + }; + + template + class IExternalProcedureBaseImpl : public Base + { + public: + typedef IExternalProcedure Declaration; + + IExternalProcedureBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->open = &Name::cloopopenDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopgetCharSetDispatcher(IExternalProcedure* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getCharSet(&status2, context, name, nameSize); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IExternalResultSet* CLOOP_CARG cloopopenDispatcher(IExternalProcedure* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::open(&status2, context, inMsg, outMsg); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IExternalProcedureImpl : public IExternalProcedureBaseImpl + { + protected: + IExternalProcedureImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IExternalProcedureImpl() + { + } + + virtual void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) = 0; + virtual IExternalResultSet* open(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) = 0; + }; + + template + class IExternalTriggerBaseImpl : public Base + { + public: + typedef IExternalTrigger Declaration; + + IExternalTriggerBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->execute = &Name::cloopexecuteDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopgetCharSetDispatcher(IExternalTrigger* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getCharSet(&status2, context, name, nameSize); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopexecuteDispatcher(IExternalTrigger* self, IStatus* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::execute(&status2, context, action, oldMsg, newMsg); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IExternalTriggerImpl : public IExternalTriggerBaseImpl + { + protected: + IExternalTriggerImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IExternalTriggerImpl() + { + } + + virtual void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) = 0; + virtual void execute(StatusType* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) = 0; + }; + + template + class IRoutineMetadataBaseImpl : public Base + { + public: + typedef IRoutineMetadata Declaration; + + IRoutineMetadataBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getPackage = &Name::cloopgetPackageDispatcher; + this->getName = &Name::cloopgetNameDispatcher; + this->getEntryPoint = &Name::cloopgetEntryPointDispatcher; + this->getBody = &Name::cloopgetBodyDispatcher; + this->getInputMetadata = &Name::cloopgetInputMetadataDispatcher; + this->getOutputMetadata = &Name::cloopgetOutputMetadataDispatcher; + this->getTriggerMetadata = &Name::cloopgetTriggerMetadataDispatcher; + this->getTriggerTable = &Name::cloopgetTriggerTableDispatcher; + this->getTriggerType = &Name::cloopgetTriggerTypeDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetPackageDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getPackage(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetNameDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getName(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetEntryPointDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getEntryPoint(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetBodyDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getBody(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMessageMetadata* CLOOP_CARG cloopgetInputMetadataDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getInputMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMessageMetadata* CLOOP_CARG cloopgetOutputMetadataDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getOutputMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMessageMetadata* CLOOP_CARG cloopgetTriggerMetadataDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getTriggerMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetTriggerTableDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getTriggerTable(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetTriggerTypeDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getTriggerType(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + }; + + template > > + class IRoutineMetadataImpl : public IRoutineMetadataBaseImpl + { + protected: + IRoutineMetadataImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IRoutineMetadataImpl() + { + } + + virtual const char* getPackage(StatusType* status) const = 0; + virtual const char* getName(StatusType* status) const = 0; + virtual const char* getEntryPoint(StatusType* status) const = 0; + virtual const char* getBody(StatusType* status) const = 0; + virtual IMessageMetadata* getInputMetadata(StatusType* status) const = 0; + virtual IMessageMetadata* getOutputMetadata(StatusType* status) const = 0; + virtual IMessageMetadata* getTriggerMetadata(StatusType* status) const = 0; + virtual const char* getTriggerTable(StatusType* status) const = 0; + virtual unsigned getTriggerType(StatusType* status) const = 0; + }; + + template + class IExternalEngineBaseImpl : public Base + { + public: + typedef IExternalEngine Declaration; + + IExternalEngineBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->open = &Name::cloopopenDispatcher; + this->openAttachment = &Name::cloopopenAttachmentDispatcher; + this->closeAttachment = &Name::cloopcloseAttachmentDispatcher; + this->makeFunction = &Name::cloopmakeFunctionDispatcher; + this->makeProcedure = &Name::cloopmakeProcedureDispatcher; + this->makeTrigger = &Name::cloopmakeTriggerDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopopenDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, char* charSet, unsigned charSetSize) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::open(&status2, context, charSet, charSetSize); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopopenAttachmentDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::openAttachment(&status2, context); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcloseAttachmentDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::closeAttachment(&status2, context); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IExternalFunction* CLOOP_CARG cloopmakeFunctionDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::makeFunction(&status2, context, metadata, inBuilder, outBuilder); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IExternalProcedure* CLOOP_CARG cloopmakeProcedureDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::makeProcedure(&status2, context, metadata, inBuilder, outBuilder); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IExternalTrigger* CLOOP_CARG cloopmakeTriggerDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::makeTrigger(&status2, context, metadata, fieldsBuilder); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > + class IExternalEngineImpl : public IExternalEngineBaseImpl + { + protected: + IExternalEngineImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IExternalEngineImpl() + { + } + + virtual void open(StatusType* status, IExternalContext* context, char* charSet, unsigned charSetSize) = 0; + virtual void openAttachment(StatusType* status, IExternalContext* context) = 0; + virtual void closeAttachment(StatusType* status, IExternalContext* context) = 0; + virtual IExternalFunction* makeFunction(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; + virtual IExternalProcedure* makeProcedure(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; + virtual IExternalTrigger* makeTrigger(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) = 0; + }; + + template + class ITimerBaseImpl : public Base + { + public: + typedef ITimer Declaration; + + ITimerBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->handler = &Name::cloophandlerDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloophandlerDispatcher(ITimer* self) throw() + { + try + { + static_cast(self)->Name::handler(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class ITimerImpl : public ITimerBaseImpl + { + protected: + ITimerImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITimerImpl() + { + } + + virtual void handler() = 0; + }; + + template + class ITimerControlBaseImpl : public Base + { + public: + typedef ITimerControl Declaration; + + ITimerControlBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->start = &Name::cloopstartDispatcher; + this->stop = &Name::cloopstopDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopstartDispatcher(ITimerControl* self, IStatus* status, ITimer* timer, ISC_UINT64 microSeconds) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::start(&status2, timer, microSeconds); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopstopDispatcher(ITimerControl* self, IStatus* status, ITimer* timer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::stop(&status2, timer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class ITimerControlImpl : public ITimerControlBaseImpl + { + protected: + ITimerControlImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITimerControlImpl() + { + } + + virtual void start(StatusType* status, ITimer* timer, ISC_UINT64 microSeconds) = 0; + virtual void stop(StatusType* status, ITimer* timer) = 0; + }; + + template + class IVersionCallbackBaseImpl : public Base + { + public: + typedef IVersionCallback Declaration; + + IVersionCallbackBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->callback = &Name::cloopcallbackDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopcallbackDispatcher(IVersionCallback* self, IStatus* status, const char* text) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::callback(&status2, text); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IVersionCallbackImpl : public IVersionCallbackBaseImpl + { + protected: + IVersionCallbackImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IVersionCallbackImpl() + { + } + + virtual void callback(StatusType* status, const char* text) = 0; + }; + + template + class IUtilBaseImpl : public Base + { + public: + typedef IUtil Declaration; + + IUtilBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getFbVersion = &Name::cloopgetFbVersionDispatcher; + this->loadBlob = &Name::clooploadBlobDispatcher; + this->dumpBlob = &Name::cloopdumpBlobDispatcher; + this->getPerfCounters = &Name::cloopgetPerfCountersDispatcher; + this->executeCreateDatabase = &Name::cloopexecuteCreateDatabaseDispatcher; + this->decodeDate = &Name::cloopdecodeDateDispatcher; + this->decodeTime = &Name::cloopdecodeTimeDispatcher; + this->encodeDate = &Name::cloopencodeDateDispatcher; + this->encodeTime = &Name::cloopencodeTimeDispatcher; + this->formatStatus = &Name::cloopformatStatusDispatcher; + this->getClientVersion = &Name::cloopgetClientVersionDispatcher; + this->getXpbBuilder = &Name::cloopgetXpbBuilderDispatcher; + this->setOffsets = &Name::cloopsetOffsetsDispatcher; + this->getDecFloat16 = &Name::cloopgetDecFloat16Dispatcher; + this->getDecFloat34 = &Name::cloopgetDecFloat34Dispatcher; + this->decodeTimeTz = &Name::cloopdecodeTimeTzDispatcher; + this->decodeTimeStampTz = &Name::cloopdecodeTimeStampTzDispatcher; + this->encodeTimeTz = &Name::cloopencodeTimeTzDispatcher; + this->encodeTimeStampTz = &Name::cloopencodeTimeStampTzDispatcher; + this->getInt128 = &Name::cloopgetInt128Dispatcher; + this->decodeTimeTzEx = &Name::cloopdecodeTimeTzExDispatcher; + this->decodeTimeStampTzEx = &Name::cloopdecodeTimeStampTzExDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopgetFbVersionDispatcher(IUtil* self, IStatus* status, IAttachment* att, IVersionCallback* callback) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getFbVersion(&status2, att, callback); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooploadBlobDispatcher(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::loadBlob(&status2, blobId, att, tra, file, txt); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdumpBlobDispatcher(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::dumpBlob(&status2, blobId, att, tra, file, txt); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopgetPerfCountersDispatcher(IUtil* self, IStatus* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getPerfCounters(&status2, att, countersSet, counters); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IAttachment* CLOOP_CARG cloopexecuteCreateDatabaseDispatcher(IUtil* self, IStatus* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::executeCreateDatabase(&status2, stmtLength, creatDBstatement, dialect, stmtIsCreateDb); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdecodeDateDispatcher(IUtil* self, ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) throw() + { + try + { + static_cast(self)->Name::decodeDate(date, year, month, day); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopdecodeTimeDispatcher(IUtil* self, ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) throw() + { + try + { + static_cast(self)->Name::decodeTime(time, hours, minutes, seconds, fractions); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static ISC_DATE CLOOP_CARG cloopencodeDateDispatcher(IUtil* self, unsigned year, unsigned month, unsigned day) throw() + { + try + { + return static_cast(self)->Name::encodeDate(year, month, day); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_TIME CLOOP_CARG cloopencodeTimeDispatcher(IUtil* self, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) throw() + { + try + { + return static_cast(self)->Name::encodeTime(hours, minutes, seconds, fractions); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopformatStatusDispatcher(IUtil* self, char* buffer, unsigned bufferSize, IStatus* status) throw() + { + try + { + return static_cast(self)->Name::formatStatus(buffer, bufferSize, status); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetClientVersionDispatcher(IUtil* self) throw() + { + try + { + return static_cast(self)->Name::getClientVersion(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IXpbBuilder* CLOOP_CARG cloopgetXpbBuilderDispatcher(IUtil* self, IStatus* status, unsigned kind, const unsigned char* buf, unsigned len) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getXpbBuilder(&status2, kind, buf, len); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopsetOffsetsDispatcher(IUtil* self, IStatus* status, IMessageMetadata* metadata, IOffsetsCallback* callback) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::setOffsets(&status2, metadata, callback); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IDecFloat16* CLOOP_CARG cloopgetDecFloat16Dispatcher(IUtil* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getDecFloat16(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IDecFloat34* CLOOP_CARG cloopgetDecFloat34Dispatcher(IUtil* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getDecFloat34(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdecodeTimeTzDispatcher(IUtil* self, IStatus* status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::decodeTimeTz(&status2, timeTz, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdecodeTimeStampTzDispatcher(IUtil* self, IStatus* status, const ISC_TIMESTAMP_TZ* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::decodeTimeStampTz(&status2, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopencodeTimeTzDispatcher(IUtil* self, IStatus* status, ISC_TIME_TZ* timeTz, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::encodeTimeTz(&status2, timeTz, hours, minutes, seconds, fractions, timeZone); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopencodeTimeStampTzDispatcher(IUtil* self, IStatus* status, ISC_TIMESTAMP_TZ* timeStampTz, unsigned year, unsigned month, unsigned day, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::encodeTimeStampTz(&status2, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZone); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IInt128* CLOOP_CARG cloopgetInt128Dispatcher(IUtil* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getInt128(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdecodeTimeTzExDispatcher(IUtil* self, IStatus* status, const ISC_TIME_TZ_EX* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::decodeTimeTzEx(&status2, timeTz, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdecodeTimeStampTzExDispatcher(IUtil* self, IStatus* status, const ISC_TIMESTAMP_TZ_EX* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::decodeTimeStampTzEx(&status2, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IUtilImpl : public IUtilBaseImpl + { + protected: + IUtilImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IUtilImpl() + { + } + + virtual void getFbVersion(StatusType* status, IAttachment* att, IVersionCallback* callback) = 0; + virtual void loadBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) = 0; + virtual void dumpBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) = 0; + virtual void getPerfCounters(StatusType* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) = 0; + virtual IAttachment* executeCreateDatabase(StatusType* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) = 0; + virtual void decodeDate(ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) = 0; + virtual void decodeTime(ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) = 0; + virtual ISC_DATE encodeDate(unsigned year, unsigned month, unsigned day) = 0; + virtual ISC_TIME encodeTime(unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) = 0; + virtual unsigned formatStatus(char* buffer, unsigned bufferSize, IStatus* status) = 0; + virtual unsigned getClientVersion() = 0; + virtual IXpbBuilder* getXpbBuilder(StatusType* status, unsigned kind, const unsigned char* buf, unsigned len) = 0; + virtual unsigned setOffsets(StatusType* status, IMessageMetadata* metadata, IOffsetsCallback* callback) = 0; + virtual IDecFloat16* getDecFloat16(StatusType* status) = 0; + virtual IDecFloat34* getDecFloat34(StatusType* status) = 0; + virtual void decodeTimeTz(StatusType* status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) = 0; + virtual void decodeTimeStampTz(StatusType* status, const ISC_TIMESTAMP_TZ* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) = 0; + virtual void encodeTimeTz(StatusType* status, ISC_TIME_TZ* timeTz, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) = 0; + virtual void encodeTimeStampTz(StatusType* status, ISC_TIMESTAMP_TZ* timeStampTz, unsigned year, unsigned month, unsigned day, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) = 0; + virtual IInt128* getInt128(StatusType* status) = 0; + virtual void decodeTimeTzEx(StatusType* status, const ISC_TIME_TZ_EX* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) = 0; + virtual void decodeTimeStampTzEx(StatusType* status, const ISC_TIMESTAMP_TZ_EX* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) = 0; + }; + + template + class IOffsetsCallbackBaseImpl : public Base + { + public: + typedef IOffsetsCallback Declaration; + + IOffsetsCallbackBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->setOffset = &Name::cloopsetOffsetDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetOffsetDispatcher(IOffsetsCallback* self, IStatus* status, unsigned index, unsigned offset, unsigned nullOffset) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setOffset(&status2, index, offset, nullOffset); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IOffsetsCallbackImpl : public IOffsetsCallbackBaseImpl + { + protected: + IOffsetsCallbackImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IOffsetsCallbackImpl() + { + } + + virtual void setOffset(StatusType* status, unsigned index, unsigned offset, unsigned nullOffset) = 0; + }; + + template + class IXpbBuilderBaseImpl : public Base + { + public: + typedef IXpbBuilder Declaration; + + IXpbBuilderBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->clear = &Name::cloopclearDispatcher; + this->removeCurrent = &Name::cloopremoveCurrentDispatcher; + this->insertInt = &Name::cloopinsertIntDispatcher; + this->insertBigInt = &Name::cloopinsertBigIntDispatcher; + this->insertBytes = &Name::cloopinsertBytesDispatcher; + this->insertString = &Name::cloopinsertStringDispatcher; + this->insertTag = &Name::cloopinsertTagDispatcher; + this->isEof = &Name::cloopisEofDispatcher; + this->moveNext = &Name::cloopmoveNextDispatcher; + this->rewind = &Name::clooprewindDispatcher; + this->findFirst = &Name::cloopfindFirstDispatcher; + this->findNext = &Name::cloopfindNextDispatcher; + this->getTag = &Name::cloopgetTagDispatcher; + this->getLength = &Name::cloopgetLengthDispatcher; + this->getInt = &Name::cloopgetIntDispatcher; + this->getBigInt = &Name::cloopgetBigIntDispatcher; + this->getString = &Name::cloopgetStringDispatcher; + this->getBytes = &Name::cloopgetBytesDispatcher; + this->getBufferLength = &Name::cloopgetBufferLengthDispatcher; + this->getBuffer = &Name::cloopgetBufferDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopclearDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::clear(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopremoveCurrentDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::removeCurrent(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopinsertIntDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, int value) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::insertInt(&status2, tag, value); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopinsertBigIntDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, ISC_INT64 value) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::insertBigInt(&status2, tag, value); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopinsertBytesDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, const void* bytes, unsigned length) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::insertBytes(&status2, tag, bytes, length); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopinsertStringDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, const char* str) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::insertString(&status2, tag, str); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopinsertTagDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::insertTag(&status2, tag); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopisEofDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::isEof(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopmoveNextDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::moveNext(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooprewindDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::rewind(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopfindFirstDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::findFirst(&status2, tag); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopfindNextDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::findNext(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned char CLOOP_CARG cloopgetTagDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getTag(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetLengthDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getLength(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetIntDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getInt(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopgetBigIntDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getBigInt(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetStringDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getString(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const unsigned char* CLOOP_CARG cloopgetBytesDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getBytes(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetBufferLengthDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getBufferLength(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const unsigned char* CLOOP_CARG cloopgetBufferDispatcher(IXpbBuilder* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getBuffer(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IXpbBuilderImpl : public IXpbBuilderBaseImpl + { + protected: + IXpbBuilderImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IXpbBuilderImpl() + { + } + + virtual void clear(StatusType* status) = 0; + virtual void removeCurrent(StatusType* status) = 0; + virtual void insertInt(StatusType* status, unsigned char tag, int value) = 0; + virtual void insertBigInt(StatusType* status, unsigned char tag, ISC_INT64 value) = 0; + virtual void insertBytes(StatusType* status, unsigned char tag, const void* bytes, unsigned length) = 0; + virtual void insertString(StatusType* status, unsigned char tag, const char* str) = 0; + virtual void insertTag(StatusType* status, unsigned char tag) = 0; + virtual FB_BOOLEAN isEof(StatusType* status) = 0; + virtual void moveNext(StatusType* status) = 0; + virtual void rewind(StatusType* status) = 0; + virtual FB_BOOLEAN findFirst(StatusType* status, unsigned char tag) = 0; + virtual FB_BOOLEAN findNext(StatusType* status) = 0; + virtual unsigned char getTag(StatusType* status) = 0; + virtual unsigned getLength(StatusType* status) = 0; + virtual int getInt(StatusType* status) = 0; + virtual ISC_INT64 getBigInt(StatusType* status) = 0; + virtual const char* getString(StatusType* status) = 0; + virtual const unsigned char* getBytes(StatusType* status) = 0; + virtual unsigned getBufferLength(StatusType* status) = 0; + virtual const unsigned char* getBuffer(StatusType* status) = 0; + }; + + template + class ITraceConnectionBaseImpl : public Base + { + public: + typedef ITraceConnection Declaration; + + ITraceConnectionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getKind = &Name::cloopgetKindDispatcher; + this->getProcessID = &Name::cloopgetProcessIDDispatcher; + this->getUserName = &Name::cloopgetUserNameDispatcher; + this->getRoleName = &Name::cloopgetRoleNameDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->getRemoteProtocol = &Name::cloopgetRemoteProtocolDispatcher; + this->getRemoteAddress = &Name::cloopgetRemoteAddressDispatcher; + this->getRemoteProcessID = &Name::cloopgetRemoteProcessIDDispatcher; + this->getRemoteProcessName = &Name::cloopgetRemoteProcessNameDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopgetKindDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getKind(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetProcessIDDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getProcessID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetUserNameDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getUserName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRoleNameDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRoleName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetCharSetDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getCharSet(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRemoteProtocolDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteProtocol(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRemoteAddressDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteAddress(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetRemoteProcessIDDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteProcessID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRemoteProcessNameDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteProcessName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceConnectionImpl : public ITraceConnectionBaseImpl + { + protected: + ITraceConnectionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceConnectionImpl() + { + } + + virtual unsigned getKind() = 0; + virtual int getProcessID() = 0; + virtual const char* getUserName() = 0; + virtual const char* getRoleName() = 0; + virtual const char* getCharSet() = 0; + virtual const char* getRemoteProtocol() = 0; + virtual const char* getRemoteAddress() = 0; + virtual int getRemoteProcessID() = 0; + virtual const char* getRemoteProcessName() = 0; + }; + + template + class ITraceDatabaseConnectionBaseImpl : public Base + { + public: + typedef ITraceDatabaseConnection Declaration; + + ITraceDatabaseConnectionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getKind = &Name::cloopgetKindDispatcher; + this->getProcessID = &Name::cloopgetProcessIDDispatcher; + this->getUserName = &Name::cloopgetUserNameDispatcher; + this->getRoleName = &Name::cloopgetRoleNameDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->getRemoteProtocol = &Name::cloopgetRemoteProtocolDispatcher; + this->getRemoteAddress = &Name::cloopgetRemoteAddressDispatcher; + this->getRemoteProcessID = &Name::cloopgetRemoteProcessIDDispatcher; + this->getRemoteProcessName = &Name::cloopgetRemoteProcessNameDispatcher; + this->getConnectionID = &Name::cloopgetConnectionIDDispatcher; + this->getDatabaseName = &Name::cloopgetDatabaseNameDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static ISC_INT64 CLOOP_CARG cloopgetConnectionIDDispatcher(ITraceDatabaseConnection* self) throw() + { + try + { + return static_cast(self)->Name::getConnectionID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetDatabaseNameDispatcher(ITraceDatabaseConnection* self) throw() + { + try + { + return static_cast(self)->Name::getDatabaseName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetKindDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getKind(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetProcessIDDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getProcessID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetUserNameDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getUserName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRoleNameDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRoleName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetCharSetDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getCharSet(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRemoteProtocolDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteProtocol(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRemoteAddressDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteAddress(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetRemoteProcessIDDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteProcessID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRemoteProcessNameDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteProcessName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class ITraceDatabaseConnectionImpl : public ITraceDatabaseConnectionBaseImpl + { + protected: + ITraceDatabaseConnectionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceDatabaseConnectionImpl() + { + } + + virtual ISC_INT64 getConnectionID() = 0; + virtual const char* getDatabaseName() = 0; + }; + + template + class ITraceTransactionBaseImpl : public Base + { + public: + typedef ITraceTransaction Declaration; + + ITraceTransactionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getTransactionID = &Name::cloopgetTransactionIDDispatcher; + this->getReadOnly = &Name::cloopgetReadOnlyDispatcher; + this->getWait = &Name::cloopgetWaitDispatcher; + this->getIsolation = &Name::cloopgetIsolationDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + this->getInitialID = &Name::cloopgetInitialIDDispatcher; + this->getPreviousID = &Name::cloopgetPreviousIDDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static ISC_INT64 CLOOP_CARG cloopgetTransactionIDDispatcher(ITraceTransaction* self) throw() + { + try + { + return static_cast(self)->Name::getTransactionID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopgetReadOnlyDispatcher(ITraceTransaction* self) throw() + { + try + { + return static_cast(self)->Name::getReadOnly(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetWaitDispatcher(ITraceTransaction* self) throw() + { + try + { + return static_cast(self)->Name::getWait(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetIsolationDispatcher(ITraceTransaction* self) throw() + { + try + { + return static_cast(self)->Name::getIsolation(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceTransaction* self) throw() + { + try + { + return static_cast(self)->Name::getPerf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopgetInitialIDDispatcher(ITraceTransaction* self) throw() + { + try + { + return static_cast(self)->Name::getInitialID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopgetPreviousIDDispatcher(ITraceTransaction* self) throw() + { + try + { + return static_cast(self)->Name::getPreviousID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceTransactionImpl : public ITraceTransactionBaseImpl + { + protected: + ITraceTransactionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceTransactionImpl() + { + } + + virtual ISC_INT64 getTransactionID() = 0; + virtual FB_BOOLEAN getReadOnly() = 0; + virtual int getWait() = 0; + virtual unsigned getIsolation() = 0; + virtual PerformanceInfo* getPerf() = 0; + virtual ISC_INT64 getInitialID() = 0; + virtual ISC_INT64 getPreviousID() = 0; + }; + + template + class ITraceParamsBaseImpl : public Base + { + public: + typedef ITraceParams Declaration; + + ITraceParamsBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getCount = &Name::cloopgetCountDispatcher; + this->getParam = &Name::cloopgetParamDispatcher; + this->getTextUTF8 = &Name::cloopgetTextUTF8Dispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopgetCountDispatcher(ITraceParams* self) throw() + { + try + { + return static_cast(self)->Name::getCount(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const dsc* CLOOP_CARG cloopgetParamDispatcher(ITraceParams* self, unsigned idx) throw() + { + try + { + return static_cast(self)->Name::getParam(idx); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetTextUTF8Dispatcher(ITraceParams* self, IStatus* status, unsigned idx) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getTextUTF8(&status2, idx); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + }; + + template > > + class ITraceParamsImpl : public ITraceParamsBaseImpl + { + protected: + ITraceParamsImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceParamsImpl() + { + } + + virtual unsigned getCount() = 0; + virtual const dsc* getParam(unsigned idx) = 0; + virtual const char* getTextUTF8(StatusType* status, unsigned idx) = 0; + }; + + template + class ITraceStatementBaseImpl : public Base + { + public: + typedef ITraceStatement Declaration; + + ITraceStatementBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getStmtID = &Name::cloopgetStmtIDDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceStatement* self) throw() + { + try + { + return static_cast(self)->Name::getStmtID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceStatement* self) throw() + { + try + { + return static_cast(self)->Name::getPerf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceStatementImpl : public ITraceStatementBaseImpl + { + protected: + ITraceStatementImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceStatementImpl() + { + } + + virtual ISC_INT64 getStmtID() = 0; + virtual PerformanceInfo* getPerf() = 0; + }; + + template + class ITraceSQLStatementBaseImpl : public Base + { + public: + typedef ITraceSQLStatement Declaration; + + ITraceSQLStatementBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getStmtID = &Name::cloopgetStmtIDDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + this->getText = &Name::cloopgetTextDispatcher; + this->getPlan = &Name::cloopgetPlanDispatcher; + this->getInputs = &Name::cloopgetInputsDispatcher; + this->getTextUTF8 = &Name::cloopgetTextUTF8Dispatcher; + this->getExplainedPlan = &Name::cloopgetExplainedPlanDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceSQLStatement* self) throw() + { + try + { + return static_cast(self)->Name::getText(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetPlanDispatcher(ITraceSQLStatement* self) throw() + { + try + { + return static_cast(self)->Name::getPlan(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITraceParams* CLOOP_CARG cloopgetInputsDispatcher(ITraceSQLStatement* self) throw() + { + try + { + return static_cast(self)->Name::getInputs(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetTextUTF8Dispatcher(ITraceSQLStatement* self) throw() + { + try + { + return static_cast(self)->Name::getTextUTF8(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetExplainedPlanDispatcher(ITraceSQLStatement* self) throw() + { + try + { + return static_cast(self)->Name::getExplainedPlan(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceStatement* self) throw() + { + try + { + return static_cast(self)->Name::getStmtID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceStatement* self) throw() + { + try + { + return static_cast(self)->Name::getPerf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class ITraceSQLStatementImpl : public ITraceSQLStatementBaseImpl + { + protected: + ITraceSQLStatementImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceSQLStatementImpl() + { + } + + virtual const char* getText() = 0; + virtual const char* getPlan() = 0; + virtual ITraceParams* getInputs() = 0; + virtual const char* getTextUTF8() = 0; + virtual const char* getExplainedPlan() = 0; + }; + + template + class ITraceBLRStatementBaseImpl : public Base + { + public: + typedef ITraceBLRStatement Declaration; + + ITraceBLRStatementBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getStmtID = &Name::cloopgetStmtIDDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + this->getData = &Name::cloopgetDataDispatcher; + this->getDataLength = &Name::cloopgetDataLengthDispatcher; + this->getText = &Name::cloopgetTextDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(ITraceBLRStatement* self) throw() + { + try + { + return static_cast(self)->Name::getData(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetDataLengthDispatcher(ITraceBLRStatement* self) throw() + { + try + { + return static_cast(self)->Name::getDataLength(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceBLRStatement* self) throw() + { + try + { + return static_cast(self)->Name::getText(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceStatement* self) throw() + { + try + { + return static_cast(self)->Name::getStmtID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceStatement* self) throw() + { + try + { + return static_cast(self)->Name::getPerf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class ITraceBLRStatementImpl : public ITraceBLRStatementBaseImpl + { + protected: + ITraceBLRStatementImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceBLRStatementImpl() + { + } + + virtual const unsigned char* getData() = 0; + virtual unsigned getDataLength() = 0; + virtual const char* getText() = 0; + }; + + template + class ITraceDYNRequestBaseImpl : public Base + { + public: + typedef ITraceDYNRequest Declaration; + + ITraceDYNRequestBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getData = &Name::cloopgetDataDispatcher; + this->getDataLength = &Name::cloopgetDataLengthDispatcher; + this->getText = &Name::cloopgetTextDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(ITraceDYNRequest* self) throw() + { + try + { + return static_cast(self)->Name::getData(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetDataLengthDispatcher(ITraceDYNRequest* self) throw() + { + try + { + return static_cast(self)->Name::getDataLength(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceDYNRequest* self) throw() + { + try + { + return static_cast(self)->Name::getText(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceDYNRequestImpl : public ITraceDYNRequestBaseImpl + { + protected: + ITraceDYNRequestImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceDYNRequestImpl() + { + } + + virtual const unsigned char* getData() = 0; + virtual unsigned getDataLength() = 0; + virtual const char* getText() = 0; + }; + + template + class ITraceContextVariableBaseImpl : public Base + { + public: + typedef ITraceContextVariable Declaration; + + ITraceContextVariableBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getNameSpace = &Name::cloopgetNameSpaceDispatcher; + this->getVarName = &Name::cloopgetVarNameDispatcher; + this->getVarValue = &Name::cloopgetVarValueDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetNameSpaceDispatcher(ITraceContextVariable* self) throw() + { + try + { + return static_cast(self)->Name::getNameSpace(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetVarNameDispatcher(ITraceContextVariable* self) throw() + { + try + { + return static_cast(self)->Name::getVarName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetVarValueDispatcher(ITraceContextVariable* self) throw() + { + try + { + return static_cast(self)->Name::getVarValue(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceContextVariableImpl : public ITraceContextVariableBaseImpl + { + protected: + ITraceContextVariableImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceContextVariableImpl() + { + } + + virtual const char* getNameSpace() = 0; + virtual const char* getVarName() = 0; + virtual const char* getVarValue() = 0; + }; + + template + class ITraceProcedureBaseImpl : public Base + { + public: + typedef ITraceProcedure Declaration; + + ITraceProcedureBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getProcName = &Name::cloopgetProcNameDispatcher; + this->getInputs = &Name::cloopgetInputsDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetProcNameDispatcher(ITraceProcedure* self) throw() + { + try + { + return static_cast(self)->Name::getProcName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITraceParams* CLOOP_CARG cloopgetInputsDispatcher(ITraceProcedure* self) throw() + { + try + { + return static_cast(self)->Name::getInputs(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceProcedure* self) throw() + { + try + { + return static_cast(self)->Name::getPerf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceProcedureImpl : public ITraceProcedureBaseImpl + { + protected: + ITraceProcedureImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceProcedureImpl() + { + } + + virtual const char* getProcName() = 0; + virtual ITraceParams* getInputs() = 0; + virtual PerformanceInfo* getPerf() = 0; + }; + + template + class ITraceFunctionBaseImpl : public Base + { + public: + typedef ITraceFunction Declaration; + + ITraceFunctionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getFuncName = &Name::cloopgetFuncNameDispatcher; + this->getInputs = &Name::cloopgetInputsDispatcher; + this->getResult = &Name::cloopgetResultDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetFuncNameDispatcher(ITraceFunction* self) throw() + { + try + { + return static_cast(self)->Name::getFuncName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITraceParams* CLOOP_CARG cloopgetInputsDispatcher(ITraceFunction* self) throw() + { + try + { + return static_cast(self)->Name::getInputs(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITraceParams* CLOOP_CARG cloopgetResultDispatcher(ITraceFunction* self) throw() + { + try + { + return static_cast(self)->Name::getResult(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceFunction* self) throw() + { + try + { + return static_cast(self)->Name::getPerf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceFunctionImpl : public ITraceFunctionBaseImpl + { + protected: + ITraceFunctionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceFunctionImpl() + { + } + + virtual const char* getFuncName() = 0; + virtual ITraceParams* getInputs() = 0; + virtual ITraceParams* getResult() = 0; + virtual PerformanceInfo* getPerf() = 0; + }; + + template + class ITraceTriggerBaseImpl : public Base + { + public: + typedef ITraceTrigger Declaration; + + ITraceTriggerBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getTriggerName = &Name::cloopgetTriggerNameDispatcher; + this->getRelationName = &Name::cloopgetRelationNameDispatcher; + this->getAction = &Name::cloopgetActionDispatcher; + this->getWhich = &Name::cloopgetWhichDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetTriggerNameDispatcher(ITraceTrigger* self) throw() + { + try + { + return static_cast(self)->Name::getTriggerName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRelationNameDispatcher(ITraceTrigger* self) throw() + { + try + { + return static_cast(self)->Name::getRelationName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetActionDispatcher(ITraceTrigger* self) throw() + { + try + { + return static_cast(self)->Name::getAction(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetWhichDispatcher(ITraceTrigger* self) throw() + { + try + { + return static_cast(self)->Name::getWhich(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceTrigger* self) throw() + { + try + { + return static_cast(self)->Name::getPerf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceTriggerImpl : public ITraceTriggerBaseImpl + { + protected: + ITraceTriggerImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceTriggerImpl() + { + } + + virtual const char* getTriggerName() = 0; + virtual const char* getRelationName() = 0; + virtual int getAction() = 0; + virtual int getWhich() = 0; + virtual PerformanceInfo* getPerf() = 0; + }; + + template + class ITraceServiceConnectionBaseImpl : public Base + { + public: + typedef ITraceServiceConnection Declaration; + + ITraceServiceConnectionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getKind = &Name::cloopgetKindDispatcher; + this->getProcessID = &Name::cloopgetProcessIDDispatcher; + this->getUserName = &Name::cloopgetUserNameDispatcher; + this->getRoleName = &Name::cloopgetRoleNameDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->getRemoteProtocol = &Name::cloopgetRemoteProtocolDispatcher; + this->getRemoteAddress = &Name::cloopgetRemoteAddressDispatcher; + this->getRemoteProcessID = &Name::cloopgetRemoteProcessIDDispatcher; + this->getRemoteProcessName = &Name::cloopgetRemoteProcessNameDispatcher; + this->getServiceID = &Name::cloopgetServiceIDDispatcher; + this->getServiceMgr = &Name::cloopgetServiceMgrDispatcher; + this->getServiceName = &Name::cloopgetServiceNameDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void* CLOOP_CARG cloopgetServiceIDDispatcher(ITraceServiceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getServiceID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetServiceMgrDispatcher(ITraceServiceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getServiceMgr(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetServiceNameDispatcher(ITraceServiceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getServiceName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetKindDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getKind(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetProcessIDDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getProcessID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetUserNameDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getUserName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRoleNameDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRoleName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetCharSetDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getCharSet(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRemoteProtocolDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteProtocol(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRemoteAddressDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteAddress(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetRemoteProcessIDDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteProcessID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRemoteProcessNameDispatcher(ITraceConnection* self) throw() + { + try + { + return static_cast(self)->Name::getRemoteProcessName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class ITraceServiceConnectionImpl : public ITraceServiceConnectionBaseImpl + { + protected: + ITraceServiceConnectionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceServiceConnectionImpl() + { + } + + virtual void* getServiceID() = 0; + virtual const char* getServiceMgr() = 0; + virtual const char* getServiceName() = 0; + }; + + template + class ITraceStatusVectorBaseImpl : public Base + { + public: + typedef ITraceStatusVector Declaration; + + ITraceStatusVectorBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->hasError = &Name::cloophasErrorDispatcher; + this->hasWarning = &Name::cloophasWarningDispatcher; + this->getStatus = &Name::cloopgetStatusDispatcher; + this->getText = &Name::cloopgetTextDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static FB_BOOLEAN CLOOP_CARG cloophasErrorDispatcher(ITraceStatusVector* self) throw() + { + try + { + return static_cast(self)->Name::hasError(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloophasWarningDispatcher(ITraceStatusVector* self) throw() + { + try + { + return static_cast(self)->Name::hasWarning(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IStatus* CLOOP_CARG cloopgetStatusDispatcher(ITraceStatusVector* self) throw() + { + try + { + return static_cast(self)->Name::getStatus(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceStatusVector* self) throw() + { + try + { + return static_cast(self)->Name::getText(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceStatusVectorImpl : public ITraceStatusVectorBaseImpl + { + protected: + ITraceStatusVectorImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceStatusVectorImpl() + { + } + + virtual FB_BOOLEAN hasError() = 0; + virtual FB_BOOLEAN hasWarning() = 0; + virtual IStatus* getStatus() = 0; + virtual const char* getText() = 0; + }; + + template + class ITraceSweepInfoBaseImpl : public Base + { + public: + typedef ITraceSweepInfo Declaration; + + ITraceSweepInfoBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getOIT = &Name::cloopgetOITDispatcher; + this->getOST = &Name::cloopgetOSTDispatcher; + this->getOAT = &Name::cloopgetOATDispatcher; + this->getNext = &Name::cloopgetNextDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static ISC_INT64 CLOOP_CARG cloopgetOITDispatcher(ITraceSweepInfo* self) throw() + { + try + { + return static_cast(self)->Name::getOIT(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopgetOSTDispatcher(ITraceSweepInfo* self) throw() + { + try + { + return static_cast(self)->Name::getOST(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopgetOATDispatcher(ITraceSweepInfo* self) throw() + { + try + { + return static_cast(self)->Name::getOAT(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopgetNextDispatcher(ITraceSweepInfo* self) throw() + { + try + { + return static_cast(self)->Name::getNext(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceSweepInfo* self) throw() + { + try + { + return static_cast(self)->Name::getPerf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceSweepInfoImpl : public ITraceSweepInfoBaseImpl + { + protected: + ITraceSweepInfoImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceSweepInfoImpl() + { + } + + virtual ISC_INT64 getOIT() = 0; + virtual ISC_INT64 getOST() = 0; + virtual ISC_INT64 getOAT() = 0; + virtual ISC_INT64 getNext() = 0; + virtual PerformanceInfo* getPerf() = 0; + }; + + template + class ITraceLogWriterBaseImpl : public Base + { + public: + typedef ITraceLogWriter Declaration; + + ITraceLogWriterBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->write = &Name::cloopwriteDispatcher; + this->write_s = &Name::cloopwrite_sDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopwriteDispatcher(ITraceLogWriter* self, const void* buf, unsigned size) throw() + { + try + { + return static_cast(self)->Name::write(buf, size); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopwrite_sDispatcher(ITraceLogWriter* self, IStatus* status, const void* buf, unsigned size) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::write_s(&status2, buf, size); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class ITraceLogWriterImpl : public ITraceLogWriterBaseImpl + { + protected: + ITraceLogWriterImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceLogWriterImpl() + { + } + + virtual unsigned write(const void* buf, unsigned size) = 0; + virtual unsigned write_s(StatusType* status, const void* buf, unsigned size) = 0; + }; + + template + class ITraceInitInfoBaseImpl : public Base + { + public: + typedef ITraceInitInfo Declaration; + + ITraceInitInfoBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getConfigText = &Name::cloopgetConfigTextDispatcher; + this->getTraceSessionID = &Name::cloopgetTraceSessionIDDispatcher; + this->getTraceSessionName = &Name::cloopgetTraceSessionNameDispatcher; + this->getFirebirdRootDirectory = &Name::cloopgetFirebirdRootDirectoryDispatcher; + this->getDatabaseName = &Name::cloopgetDatabaseNameDispatcher; + this->getConnection = &Name::cloopgetConnectionDispatcher; + this->getLogWriter = &Name::cloopgetLogWriterDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetConfigTextDispatcher(ITraceInitInfo* self) throw() + { + try + { + return static_cast(self)->Name::getConfigText(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetTraceSessionIDDispatcher(ITraceInitInfo* self) throw() + { + try + { + return static_cast(self)->Name::getTraceSessionID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetTraceSessionNameDispatcher(ITraceInitInfo* self) throw() + { + try + { + return static_cast(self)->Name::getTraceSessionName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetFirebirdRootDirectoryDispatcher(ITraceInitInfo* self) throw() + { + try + { + return static_cast(self)->Name::getFirebirdRootDirectory(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetDatabaseNameDispatcher(ITraceInitInfo* self) throw() + { + try + { + return static_cast(self)->Name::getDatabaseName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITraceDatabaseConnection* CLOOP_CARG cloopgetConnectionDispatcher(ITraceInitInfo* self) throw() + { + try + { + return static_cast(self)->Name::getConnection(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITraceLogWriter* CLOOP_CARG cloopgetLogWriterDispatcher(ITraceInitInfo* self) throw() + { + try + { + return static_cast(self)->Name::getLogWriter(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ITraceInitInfoImpl : public ITraceInitInfoBaseImpl + { + protected: + ITraceInitInfoImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceInitInfoImpl() + { + } + + virtual const char* getConfigText() = 0; + virtual int getTraceSessionID() = 0; + virtual const char* getTraceSessionName() = 0; + virtual const char* getFirebirdRootDirectory() = 0; + virtual const char* getDatabaseName() = 0; + virtual ITraceDatabaseConnection* getConnection() = 0; + virtual ITraceLogWriter* getLogWriter() = 0; + }; + + template + class ITracePluginBaseImpl : public Base + { + public: + typedef ITracePlugin Declaration; + + ITracePluginBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->trace_get_error = &Name::clooptrace_get_errorDispatcher; + this->trace_attach = &Name::clooptrace_attachDispatcher; + this->trace_detach = &Name::clooptrace_detachDispatcher; + this->trace_transaction_start = &Name::clooptrace_transaction_startDispatcher; + this->trace_transaction_end = &Name::clooptrace_transaction_endDispatcher; + this->trace_proc_execute = &Name::clooptrace_proc_executeDispatcher; + this->trace_trigger_execute = &Name::clooptrace_trigger_executeDispatcher; + this->trace_set_context = &Name::clooptrace_set_contextDispatcher; + this->trace_dsql_prepare = &Name::clooptrace_dsql_prepareDispatcher; + this->trace_dsql_free = &Name::clooptrace_dsql_freeDispatcher; + this->trace_dsql_execute = &Name::clooptrace_dsql_executeDispatcher; + this->trace_blr_compile = &Name::clooptrace_blr_compileDispatcher; + this->trace_blr_execute = &Name::clooptrace_blr_executeDispatcher; + this->trace_dyn_execute = &Name::clooptrace_dyn_executeDispatcher; + this->trace_service_attach = &Name::clooptrace_service_attachDispatcher; + this->trace_service_start = &Name::clooptrace_service_startDispatcher; + this->trace_service_query = &Name::clooptrace_service_queryDispatcher; + this->trace_service_detach = &Name::clooptrace_service_detachDispatcher; + this->trace_event_error = &Name::clooptrace_event_errorDispatcher; + this->trace_event_sweep = &Name::clooptrace_event_sweepDispatcher; + this->trace_func_execute = &Name::clooptrace_func_executeDispatcher; + this->trace_dsql_restart = &Name::clooptrace_dsql_restartDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG clooptrace_get_errorDispatcher(ITracePlugin* self) throw() + { + try + { + return static_cast(self)->Name::trace_get_error(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_attachDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) throw() + { + try + { + return static_cast(self)->Name::trace_attach(connection, create_db, att_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_detachDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) throw() + { + try + { + return static_cast(self)->Name::trace_detach(connection, drop_db); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_transaction_startDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) throw() + { + try + { + return static_cast(self)->Name::trace_transaction_start(connection, transaction, tpb_length, tpb, tra_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_transaction_endDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) throw() + { + try + { + return static_cast(self)->Name::trace_transaction_end(connection, transaction, commit, retain_context, tra_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_proc_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) throw() + { + try + { + return static_cast(self)->Name::trace_proc_execute(connection, transaction, procedure, started, proc_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_trigger_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) throw() + { + try + { + return static_cast(self)->Name::trace_trigger_execute(connection, transaction, trigger, started, trig_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_set_contextDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) throw() + { + try + { + return static_cast(self)->Name::trace_set_context(connection, transaction, variable); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_prepareDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) throw() + { + try + { + return static_cast(self)->Name::trace_dsql_prepare(connection, transaction, statement, time_millis, req_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_freeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) throw() + { + try + { + return static_cast(self)->Name::trace_dsql_free(connection, statement, option); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) throw() + { + try + { + return static_cast(self)->Name::trace_dsql_execute(connection, transaction, statement, started, req_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_blr_compileDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) throw() + { + try + { + return static_cast(self)->Name::trace_blr_compile(connection, transaction, statement, time_millis, req_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_blr_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) throw() + { + try + { + return static_cast(self)->Name::trace_blr_execute(connection, transaction, statement, req_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_dyn_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) throw() + { + try + { + return static_cast(self)->Name::trace_dyn_execute(connection, transaction, request, time_millis, req_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_service_attachDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned att_result) throw() + { + try + { + return static_cast(self)->Name::trace_service_attach(service, att_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_service_startDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) throw() + { + try + { + return static_cast(self)->Name::trace_service_start(service, switches_length, switches, start_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_service_queryDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) throw() + { + try + { + return static_cast(self)->Name::trace_service_query(service, send_item_length, send_items, recv_item_length, recv_items, query_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_service_detachDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned detach_result) throw() + { + try + { + return static_cast(self)->Name::trace_service_detach(service, detach_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_event_errorDispatcher(ITracePlugin* self, ITraceConnection* connection, ITraceStatusVector* status, const char* function) throw() + { + try + { + return static_cast(self)->Name::trace_event_error(connection, status, function); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_event_sweepDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) throw() + { + try + { + return static_cast(self)->Name::trace_event_sweep(connection, sweep, sweep_state); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_func_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) throw() + { + try + { + return static_cast(self)->Name::trace_func_execute(connection, transaction, function, started, func_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_restartDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, unsigned number) throw() + { + try + { + return static_cast(self)->Name::trace_dsql_restart(connection, transaction, statement, number); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class ITracePluginImpl : public ITracePluginBaseImpl + { + protected: + ITracePluginImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITracePluginImpl() + { + } + + virtual const char* trace_get_error() = 0; + virtual FB_BOOLEAN trace_attach(ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) = 0; + virtual FB_BOOLEAN trace_detach(ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) = 0; + virtual FB_BOOLEAN trace_transaction_start(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) = 0; + virtual FB_BOOLEAN trace_transaction_end(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) = 0; + virtual FB_BOOLEAN trace_proc_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) = 0; + virtual FB_BOOLEAN trace_trigger_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) = 0; + virtual FB_BOOLEAN trace_set_context(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) = 0; + virtual FB_BOOLEAN trace_dsql_prepare(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) = 0; + virtual FB_BOOLEAN trace_dsql_free(ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) = 0; + virtual FB_BOOLEAN trace_dsql_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) = 0; + virtual FB_BOOLEAN trace_blr_compile(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) = 0; + virtual FB_BOOLEAN trace_blr_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) = 0; + virtual FB_BOOLEAN trace_dyn_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) = 0; + virtual FB_BOOLEAN trace_service_attach(ITraceServiceConnection* service, unsigned att_result) = 0; + virtual FB_BOOLEAN trace_service_start(ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) = 0; + virtual FB_BOOLEAN trace_service_query(ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) = 0; + virtual FB_BOOLEAN trace_service_detach(ITraceServiceConnection* service, unsigned detach_result) = 0; + virtual FB_BOOLEAN trace_event_error(ITraceConnection* connection, ITraceStatusVector* status, const char* function) = 0; + virtual FB_BOOLEAN trace_event_sweep(ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) = 0; + virtual FB_BOOLEAN trace_func_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) = 0; + virtual FB_BOOLEAN trace_dsql_restart(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, unsigned number) = 0; + }; + + template + class ITraceFactoryBaseImpl : public Base + { + public: + typedef ITraceFactory Declaration; + + ITraceFactoryBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->trace_needs = &Name::clooptrace_needsDispatcher; + this->trace_create = &Name::clooptrace_createDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static ISC_UINT64 CLOOP_CARG clooptrace_needsDispatcher(ITraceFactory* self) throw() + { + try + { + return static_cast(self)->Name::trace_needs(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITracePlugin* CLOOP_CARG clooptrace_createDispatcher(ITraceFactory* self, IStatus* status, ITraceInitInfo* init_info) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::trace_create(&status2, init_info); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > + class ITraceFactoryImpl : public ITraceFactoryBaseImpl + { + protected: + ITraceFactoryImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceFactoryImpl() + { + } + + virtual ISC_UINT64 trace_needs() = 0; + virtual ITracePlugin* trace_create(StatusType* status, ITraceInitInfo* init_info) = 0; + }; + + template + class IUdrFunctionFactoryBaseImpl : public Base + { + public: + typedef IUdrFunctionFactory Declaration; + + IUdrFunctionFactoryBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->setup = &Name::cloopsetupDispatcher; + this->newItem = &Name::cloopnewItemDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetupDispatcher(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setup(&status2, context, metadata, inBuilder, outBuilder); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IExternalFunction* CLOOP_CARG cloopnewItemDispatcher(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::newItem(&status2, context, metadata); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IUdrFunctionFactoryImpl : public IUdrFunctionFactoryBaseImpl + { + protected: + IUdrFunctionFactoryImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IUdrFunctionFactoryImpl() + { + } + + virtual void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; + virtual IExternalFunction* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) = 0; + }; + + template + class IUdrProcedureFactoryBaseImpl : public Base + { + public: + typedef IUdrProcedureFactory Declaration; + + IUdrProcedureFactoryBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->setup = &Name::cloopsetupDispatcher; + this->newItem = &Name::cloopnewItemDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetupDispatcher(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setup(&status2, context, metadata, inBuilder, outBuilder); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IExternalProcedure* CLOOP_CARG cloopnewItemDispatcher(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::newItem(&status2, context, metadata); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IUdrProcedureFactoryImpl : public IUdrProcedureFactoryBaseImpl + { + protected: + IUdrProcedureFactoryImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IUdrProcedureFactoryImpl() + { + } + + virtual void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; + virtual IExternalProcedure* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) = 0; + }; + + template + class IUdrTriggerFactoryBaseImpl : public Base + { + public: + typedef IUdrTriggerFactory Declaration; + + IUdrTriggerFactoryBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->setup = &Name::cloopsetupDispatcher; + this->newItem = &Name::cloopnewItemDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetupDispatcher(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setup(&status2, context, metadata, fieldsBuilder); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static IExternalTrigger* CLOOP_CARG cloopnewItemDispatcher(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::newItem(&status2, context, metadata); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IUdrTriggerFactoryImpl : public IUdrTriggerFactoryBaseImpl + { + protected: + IUdrTriggerFactoryImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IUdrTriggerFactoryImpl() + { + } + + virtual void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) = 0; + virtual IExternalTrigger* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) = 0; + }; + + template + class IUdrPluginBaseImpl : public Base + { + public: + typedef IUdrPlugin Declaration; + + IUdrPluginBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getMaster = &Name::cloopgetMasterDispatcher; + this->registerFunction = &Name::cloopregisterFunctionDispatcher; + this->registerProcedure = &Name::cloopregisterProcedureDispatcher; + this->registerTrigger = &Name::cloopregisterTriggerDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static IMaster* CLOOP_CARG cloopgetMasterDispatcher(IUdrPlugin* self) throw() + { + try + { + return static_cast(self)->Name::getMaster(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopregisterFunctionDispatcher(IUdrPlugin* self, IStatus* status, const char* name, IUdrFunctionFactory* factory) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::registerFunction(&status2, name, factory); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopregisterProcedureDispatcher(IUdrPlugin* self, IStatus* status, const char* name, IUdrProcedureFactory* factory) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::registerProcedure(&status2, name, factory); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopregisterTriggerDispatcher(IUdrPlugin* self, IStatus* status, const char* name, IUdrTriggerFactory* factory) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::registerTrigger(&status2, name, factory); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IUdrPluginImpl : public IUdrPluginBaseImpl + { + protected: + IUdrPluginImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IUdrPluginImpl() + { + } + + virtual IMaster* getMaster() = 0; + virtual void registerFunction(StatusType* status, const char* name, IUdrFunctionFactory* factory) = 0; + virtual void registerProcedure(StatusType* status, const char* name, IUdrProcedureFactory* factory) = 0; + virtual void registerTrigger(StatusType* status, const char* name, IUdrTriggerFactory* factory) = 0; + }; + + template + class IDecFloat16BaseImpl : public Base + { + public: + typedef IDecFloat16 Declaration; + + IDecFloat16BaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->toBcd = &Name::clooptoBcdDispatcher; + this->toString = &Name::clooptoStringDispatcher; + this->fromBcd = &Name::cloopfromBcdDispatcher; + this->fromString = &Name::cloopfromStringDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG clooptoBcdDispatcher(IDecFloat16* self, const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) throw() + { + try + { + static_cast(self)->Name::toBcd(from, sign, bcd, exp); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG clooptoStringDispatcher(IDecFloat16* self, IStatus* status, const FB_DEC16* from, unsigned bufferLength, char* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::toString(&status2, from, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopfromBcdDispatcher(IDecFloat16* self, int sign, const unsigned char* bcd, int exp, FB_DEC16* to) throw() + { + try + { + static_cast(self)->Name::fromBcd(sign, bcd, exp, to); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopfromStringDispatcher(IDecFloat16* self, IStatus* status, const char* from, FB_DEC16* to) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::fromString(&status2, from, to); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IDecFloat16Impl : public IDecFloat16BaseImpl + { + protected: + IDecFloat16Impl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IDecFloat16Impl() + { + } + + virtual void toBcd(const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) = 0; + virtual void toString(StatusType* status, const FB_DEC16* from, unsigned bufferLength, char* buffer) = 0; + virtual void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC16* to) = 0; + virtual void fromString(StatusType* status, const char* from, FB_DEC16* to) = 0; + }; + + template + class IDecFloat34BaseImpl : public Base + { + public: + typedef IDecFloat34 Declaration; + + IDecFloat34BaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->toBcd = &Name::clooptoBcdDispatcher; + this->toString = &Name::clooptoStringDispatcher; + this->fromBcd = &Name::cloopfromBcdDispatcher; + this->fromString = &Name::cloopfromStringDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG clooptoBcdDispatcher(IDecFloat34* self, const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) throw() + { + try + { + static_cast(self)->Name::toBcd(from, sign, bcd, exp); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG clooptoStringDispatcher(IDecFloat34* self, IStatus* status, const FB_DEC34* from, unsigned bufferLength, char* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::toString(&status2, from, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopfromBcdDispatcher(IDecFloat34* self, int sign, const unsigned char* bcd, int exp, FB_DEC34* to) throw() + { + try + { + static_cast(self)->Name::fromBcd(sign, bcd, exp, to); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopfromStringDispatcher(IDecFloat34* self, IStatus* status, const char* from, FB_DEC34* to) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::fromString(&status2, from, to); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IDecFloat34Impl : public IDecFloat34BaseImpl + { + protected: + IDecFloat34Impl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IDecFloat34Impl() + { + } + + virtual void toBcd(const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) = 0; + virtual void toString(StatusType* status, const FB_DEC34* from, unsigned bufferLength, char* buffer) = 0; + virtual void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC34* to) = 0; + virtual void fromString(StatusType* status, const char* from, FB_DEC34* to) = 0; + }; + + template + class IInt128BaseImpl : public Base + { + public: + typedef IInt128 Declaration; + + IInt128BaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->toString = &Name::clooptoStringDispatcher; + this->fromString = &Name::cloopfromStringDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG clooptoStringDispatcher(IInt128* self, IStatus* status, const FB_I128* from, int scale, unsigned bufferLength, char* buffer) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::toString(&status2, from, scale, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopfromStringDispatcher(IInt128* self, IStatus* status, int scale, const char* from, FB_I128* to) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::fromString(&status2, scale, from, to); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + }; + + template > > + class IInt128Impl : public IInt128BaseImpl + { + protected: + IInt128Impl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IInt128Impl() + { + } + + virtual void toString(StatusType* status, const FB_I128* from, int scale, unsigned bufferLength, char* buffer) = 0; + virtual void fromString(StatusType* status, int scale, const char* from, FB_I128* to) = 0; + }; + + template + class IReplicatedFieldBaseImpl : public Base + { + public: + typedef IReplicatedField Declaration; + + IReplicatedFieldBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getName = &Name::cloopgetNameDispatcher; + this->getType = &Name::cloopgetTypeDispatcher; + this->getSubType = &Name::cloopgetSubTypeDispatcher; + this->getScale = &Name::cloopgetScaleDispatcher; + this->getLength = &Name::cloopgetLengthDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->getData = &Name::cloopgetDataDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetNameDispatcher(IReplicatedField* self) throw() + { + try + { + return static_cast(self)->Name::getName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetTypeDispatcher(IReplicatedField* self) throw() + { + try + { + return static_cast(self)->Name::getType(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetSubTypeDispatcher(IReplicatedField* self) throw() + { + try + { + return static_cast(self)->Name::getSubType(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetScaleDispatcher(IReplicatedField* self) throw() + { + try + { + return static_cast(self)->Name::getScale(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetLengthDispatcher(IReplicatedField* self) throw() + { + try + { + return static_cast(self)->Name::getLength(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetCharSetDispatcher(IReplicatedField* self) throw() + { + try + { + return static_cast(self)->Name::getCharSet(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const void* CLOOP_CARG cloopgetDataDispatcher(IReplicatedField* self) throw() + { + try + { + return static_cast(self)->Name::getData(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class IReplicatedFieldImpl : public IReplicatedFieldBaseImpl + { + protected: + IReplicatedFieldImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IReplicatedFieldImpl() + { + } + + virtual const char* getName() = 0; + virtual unsigned getType() = 0; + virtual int getSubType() = 0; + virtual int getScale() = 0; + virtual unsigned getLength() = 0; + virtual unsigned getCharSet() = 0; + virtual const void* getData() = 0; + }; + + template + class IReplicatedRecordBaseImpl : public Base + { + public: + typedef IReplicatedRecord Declaration; + + IReplicatedRecordBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getCount = &Name::cloopgetCountDispatcher; + this->getField = &Name::cloopgetFieldDispatcher; + this->getRawLength = &Name::cloopgetRawLengthDispatcher; + this->getRawData = &Name::cloopgetRawDataDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopgetCountDispatcher(IReplicatedRecord* self) throw() + { + try + { + return static_cast(self)->Name::getCount(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IReplicatedField* CLOOP_CARG cloopgetFieldDispatcher(IReplicatedRecord* self, unsigned index) throw() + { + try + { + return static_cast(self)->Name::getField(index); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetRawLengthDispatcher(IReplicatedRecord* self) throw() + { + try + { + return static_cast(self)->Name::getRawLength(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const unsigned char* CLOOP_CARG cloopgetRawDataDispatcher(IReplicatedRecord* self) throw() + { + try + { + return static_cast(self)->Name::getRawData(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class IReplicatedRecordImpl : public IReplicatedRecordBaseImpl + { + protected: + IReplicatedRecordImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IReplicatedRecordImpl() + { + } + + virtual unsigned getCount() = 0; + virtual IReplicatedField* getField(unsigned index) = 0; + virtual unsigned getRawLength() = 0; + virtual const unsigned char* getRawData() = 0; + }; + + template + class IReplicatedTransactionBaseImpl : public Base + { + public: + typedef IReplicatedTransaction Declaration; + + IReplicatedTransactionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->prepare = &Name::cloopprepareDispatcher; + this->commit = &Name::cloopcommitDispatcher; + this->rollback = &Name::clooprollbackDispatcher; + this->startSavepoint = &Name::cloopstartSavepointDispatcher; + this->releaseSavepoint = &Name::cloopreleaseSavepointDispatcher; + this->rollbackSavepoint = &Name::clooprollbackSavepointDispatcher; + this->insertRecord = &Name::cloopinsertRecordDispatcher; + this->updateRecord = &Name::cloopupdateRecordDispatcher; + this->deleteRecord = &Name::cloopdeleteRecordDispatcher; + this->executeSql = &Name::cloopexecuteSqlDispatcher; + this->executeSqlIntl = &Name::cloopexecuteSqlIntlDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopprepareDispatcher(IReplicatedTransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::prepare(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcommitDispatcher(IReplicatedTransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::commit(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooprollbackDispatcher(IReplicatedTransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::rollback(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopstartSavepointDispatcher(IReplicatedTransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::startSavepoint(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopreleaseSavepointDispatcher(IReplicatedTransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::releaseSavepoint(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooprollbackSavepointDispatcher(IReplicatedTransaction* self, IStatus* status) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::rollbackSavepoint(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopinsertRecordDispatcher(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* record) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::insertRecord(&status2, name, record); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopupdateRecordDispatcher(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* orgRecord, IReplicatedRecord* newRecord) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::updateRecord(&status2, name, orgRecord, newRecord); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeleteRecordDispatcher(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* record) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deleteRecord(&status2, name, record); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopexecuteSqlDispatcher(IReplicatedTransaction* self, IStatus* status, const char* sql) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::executeSql(&status2, sql); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopexecuteSqlIntlDispatcher(IReplicatedTransaction* self, IStatus* status, unsigned charset, const char* sql) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::executeSqlIntl(&status2, charset, sql); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IReplicatedTransactionImpl : public IReplicatedTransactionBaseImpl + { + protected: + IReplicatedTransactionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IReplicatedTransactionImpl() + { + } + + virtual void prepare(StatusType* status) = 0; + virtual void commit(StatusType* status) = 0; + virtual void rollback(StatusType* status) = 0; + virtual void startSavepoint(StatusType* status) = 0; + virtual void releaseSavepoint(StatusType* status) = 0; + virtual void rollbackSavepoint(StatusType* status) = 0; + virtual void insertRecord(StatusType* status, const char* name, IReplicatedRecord* record) = 0; + virtual void updateRecord(StatusType* status, const char* name, IReplicatedRecord* orgRecord, IReplicatedRecord* newRecord) = 0; + virtual void deleteRecord(StatusType* status, const char* name, IReplicatedRecord* record) = 0; + virtual void executeSql(StatusType* status, const char* sql) = 0; + virtual void executeSqlIntl(StatusType* status, unsigned charset, const char* sql) = 0; + }; + + template + class IReplicatedSessionBaseImpl : public Base + { + public: + typedef IReplicatedSession Declaration; + + IReplicatedSessionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->init = &Name::cloopinitDispatcher; + this->startTransaction = &Name::cloopstartTransactionDispatcher; + this->cleanupTransaction = &Name::cloopcleanupTransactionDispatcher; + this->setSequence = &Name::cloopsetSequenceDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static FB_BOOLEAN CLOOP_CARG cloopinitDispatcher(IReplicatedSession* self, IStatus* status, IAttachment* attachment) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::init(&status2, attachment); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IReplicatedTransaction* CLOOP_CARG cloopstartTransactionDispatcher(IReplicatedSession* self, IStatus* status, ITransaction* transaction, ISC_INT64 number) throw() + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::startTransaction(&status2, transaction, number); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopcleanupTransactionDispatcher(IReplicatedSession* self, IStatus* status, ISC_INT64 number) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::cleanupTransaction(&status2, number); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetSequenceDispatcher(IReplicatedSession* self, IStatus* status, const char* name, ISC_INT64 value) throw() + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setSequence(&status2, name, value); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > > > + class IReplicatedSessionImpl : public IReplicatedSessionBaseImpl + { + protected: + IReplicatedSessionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IReplicatedSessionImpl() + { + } + + virtual FB_BOOLEAN init(StatusType* status, IAttachment* attachment) = 0; + virtual IReplicatedTransaction* startTransaction(StatusType* status, ITransaction* transaction, ISC_INT64 number) = 0; + virtual void cleanupTransaction(StatusType* status, ISC_INT64 number) = 0; + virtual void setSequence(StatusType* status, const char* name, ISC_INT64 value) = 0; + }; +}; + + +#endif // IDL_FB_INTERFACES_H diff --git a/src/firebird/include/firebird/Interface.h b/src/firebird/include/firebird/Interface.h new file mode 100644 index 00000000..5cda047b --- /dev/null +++ b/src/firebird/include/firebird/Interface.h @@ -0,0 +1,441 @@ +/* + * PROGRAM: Firebird interface. + * MODULE: firebird/Interface.h + * DESCRIPTION: Base class for all FB interfaces / plugins. + * + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Alex Peshkov + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2010 Alex Peshkov + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * + * + */ + +#ifndef FB_INTERFACE_H +#define FB_INTERFACE_H + +#include "../firebird/include/ibase.h" +#include + +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) +#define CLOOP_CARG __cdecl +#endif + +struct dsc; + +namespace Firebird +{ + +// Performance counters for individual table +typedef int ntrace_relation_t; +struct TraceCounts +{ + // Per-table performance counters, must correspond to RuntimeStatistics::StatType + // between RECORD_FIRST_ITEM and RECORD_LAST_ITEM + enum RecordCounters + { + SEQ_READS = 0, + IDX_READS, + UPDATES, + INSERTS, + DELETES, + BACKOUTS, + PURGES, + EXPUNGES, + LOCKS, + WAITS, + CONFLICTS, + BACKVERSION_READS, + FRAGMENT_READS, + RPT_READS, + IMGC + }; + + ntrace_relation_t trc_relation_id; // Relation ID + const char* trc_relation_name; // Relation name + const ISC_INT64* trc_counters; // Pointer to allow easy addition of new counters +}; + +// Performance statistics for operation +struct PerformanceInfo +{ + // IO performance counters, must correspond to RuntimeStatistics::StatType + // between PAGE_FETCHES and (not including) RECORD_FIRST_ITEM + enum PageCounters + { + FETCHES = 0, + READS, + MARKS, + WRITES + }; + + ISC_INT64 pin_time; // Total operation time in milliseconds + ISC_INT64* pin_counters; // Pointer to allow easy addition of new counters + + size_t pin_count; // Number of relations involved in analysis + struct TraceCounts* pin_tables; // Pointer to array with table stats + + ISC_INT64 pin_records_fetched; // records fetched from statement/procedure +}; + +inline const intptr_t* stubError() +{ + static const intptr_t codes[] = { + isc_arg_gds, isc_random, + isc_arg_string, (intptr_t) "Unrecognized exception in Status interface", + isc_arg_end + }; + + return codes; +} + +} // namespace Firebird + +#ifndef FB_UsedInYValve +#define FB_UsedInYValve false +#endif + +#include "IdlFbInterfaces.h" + +namespace Firebird +{ + class FbException + { + public: + FbException(IStatus* aStatus, const ISC_STATUS* vector) + { + aStatus->setErrors(vector); + status = aStatus->clone(); + } + + FbException(IStatus* aStatus) + : status(aStatus->clone()) + { + } + + FbException(const FbException& copy) + : status(copy.status->clone()) + { + } + + FbException& operator =(const FbException& copy) + { + status->dispose(); + status = copy.status->clone(); + return *this; + } + + virtual ~FbException() + { + status->dispose(); + } + + public: + static void check(ISC_STATUS code, IStatus* status, const ISC_STATUS* vector) + { + if (code != 0 && vector[1]) + throw FbException(status, vector); + } + + public: + IStatus* getStatus() const + { + return status; + } + + private: + IStatus* status; + }; + + template + class BaseStatusWrapper : public IStatusImpl + { + public: + BaseStatusWrapper(IStatus* aStatus) + : status(aStatus), + dirty(false) + { + } + + public: + static void catchException(IStatus* status) + { + if (!status) + return; + + try + { + throw; + } + catch (const FbException& e) + { + status->setErrors(e.getStatus()->getErrors()); + } + catch (...) + { + ISC_STATUS statusVector[] = { + isc_arg_gds, isc_random, + isc_arg_string, (ISC_STATUS) "Unrecognized C++ exception", + isc_arg_end}; + status->setErrors(statusVector); + } + } + + static void clearException(BaseStatusWrapper* status) + { + status->clearException(); + } + + void clearException() + { + if (dirty) + { + dirty = false; + status->init(); + } + } + + bool isDirty() const + { + return dirty; + } + + bool hasData() const + { + return getState() & IStatus::STATE_ERRORS; + } + + bool isEmpty() const + { + return !hasData(); + } + + static void setVersionError(IStatus* status, const char* interfaceName, + unsigned currentVersion, unsigned expectedVersion) + { + intptr_t codes[] = { + isc_arg_gds, + isc_interface_version_too_old, + isc_arg_number, + (intptr_t) expectedVersion, + isc_arg_number, + (intptr_t) currentVersion, + isc_arg_string, + (intptr_t) interfaceName, + isc_arg_end + }; + + status->setErrors(codes); + } + + public: + virtual void dispose() + { + // Disposes only the delegated status. Let the user destroy this instance. + status->dispose(); + } + + virtual void init() + { + clearException(); + } + + virtual unsigned getState() const + { + return dirty ? status->getState() : 0; + } + + virtual void setErrors2(unsigned length, const intptr_t* value) + { + dirty = true; + status->setErrors2(length, value); + } + + virtual void setWarnings2(unsigned length, const intptr_t* value) + { + dirty = true; + status->setWarnings2(length, value); + } + + virtual void setErrors(const intptr_t* value) + { + dirty = true; + status->setErrors(value); + } + + virtual void setWarnings(const intptr_t* value) + { + dirty = true; + status->setWarnings(value); + } + + virtual const intptr_t* getErrors() const + { + return dirty ? status->getErrors() : cleanStatus(); + } + + virtual const intptr_t* getWarnings() const + { + return dirty ? status->getWarnings() : cleanStatus(); + } + + virtual IStatus* clone() const + { + return status->clone(); + } + + protected: + IStatus* status; + bool dirty; + + static const intptr_t* cleanStatus() + { + static intptr_t clean[3] = {1, 0, 0}; + return clean; + } + }; + + class CheckStatusWrapper : public BaseStatusWrapper + { + public: + CheckStatusWrapper(IStatus* aStatus) + : BaseStatusWrapper(aStatus) + { + } + + public: + static void checkException(CheckStatusWrapper* /* status */) + { + } + }; + + class ThrowStatusWrapper : public BaseStatusWrapper + { + public: + ThrowStatusWrapper(IStatus* aStatus) + : BaseStatusWrapper(aStatus) + { + } + + public: + static void checkException(ThrowStatusWrapper* status) + { + if (status->dirty && (status->getState() & IStatus::STATE_ERRORS)) + throw FbException(status->status); + } + }; + +#ifdef FB_API_VER // internal hack + class Helper + { + public: + template + static isc_db_handle getIscDbHandle(StatusType* status, IAttachment* attachment) + { + if (!attachment) + return 0; + + ISC_STATUS_ARRAY statusVector = {0}; + isc_db_handle handle = 0; + + fb_get_database_handle(statusVector, &handle, attachment); + + if (!handle) + { + status->setErrors(statusVector); + StatusType::checkException(status); + } + + return handle; + } + + template + static isc_db_handle getIscDbHandle(StatusType* status, IExternalContext* context) + { + IAttachment* attachment = context->getAttachment(status); + + if (!attachment) + return 0; + + try + { + isc_db_handle handle = getIscDbHandle(status, attachment); + attachment->release(); + return handle; + } + catch (...) + { + attachment->release(); + throw; + } + } + + template + static isc_tr_handle getIscTrHandle(StatusType* status, ITransaction* transaction) + { + if (!transaction) + return 0; + + ISC_STATUS_ARRAY statusVector = {0}; + isc_tr_handle handle = 0; + + fb_get_transaction_handle(statusVector, &handle, transaction); + + if (!handle) + { + status->setErrors(statusVector); + StatusType::checkException(status); + } + + return handle; + } + + template + static isc_tr_handle getIscTrHandle(StatusType* status, IExternalContext* context) + { + ITransaction* transaction = context->getTransaction(status); + + if (!transaction) + return 0; + + try + { + isc_tr_handle handle = getIscTrHandle(status, transaction); + transaction->release(); + return handle; + } + catch (...) + { + transaction->release(); + throw; + } + } + }; +#endif // FB_API_VER + + // Additional API function. + // Should be used only in non-plugin modules. + // All plugins including providers should use passed at init time interface instead. + extern "C" IMaster* ISC_EXPORT fb_get_master_interface(); + +} // namespace Firebird + +#define FB_PLUGIN_ENTRY_POINT firebird_plugin +#define FB_UDR_PLUGIN_ENTRY_POINT firebird_udr_plugin + +#endif // FB_INTERFACE_H diff --git a/src/firebird/include/firebird/Message.h b/src/firebird/include/firebird/Message.h new file mode 100644 index 00000000..0b40b13f --- /dev/null +++ b/src/firebird/include/firebird/Message.h @@ -0,0 +1,555 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Adriano dos Santos Fernandes + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2011 Adriano dos Santos Fernandes + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ + +#ifndef FIREBIRD_MESSAGE_H +#define FIREBIRD_MESSAGE_H + +#include "ibase.h" +#include "./Interface.h" +#include "./impl/boost/preprocessor/seq/for_each_i.hpp" +#include +#include + +#if defined(__linux__) && defined(__i386__) +#define FB__INT64_ALIGNAS alignas(8) +#else +#define FB__INT64_ALIGNAS +#endif + +#define FB_MESSAGE(name, statusType, fields) \ + FB__MESSAGE_I(name, statusType, 2, FB_BOOST_PP_CAT(FB__MESSAGE_X fields, 0), ) + +#define FB__MESSAGE_X(x, y) ((x, y)) FB__MESSAGE_Y +#define FB__MESSAGE_Y(x, y) ((x, y)) FB__MESSAGE_X +#define FB__MESSAGE_X0 +#define FB__MESSAGE_Y0 + +#define FB_TRIGGER_MESSAGE(name, statusType, fields) \ + FB__MESSAGE_I(name, statusType, 3, FB_BOOST_PP_CAT(FB_TRIGGER_MESSAGE_X fields, 0), \ + FB_TRIGGER_MESSAGE_MOVE_NAMES(name, fields)) + +#define FB_TRIGGER_MESSAGE_X(x, y, z) ((x, y, z)) FB_TRIGGER_MESSAGE_Y +#define FB_TRIGGER_MESSAGE_Y(x, y, z) ((x, y, z)) FB_TRIGGER_MESSAGE_X +#define FB_TRIGGER_MESSAGE_X0 +#define FB_TRIGGER_MESSAGE_Y0 + +#define FB__MESSAGE_I(name, statusType, size, fields, moveNames) \ + struct name \ + { \ + struct Type \ + { \ + FB_BOOST_PP_SEQ_FOR_EACH_I(FB__MESSAGE_FIELD, size, fields) \ + }; \ + \ + static void setup(statusType* status, ::Firebird::IMetadataBuilder* builder) \ + { \ + unsigned index = 0; \ + moveNames \ + FB_BOOST_PP_SEQ_FOR_EACH_I(FB__MESSAGE_META, size, fields) \ + } \ + \ + name(statusType* status, ::Firebird::IMaster* master) \ + : desc(master, status, FB_BOOST_PP_SEQ_SIZE(fields), setup) \ + { \ + } \ + \ + ::Firebird::IMessageMetadata* getMetadata() const \ + { \ + return desc.getMetadata(); \ + } \ + \ + void clear() \ + { \ + memset(&data, 0, sizeof(data)); \ + } \ + \ + Type* getData() \ + { \ + return &data; \ + } \ + \ + const Type* getData() const \ + { \ + return &data; \ + } \ + \ + Type* operator ->() \ + { \ + return getData(); \ + } \ + \ + const Type* operator ->() const \ + { \ + return getData(); \ + } \ + \ + Type data; \ + ::Firebird::MessageDesc desc; \ + } + +#define FB__MESSAGE_FIELD(r, _, i, xy) \ + FB_BOOST_PP_CAT(FB__TYPE_, FB_BOOST_PP_TUPLE_ELEM(_, 0, xy)) FB_BOOST_PP_TUPLE_ELEM(_, 1, xy); \ + ISC_SHORT FB_BOOST_PP_CAT(FB_BOOST_PP_TUPLE_ELEM(_, 1, xy), Null); + +#define FB__MESSAGE_META(r, _, i, xy) \ + FB_BOOST_PP_CAT(FB__META_, FB_BOOST_PP_TUPLE_ELEM(_, 0, xy)) \ + ++index; + +// Types - metadata + +#define FB__META_FB_SCALED_SMALLINT(scale) \ + builder->setType(status, index, SQL_SHORT); \ + builder->setLength(status, index, sizeof(ISC_SHORT)); \ + builder->setScale(status, index, scale); + +#define FB__META_FB_SCALED_INTEGER(scale) \ + builder->setType(status, index, SQL_LONG); \ + builder->setLength(status, index, sizeof(ISC_LONG)); \ + builder->setScale(status, index, scale); + +#define FB__META_FB_SCALED_BIGINT(scale) \ + builder->setType(status, index, SQL_INT64); \ + builder->setLength(status, index, sizeof(ISC_INT64)); \ + builder->setScale(status, index, scale); + +#define FB__META_FB_FLOAT \ + builder->setType(status, index, SQL_FLOAT); \ + builder->setLength(status, index, sizeof(float)); + +#define FB__META_FB_DOUBLE \ + builder->setType(status, index, SQL_DOUBLE); \ + builder->setLength(status, index, sizeof(double)); + +#define FB__META_FB_DECFLOAT16 \ + builder->setType(status, index, SQL_DEC16); \ + builder->setLength(status, index, sizeof(FB_DEC16)); + +#define FB__META_FB_DECFLOAT34 \ + builder->setType(status, index, SQL_DEC34); \ + builder->setLength(status, index, sizeof(FB_DEC34)); + +#define FB__META_FB_BLOB \ + builder->setType(status, index, SQL_BLOB); \ + builder->setLength(status, index, sizeof(ISC_QUAD)); + +#define FB__META_FB_BOOLEAN \ + builder->setType(status, index, SQL_BOOLEAN); \ + builder->setLength(status, index, sizeof(FB_BOOLEAN)); + +#define FB__META_FB_DATE \ + builder->setType(status, index, SQL_DATE); \ + builder->setLength(status, index, sizeof(::Firebird::FbDate)); + +#define FB__META_FB_TIME \ + builder->setType(status, index, SQL_TIME); \ + builder->setLength(status, index, sizeof(::Firebird::FbTime)); + +#define FB__META_FB_TIME_TZ \ + builder->setType(status, index, SQL_TIME_TZ); \ + builder->setLength(status, index, sizeof(::Firebird::FbTimeTz)); + +#define FB__META_FB_TIME_TZ_EX \ + builder->setType(status, index, SQL_TIME_TZ_EX); \ + builder->setLength(status, index, sizeof(::Firebird::FbTimeTzEx)); + +#define FB__META_FB_TIMESTAMP \ + builder->setType(status, index, SQL_TIMESTAMP); \ + builder->setLength(status, index, sizeof(::Firebird::FbTimestamp)); + +#define FB__META_FB_TIMESTAMP_TZ \ + builder->setType(status, index, SQL_TIMESTAMP_TZ); \ + builder->setLength(status, index, sizeof(::Firebird::FbTimestampTz)); + +#define FB__META_FB_TIMESTAMP_TZ_EX \ + builder->setType(status, index, SQL_TIMESTAMP_TZ_EX); \ + builder->setLength(status, index, sizeof(::Firebird::FbTimestampTzEx)); + +#define FB__META_FB_CHAR(len) \ + builder->setType(status, index, SQL_TEXT); \ + builder->setLength(status, index, len); + +#define FB__META_FB_VARCHAR(len) \ + builder->setType(status, index, SQL_VARYING); \ + builder->setLength(status, index, len); + +#define FB__META_FB_INTL_CHAR(len, charSet) \ + builder->setType(status, index, SQL_TEXT); \ + builder->setLength(status, index, len); \ + builder->setCharSet(status, index, charSet); + +#define FB__META_FB_INTL_VARCHAR(len, charSet) \ + builder->setType(status, index, SQL_VARYING); \ + builder->setLength(status, index, len); \ + builder->setCharSet(status, index, charSet); + +#define FB__META_FB_SMALLINT FB__META_FB_SCALED_SMALLINT(0) +#define FB__META_FB_INTEGER FB__META_FB_SCALED_INTEGER(0) +#define FB__META_FB_BIGINT FB__META_FB_SCALED_BIGINT(0) + +// Types - struct + +#define FB__TYPE_FB_SCALED_SMALLINT(x) ISC_SHORT +#define FB__TYPE_FB_SCALED_INTEGER(x) ISC_LONG +#define FB__TYPE_FB_SCALED_BIGINT(x) FB__INT64_ALIGNAS ISC_INT64 +#define FB__TYPE_FB_SMALLINT ISC_SHORT +#define FB__TYPE_FB_INTEGER ISC_LONG +#define FB__TYPE_FB_BIGINT FB__INT64_ALIGNAS ISC_INT64 +#define FB__TYPE_FB_FLOAT float +#define FB__TYPE_FB_DOUBLE double +#define FB__TYPE_FB_DECFLOAT16 FB__INT64_ALIGNAS FB_DEC16 +#define FB__TYPE_FB_DECFLOAT34 FB__INT64_ALIGNAS FB_DEC34 +#define FB__TYPE_FB_BLOB ISC_QUAD +#define FB__TYPE_FB_BOOLEAN ISC_UCHAR +#define FB__TYPE_FB_DATE ::Firebird::FbDate +#define FB__TYPE_FB_TIME ::Firebird::FbTime +#define FB__TYPE_FB_TIME_TZ ::Firebird::FbTimeTz +#define FB__TYPE_FB_TIME_TZ_EX ::Firebird::FbTimeTzEx +#define FB__TYPE_FB_TIMESTAMP ::Firebird::FbTimestamp +#define FB__TYPE_FB_TIMESTAMP_TZ ::Firebird::FbTimestampTz +#define FB__TYPE_FB_TIMESTAMP_TZ_EX ::Firebird::FbTimestampTzEx +#define FB__TYPE_FB_CHAR(len) ::Firebird::FbChar<(len)> +#define FB__TYPE_FB_VARCHAR(len) ::Firebird::FbVarChar<(len)> +#define FB__TYPE_FB_INTL_CHAR(len, charSet) ::Firebird::FbChar<(len)> +#define FB__TYPE_FB_INTL_VARCHAR(len, charSet) ::Firebird::FbVarChar<(len)> + +#define FB_TRIGGER_MESSAGE_MOVE_NAMES(name, fields) \ + FB_TRIGGER_MESSAGE_MOVE_NAMES_I(name, 3, FB_BOOST_PP_CAT(FB_TRIGGER_MESSAGE_MOVE_NAMES_X fields, 0)) + +#define FB_TRIGGER_MESSAGE_MOVE_NAMES_X(x, y, z) ((x, y, z)) FB_TRIGGER_MESSAGE_MOVE_NAMES_Y +#define FB_TRIGGER_MESSAGE_MOVE_NAMES_Y(x, y, z) ((x, y, z)) FB_TRIGGER_MESSAGE_MOVE_NAMES_X +#define FB_TRIGGER_MESSAGE_MOVE_NAMES_X0 +#define FB_TRIGGER_MESSAGE_MOVE_NAMES_Y0 + +#define FB_TRIGGER_MESSAGE_MOVE_NAMES_I(name, size, fields) \ + FB_BOOST_PP_SEQ_FOR_EACH_I(FB_TRIGGER_MESSAGE_MOVE_NAME, size, fields) \ + builder->truncate(status, index); \ + index = 0; + +#define FB_TRIGGER_MESSAGE_MOVE_NAME(r, _, i, xy) \ + builder->moveNameToIndex(status, FB_BOOST_PP_TUPLE_ELEM(_, 2, xy), index++); + + +namespace Firebird { + + +template +struct FbChar +{ + char str[N]; +}; + +template +struct FbVarChar +{ + ISC_USHORT length; + char str[N]; + + void set(const char* s) + { + size_t len = strlen(s); + assert(len <= N); + length = (ISC_USHORT) len; + memcpy(str, s, (length <= N ? length : N)); + } +}; + +// This class has memory layout identical to ISC_DATE. +class FbDate +{ +public: + void decode(IUtil* util, unsigned* year, unsigned* month, unsigned* day) const + { + util->decodeDate(value, year, month, day); + } + + unsigned getYear(IUtil* util) const + { + unsigned year; + decode(util, &year, NULL, NULL); + return year; + } + + unsigned getMonth(IUtil* util) const + { + unsigned month; + decode(util, NULL, &month, NULL); + return month; + } + + unsigned getDay(IUtil* util) const + { + unsigned day; + decode(util, NULL, NULL, &day); + return day; + } + + void encode(IUtil* util, unsigned year, unsigned month, unsigned day) + { + value = util->encodeDate(year, month, day); + } + +public: + FbDate& operator=(ISC_DATE& val) + { + *(this) = *(FbDate*) &val; + return *this; + } + + operator ISC_DATE&() + { + return *(ISC_DATE*) this; + } + + operator const ISC_DATE&() const + { + return *(ISC_DATE*) this; + } + +public: + ISC_DATE value; +}; + +// This class has memory layout identical to ISC_TIME. +class FbTime +{ +public: + void decode(IUtil* util, unsigned* hours, unsigned* minutes, unsigned* seconds, + unsigned* fractions) const + { + util->decodeTime(value, hours, minutes, seconds, fractions); + } + + unsigned getHours(IUtil* util) const + { + unsigned hours; + decode(util, &hours, NULL, NULL, NULL); + return hours; + } + + unsigned getMinutes(IUtil* util) const + { + unsigned minutes; + decode(util, NULL, &minutes, NULL, NULL); + return minutes; + } + + unsigned getSeconds(IUtil* util) const + { + unsigned seconds; + decode(util, NULL, NULL, &seconds, NULL); + return seconds; + } + + unsigned getFractions(IUtil* util) const + { + unsigned fractions; + decode(util, NULL, NULL, NULL, &fractions); + return fractions; + } + + void encode(IUtil* util, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) + { + value = util->encodeTime(hours, minutes, seconds, fractions); + } + +public: + FbTime& operator=(ISC_TIME& val) + { + *(this) = *(FbTime*) &val; + return *this; + } + + operator ISC_TIME&() + { + return *(ISC_TIME*) this; + } + + operator const ISC_TIME&() const + { + return *(ISC_TIME*) this; + } + +public: + ISC_TIME value; +}; + +// This class has memory layout identical to ISC_TIME_TZ. +class FbTimeTz +{ +public: + FbTimeTz& operator=(ISC_TIME_TZ& val) + { + *(this) = *(FbTimeTz*) &val; + return *this; + } + + operator ISC_TIME_TZ&() + { + return *(ISC_TIME_TZ*) this; + } + + operator const ISC_TIME_TZ&() const + { + return *(ISC_TIME_TZ*) this; + } + +public: + FbTime utcTime; + ISC_USHORT timeZone; +}; + +// This class has memory layout identical to ISC_TIME_TZ_EX. +class FbTimeTzEx +{ +public: + FbTimeTzEx& operator=(ISC_TIME_TZ_EX& val) + { + *(this) = *(FbTimeTzEx*) &val; + return *this; + } + + operator ISC_TIME_TZ_EX&() + { + return *(ISC_TIME_TZ_EX*) this; + } + + operator const ISC_TIME_TZ_EX&() const + { + return *(ISC_TIME_TZ_EX*) this; + } + +public: + FbTime utcTime; + ISC_USHORT timeZone; + ISC_SHORT extOffset; +}; + +// This class has memory layout identical to ISC_TIMESTAMP. +class FbTimestamp +{ +public: + FbTimestamp& operator=(ISC_TIMESTAMP& val) + { + *(this) = *(FbTimestamp*) &val; + return *this; + } + + operator ISC_TIMESTAMP&() + { + return *(ISC_TIMESTAMP*) this; + } + + operator const ISC_TIMESTAMP&() const + { + return *(ISC_TIMESTAMP*) this; + } + +public: + FbDate date; + FbTime time; +}; + +// This class has memory layout identical to ISC_TIMESTAMP_TZ. +class FbTimestampTz +{ +public: + FbTimestampTz& operator=(ISC_TIMESTAMP_TZ& val) + { + *(this) = *(FbTimestampTz*) &val; + return *this; + } + + operator ISC_TIMESTAMP_TZ&() + { + return *(ISC_TIMESTAMP_TZ*) this; + } + + operator const ISC_TIMESTAMP_TZ&() const + { + return *(ISC_TIMESTAMP_TZ*) this; + } + +public: + FbTimestamp utcTimestamp; + ISC_USHORT timeZone; +}; + +// This class has memory layout identical to ISC_TIMESTAMP_TZ_EX. +class FbTimestampTzEx +{ +public: + FbTimestampTzEx& operator=(ISC_TIMESTAMP_TZ_EX& val) + { + *(this) = *(FbTimestampTzEx*) &val; + return *this; + } + + operator ISC_TIMESTAMP_TZ_EX&() + { + return *(ISC_TIMESTAMP_TZ_EX*) this; + } + + operator const ISC_TIMESTAMP_TZ_EX&() const + { + return *(ISC_TIMESTAMP_TZ_EX*) this; + } + +public: + FbTimestamp utcTimestamp; + ISC_USHORT timeZone; + ISC_SHORT extOffset; +}; + +class MessageDesc +{ +public: + template + MessageDesc(IMaster* master, StatusType* status, unsigned count, + void (*setup)(StatusType*, IMetadataBuilder*)) + { + IMetadataBuilder* builder = master->getMetadataBuilder(status, count); + + setup(status, builder); + + metadata = builder->getMetadata(status); + + builder->release(); + } + + ~MessageDesc() + { + metadata->release(); + } + + IMessageMetadata* getMetadata() const + { + return metadata; + } + +private: + IMessageMetadata* metadata; +}; + + +} // namespace Firebird + +#endif // FIREBIRD_MESSAGE_H diff --git a/src/firebird/include/firebird/TimeZones.h b/src/firebird/include/firebird/TimeZones.h new file mode 100644 index 00000000..267ff8e2 --- /dev/null +++ b/src/firebird/include/firebird/TimeZones.h @@ -0,0 +1,642 @@ +#ifndef FIREBIRD_TIME_ZONES_H +#define FIREBIRD_TIME_ZONES_H + +// The content of this file is generated with help of update-ids utility Do not edit. + +#define fb_tzid_gmt 65535 /* GMT */ +#define fb_tzid_act 65534 /* ACT */ +#define fb_tzid_aet 65533 /* AET */ +#define fb_tzid_agt 65532 /* AGT */ +#define fb_tzid_art 65531 /* ART */ +#define fb_tzid_ast 65530 /* AST */ +#define fb_tzid_africa_abidjan 65529 /* Africa/Abidjan */ +#define fb_tzid_africa_accra 65528 /* Africa/Accra */ +#define fb_tzid_africa_addis_ababa 65527 /* Africa/Addis_Ababa */ +#define fb_tzid_africa_algiers 65526 /* Africa/Algiers */ +#define fb_tzid_africa_asmara 65525 /* Africa/Asmara */ +#define fb_tzid_africa_asmera 65524 /* Africa/Asmera */ +#define fb_tzid_africa_bamako 65523 /* Africa/Bamako */ +#define fb_tzid_africa_bangui 65522 /* Africa/Bangui */ +#define fb_tzid_africa_banjul 65521 /* Africa/Banjul */ +#define fb_tzid_africa_bissau 65520 /* Africa/Bissau */ +#define fb_tzid_africa_blantyre 65519 /* Africa/Blantyre */ +#define fb_tzid_africa_brazzaville 65518 /* Africa/Brazzaville */ +#define fb_tzid_africa_bujumbura 65517 /* Africa/Bujumbura */ +#define fb_tzid_africa_cairo 65516 /* Africa/Cairo */ +#define fb_tzid_africa_casablanca 65515 /* Africa/Casablanca */ +#define fb_tzid_africa_ceuta 65514 /* Africa/Ceuta */ +#define fb_tzid_africa_conakry 65513 /* Africa/Conakry */ +#define fb_tzid_africa_dakar 65512 /* Africa/Dakar */ +#define fb_tzid_africa_dar_es_salaam 65511 /* Africa/Dar_es_Salaam */ +#define fb_tzid_africa_djibouti 65510 /* Africa/Djibouti */ +#define fb_tzid_africa_douala 65509 /* Africa/Douala */ +#define fb_tzid_africa_el_aaiun 65508 /* Africa/El_Aaiun */ +#define fb_tzid_africa_freetown 65507 /* Africa/Freetown */ +#define fb_tzid_africa_gaborone 65506 /* Africa/Gaborone */ +#define fb_tzid_africa_harare 65505 /* Africa/Harare */ +#define fb_tzid_africa_johannesburg 65504 /* Africa/Johannesburg */ +#define fb_tzid_africa_juba 65503 /* Africa/Juba */ +#define fb_tzid_africa_kampala 65502 /* Africa/Kampala */ +#define fb_tzid_africa_khartoum 65501 /* Africa/Khartoum */ +#define fb_tzid_africa_kigali 65500 /* Africa/Kigali */ +#define fb_tzid_africa_kinshasa 65499 /* Africa/Kinshasa */ +#define fb_tzid_africa_lagos 65498 /* Africa/Lagos */ +#define fb_tzid_africa_libreville 65497 /* Africa/Libreville */ +#define fb_tzid_africa_lome 65496 /* Africa/Lome */ +#define fb_tzid_africa_luanda 65495 /* Africa/Luanda */ +#define fb_tzid_africa_lubumbashi 65494 /* Africa/Lubumbashi */ +#define fb_tzid_africa_lusaka 65493 /* Africa/Lusaka */ +#define fb_tzid_africa_malabo 65492 /* Africa/Malabo */ +#define fb_tzid_africa_maputo 65491 /* Africa/Maputo */ +#define fb_tzid_africa_maseru 65490 /* Africa/Maseru */ +#define fb_tzid_africa_mbabane 65489 /* Africa/Mbabane */ +#define fb_tzid_africa_mogadishu 65488 /* Africa/Mogadishu */ +#define fb_tzid_africa_monrovia 65487 /* Africa/Monrovia */ +#define fb_tzid_africa_nairobi 65486 /* Africa/Nairobi */ +#define fb_tzid_africa_ndjamena 65485 /* Africa/Ndjamena */ +#define fb_tzid_africa_niamey 65484 /* Africa/Niamey */ +#define fb_tzid_africa_nouakchott 65483 /* Africa/Nouakchott */ +#define fb_tzid_africa_ouagadougou 65482 /* Africa/Ouagadougou */ +#define fb_tzid_africa_porto_novo 65481 /* Africa/Porto-Novo */ +#define fb_tzid_africa_sao_tome 65480 /* Africa/Sao_Tome */ +#define fb_tzid_africa_timbuktu 65479 /* Africa/Timbuktu */ +#define fb_tzid_africa_tripoli 65478 /* Africa/Tripoli */ +#define fb_tzid_africa_tunis 65477 /* Africa/Tunis */ +#define fb_tzid_africa_windhoek 65476 /* Africa/Windhoek */ +#define fb_tzid_america_adak 65475 /* America/Adak */ +#define fb_tzid_america_anchorage 65474 /* America/Anchorage */ +#define fb_tzid_america_anguilla 65473 /* America/Anguilla */ +#define fb_tzid_america_antigua 65472 /* America/Antigua */ +#define fb_tzid_america_araguaina 65471 /* America/Araguaina */ +#define fb_tzid_america_argentina_buenos_aires 65470 /* America/Argentina/Buenos_Aires */ +#define fb_tzid_america_argentina_catamarca 65469 /* America/Argentina/Catamarca */ +#define fb_tzid_america_argentina_comodrivadavia 65468 /* America/Argentina/ComodRivadavia */ +#define fb_tzid_america_argentina_cordoba 65467 /* America/Argentina/Cordoba */ +#define fb_tzid_america_argentina_jujuy 65466 /* America/Argentina/Jujuy */ +#define fb_tzid_america_argentina_la_rioja 65465 /* America/Argentina/La_Rioja */ +#define fb_tzid_america_argentina_mendoza 65464 /* America/Argentina/Mendoza */ +#define fb_tzid_america_argentina_rio_gallegos 65463 /* America/Argentina/Rio_Gallegos */ +#define fb_tzid_america_argentina_salta 65462 /* America/Argentina/Salta */ +#define fb_tzid_america_argentina_san_juan 65461 /* America/Argentina/San_Juan */ +#define fb_tzid_america_argentina_san_luis 65460 /* America/Argentina/San_Luis */ +#define fb_tzid_america_argentina_tucuman 65459 /* America/Argentina/Tucuman */ +#define fb_tzid_america_argentina_ushuaia 65458 /* America/Argentina/Ushuaia */ +#define fb_tzid_america_aruba 65457 /* America/Aruba */ +#define fb_tzid_america_asuncion 65456 /* America/Asuncion */ +#define fb_tzid_america_atikokan 65455 /* America/Atikokan */ +#define fb_tzid_america_atka 65454 /* America/Atka */ +#define fb_tzid_america_bahia 65453 /* America/Bahia */ +#define fb_tzid_america_bahia_banderas 65452 /* America/Bahia_Banderas */ +#define fb_tzid_america_barbados 65451 /* America/Barbados */ +#define fb_tzid_america_belem 65450 /* America/Belem */ +#define fb_tzid_america_belize 65449 /* America/Belize */ +#define fb_tzid_america_blanc_sablon 65448 /* America/Blanc-Sablon */ +#define fb_tzid_america_boa_vista 65447 /* America/Boa_Vista */ +#define fb_tzid_america_bogota 65446 /* America/Bogota */ +#define fb_tzid_america_boise 65445 /* America/Boise */ +#define fb_tzid_america_buenos_aires 65444 /* America/Buenos_Aires */ +#define fb_tzid_america_cambridge_bay 65443 /* America/Cambridge_Bay */ +#define fb_tzid_america_campo_grande 65442 /* America/Campo_Grande */ +#define fb_tzid_america_cancun 65441 /* America/Cancun */ +#define fb_tzid_america_caracas 65440 /* America/Caracas */ +#define fb_tzid_america_catamarca 65439 /* America/Catamarca */ +#define fb_tzid_america_cayenne 65438 /* America/Cayenne */ +#define fb_tzid_america_cayman 65437 /* America/Cayman */ +#define fb_tzid_america_chicago 65436 /* America/Chicago */ +#define fb_tzid_america_chihuahua 65435 /* America/Chihuahua */ +#define fb_tzid_america_coral_harbour 65434 /* America/Coral_Harbour */ +#define fb_tzid_america_cordoba 65433 /* America/Cordoba */ +#define fb_tzid_america_costa_rica 65432 /* America/Costa_Rica */ +#define fb_tzid_america_creston 65431 /* America/Creston */ +#define fb_tzid_america_cuiaba 65430 /* America/Cuiaba */ +#define fb_tzid_america_curacao 65429 /* America/Curacao */ +#define fb_tzid_america_danmarkshavn 65428 /* America/Danmarkshavn */ +#define fb_tzid_america_dawson 65427 /* America/Dawson */ +#define fb_tzid_america_dawson_creek 65426 /* America/Dawson_Creek */ +#define fb_tzid_america_denver 65425 /* America/Denver */ +#define fb_tzid_america_detroit 65424 /* America/Detroit */ +#define fb_tzid_america_dominica 65423 /* America/Dominica */ +#define fb_tzid_america_edmonton 65422 /* America/Edmonton */ +#define fb_tzid_america_eirunepe 65421 /* America/Eirunepe */ +#define fb_tzid_america_el_salvador 65420 /* America/El_Salvador */ +#define fb_tzid_america_ensenada 65419 /* America/Ensenada */ +#define fb_tzid_america_fort_nelson 65418 /* America/Fort_Nelson */ +#define fb_tzid_america_fort_wayne 65417 /* America/Fort_Wayne */ +#define fb_tzid_america_fortaleza 65416 /* America/Fortaleza */ +#define fb_tzid_america_glace_bay 65415 /* America/Glace_Bay */ +#define fb_tzid_america_godthab 65414 /* America/Godthab */ +#define fb_tzid_america_goose_bay 65413 /* America/Goose_Bay */ +#define fb_tzid_america_grand_turk 65412 /* America/Grand_Turk */ +#define fb_tzid_america_grenada 65411 /* America/Grenada */ +#define fb_tzid_america_guadeloupe 65410 /* America/Guadeloupe */ +#define fb_tzid_america_guatemala 65409 /* America/Guatemala */ +#define fb_tzid_america_guayaquil 65408 /* America/Guayaquil */ +#define fb_tzid_america_guyana 65407 /* America/Guyana */ +#define fb_tzid_america_halifax 65406 /* America/Halifax */ +#define fb_tzid_america_havana 65405 /* America/Havana */ +#define fb_tzid_america_hermosillo 65404 /* America/Hermosillo */ +#define fb_tzid_america_indiana_indianapolis 65403 /* America/Indiana/Indianapolis */ +#define fb_tzid_america_indiana_knox 65402 /* America/Indiana/Knox */ +#define fb_tzid_america_indiana_marengo 65401 /* America/Indiana/Marengo */ +#define fb_tzid_america_indiana_petersburg 65400 /* America/Indiana/Petersburg */ +#define fb_tzid_america_indiana_tell_city 65399 /* America/Indiana/Tell_City */ +#define fb_tzid_america_indiana_vevay 65398 /* America/Indiana/Vevay */ +#define fb_tzid_america_indiana_vincennes 65397 /* America/Indiana/Vincennes */ +#define fb_tzid_america_indiana_winamac 65396 /* America/Indiana/Winamac */ +#define fb_tzid_america_indianapolis 65395 /* America/Indianapolis */ +#define fb_tzid_america_inuvik 65394 /* America/Inuvik */ +#define fb_tzid_america_iqaluit 65393 /* America/Iqaluit */ +#define fb_tzid_america_jamaica 65392 /* America/Jamaica */ +#define fb_tzid_america_jujuy 65391 /* America/Jujuy */ +#define fb_tzid_america_juneau 65390 /* America/Juneau */ +#define fb_tzid_america_kentucky_louisville 65389 /* America/Kentucky/Louisville */ +#define fb_tzid_america_kentucky_monticello 65388 /* America/Kentucky/Monticello */ +#define fb_tzid_america_knox_in 65387 /* America/Knox_IN */ +#define fb_tzid_america_kralendijk 65386 /* America/Kralendijk */ +#define fb_tzid_america_la_paz 65385 /* America/La_Paz */ +#define fb_tzid_america_lima 65384 /* America/Lima */ +#define fb_tzid_america_los_angeles 65383 /* America/Los_Angeles */ +#define fb_tzid_america_louisville 65382 /* America/Louisville */ +#define fb_tzid_america_lower_princes 65381 /* America/Lower_Princes */ +#define fb_tzid_america_maceio 65380 /* America/Maceio */ +#define fb_tzid_america_managua 65379 /* America/Managua */ +#define fb_tzid_america_manaus 65378 /* America/Manaus */ +#define fb_tzid_america_marigot 65377 /* America/Marigot */ +#define fb_tzid_america_martinique 65376 /* America/Martinique */ +#define fb_tzid_america_matamoros 65375 /* America/Matamoros */ +#define fb_tzid_america_mazatlan 65374 /* America/Mazatlan */ +#define fb_tzid_america_mendoza 65373 /* America/Mendoza */ +#define fb_tzid_america_menominee 65372 /* America/Menominee */ +#define fb_tzid_america_merida 65371 /* America/Merida */ +#define fb_tzid_america_metlakatla 65370 /* America/Metlakatla */ +#define fb_tzid_america_mexico_city 65369 /* America/Mexico_City */ +#define fb_tzid_america_miquelon 65368 /* America/Miquelon */ +#define fb_tzid_america_moncton 65367 /* America/Moncton */ +#define fb_tzid_america_monterrey 65366 /* America/Monterrey */ +#define fb_tzid_america_montevideo 65365 /* America/Montevideo */ +#define fb_tzid_america_montreal 65364 /* America/Montreal */ +#define fb_tzid_america_montserrat 65363 /* America/Montserrat */ +#define fb_tzid_america_nassau 65362 /* America/Nassau */ +#define fb_tzid_america_new_york 65361 /* America/New_York */ +#define fb_tzid_america_nipigon 65360 /* America/Nipigon */ +#define fb_tzid_america_nome 65359 /* America/Nome */ +#define fb_tzid_america_noronha 65358 /* America/Noronha */ +#define fb_tzid_america_north_dakota_beulah 65357 /* America/North_Dakota/Beulah */ +#define fb_tzid_america_north_dakota_center 65356 /* America/North_Dakota/Center */ +#define fb_tzid_america_north_dakota_new_salem 65355 /* America/North_Dakota/New_Salem */ +#define fb_tzid_america_ojinaga 65354 /* America/Ojinaga */ +#define fb_tzid_america_panama 65353 /* America/Panama */ +#define fb_tzid_america_pangnirtung 65352 /* America/Pangnirtung */ +#define fb_tzid_america_paramaribo 65351 /* America/Paramaribo */ +#define fb_tzid_america_phoenix 65350 /* America/Phoenix */ +#define fb_tzid_america_port_au_prince 65349 /* America/Port-au-Prince */ +#define fb_tzid_america_port_of_spain 65348 /* America/Port_of_Spain */ +#define fb_tzid_america_porto_acre 65347 /* America/Porto_Acre */ +#define fb_tzid_america_porto_velho 65346 /* America/Porto_Velho */ +#define fb_tzid_america_puerto_rico 65345 /* America/Puerto_Rico */ +#define fb_tzid_america_punta_arenas 65344 /* America/Punta_Arenas */ +#define fb_tzid_america_rainy_river 65343 /* America/Rainy_River */ +#define fb_tzid_america_rankin_inlet 65342 /* America/Rankin_Inlet */ +#define fb_tzid_america_recife 65341 /* America/Recife */ +#define fb_tzid_america_regina 65340 /* America/Regina */ +#define fb_tzid_america_resolute 65339 /* America/Resolute */ +#define fb_tzid_america_rio_branco 65338 /* America/Rio_Branco */ +#define fb_tzid_america_rosario 65337 /* America/Rosario */ +#define fb_tzid_america_santa_isabel 65336 /* America/Santa_Isabel */ +#define fb_tzid_america_santarem 65335 /* America/Santarem */ +#define fb_tzid_america_santiago 65334 /* America/Santiago */ +#define fb_tzid_america_santo_domingo 65333 /* America/Santo_Domingo */ +#define fb_tzid_america_sao_paulo 65332 /* America/Sao_Paulo */ +#define fb_tzid_america_scoresbysund 65331 /* America/Scoresbysund */ +#define fb_tzid_america_shiprock 65330 /* America/Shiprock */ +#define fb_tzid_america_sitka 65329 /* America/Sitka */ +#define fb_tzid_america_st_barthelemy 65328 /* America/St_Barthelemy */ +#define fb_tzid_america_st_johns 65327 /* America/St_Johns */ +#define fb_tzid_america_st_kitts 65326 /* America/St_Kitts */ +#define fb_tzid_america_st_lucia 65325 /* America/St_Lucia */ +#define fb_tzid_america_st_thomas 65324 /* America/St_Thomas */ +#define fb_tzid_america_st_vincent 65323 /* America/St_Vincent */ +#define fb_tzid_america_swift_current 65322 /* America/Swift_Current */ +#define fb_tzid_america_tegucigalpa 65321 /* America/Tegucigalpa */ +#define fb_tzid_america_thule 65320 /* America/Thule */ +#define fb_tzid_america_thunder_bay 65319 /* America/Thunder_Bay */ +#define fb_tzid_america_tijuana 65318 /* America/Tijuana */ +#define fb_tzid_america_toronto 65317 /* America/Toronto */ +#define fb_tzid_america_tortola 65316 /* America/Tortola */ +#define fb_tzid_america_vancouver 65315 /* America/Vancouver */ +#define fb_tzid_america_virgin 65314 /* America/Virgin */ +#define fb_tzid_america_whitehorse 65313 /* America/Whitehorse */ +#define fb_tzid_america_winnipeg 65312 /* America/Winnipeg */ +#define fb_tzid_america_yakutat 65311 /* America/Yakutat */ +#define fb_tzid_america_yellowknife 65310 /* America/Yellowknife */ +#define fb_tzid_antarctica_casey 65309 /* Antarctica/Casey */ +#define fb_tzid_antarctica_davis 65308 /* Antarctica/Davis */ +#define fb_tzid_antarctica_dumontdurville 65307 /* Antarctica/DumontDUrville */ +#define fb_tzid_antarctica_macquarie 65306 /* Antarctica/Macquarie */ +#define fb_tzid_antarctica_mawson 65305 /* Antarctica/Mawson */ +#define fb_tzid_antarctica_mcmurdo 65304 /* Antarctica/McMurdo */ +#define fb_tzid_antarctica_palmer 65303 /* Antarctica/Palmer */ +#define fb_tzid_antarctica_rothera 65302 /* Antarctica/Rothera */ +#define fb_tzid_antarctica_south_pole 65301 /* Antarctica/South_Pole */ +#define fb_tzid_antarctica_syowa 65300 /* Antarctica/Syowa */ +#define fb_tzid_antarctica_troll 65299 /* Antarctica/Troll */ +#define fb_tzid_antarctica_vostok 65298 /* Antarctica/Vostok */ +#define fb_tzid_arctic_longyearbyen 65297 /* Arctic/Longyearbyen */ +#define fb_tzid_asia_aden 65296 /* Asia/Aden */ +#define fb_tzid_asia_almaty 65295 /* Asia/Almaty */ +#define fb_tzid_asia_amman 65294 /* Asia/Amman */ +#define fb_tzid_asia_anadyr 65293 /* Asia/Anadyr */ +#define fb_tzid_asia_aqtau 65292 /* Asia/Aqtau */ +#define fb_tzid_asia_aqtobe 65291 /* Asia/Aqtobe */ +#define fb_tzid_asia_ashgabat 65290 /* Asia/Ashgabat */ +#define fb_tzid_asia_ashkhabad 65289 /* Asia/Ashkhabad */ +#define fb_tzid_asia_atyrau 65288 /* Asia/Atyrau */ +#define fb_tzid_asia_baghdad 65287 /* Asia/Baghdad */ +#define fb_tzid_asia_bahrain 65286 /* Asia/Bahrain */ +#define fb_tzid_asia_baku 65285 /* Asia/Baku */ +#define fb_tzid_asia_bangkok 65284 /* Asia/Bangkok */ +#define fb_tzid_asia_barnaul 65283 /* Asia/Barnaul */ +#define fb_tzid_asia_beirut 65282 /* Asia/Beirut */ +#define fb_tzid_asia_bishkek 65281 /* Asia/Bishkek */ +#define fb_tzid_asia_brunei 65280 /* Asia/Brunei */ +#define fb_tzid_asia_calcutta 65279 /* Asia/Calcutta */ +#define fb_tzid_asia_chita 65278 /* Asia/Chita */ +#define fb_tzid_asia_choibalsan 65277 /* Asia/Choibalsan */ +#define fb_tzid_asia_chongqing 65276 /* Asia/Chongqing */ +#define fb_tzid_asia_chungking 65275 /* Asia/Chungking */ +#define fb_tzid_asia_colombo 65274 /* Asia/Colombo */ +#define fb_tzid_asia_dacca 65273 /* Asia/Dacca */ +#define fb_tzid_asia_damascus 65272 /* Asia/Damascus */ +#define fb_tzid_asia_dhaka 65271 /* Asia/Dhaka */ +#define fb_tzid_asia_dili 65270 /* Asia/Dili */ +#define fb_tzid_asia_dubai 65269 /* Asia/Dubai */ +#define fb_tzid_asia_dushanbe 65268 /* Asia/Dushanbe */ +#define fb_tzid_asia_famagusta 65267 /* Asia/Famagusta */ +#define fb_tzid_asia_gaza 65266 /* Asia/Gaza */ +#define fb_tzid_asia_harbin 65265 /* Asia/Harbin */ +#define fb_tzid_asia_hebron 65264 /* Asia/Hebron */ +#define fb_tzid_asia_ho_chi_minh 65263 /* Asia/Ho_Chi_Minh */ +#define fb_tzid_asia_hong_kong 65262 /* Asia/Hong_Kong */ +#define fb_tzid_asia_hovd 65261 /* Asia/Hovd */ +#define fb_tzid_asia_irkutsk 65260 /* Asia/Irkutsk */ +#define fb_tzid_asia_istanbul 65259 /* Asia/Istanbul */ +#define fb_tzid_asia_jakarta 65258 /* Asia/Jakarta */ +#define fb_tzid_asia_jayapura 65257 /* Asia/Jayapura */ +#define fb_tzid_asia_jerusalem 65256 /* Asia/Jerusalem */ +#define fb_tzid_asia_kabul 65255 /* Asia/Kabul */ +#define fb_tzid_asia_kamchatka 65254 /* Asia/Kamchatka */ +#define fb_tzid_asia_karachi 65253 /* Asia/Karachi */ +#define fb_tzid_asia_kashgar 65252 /* Asia/Kashgar */ +#define fb_tzid_asia_kathmandu 65251 /* Asia/Kathmandu */ +#define fb_tzid_asia_katmandu 65250 /* Asia/Katmandu */ +#define fb_tzid_asia_khandyga 65249 /* Asia/Khandyga */ +#define fb_tzid_asia_kolkata 65248 /* Asia/Kolkata */ +#define fb_tzid_asia_krasnoyarsk 65247 /* Asia/Krasnoyarsk */ +#define fb_tzid_asia_kuala_lumpur 65246 /* Asia/Kuala_Lumpur */ +#define fb_tzid_asia_kuching 65245 /* Asia/Kuching */ +#define fb_tzid_asia_kuwait 65244 /* Asia/Kuwait */ +#define fb_tzid_asia_macao 65243 /* Asia/Macao */ +#define fb_tzid_asia_macau 65242 /* Asia/Macau */ +#define fb_tzid_asia_magadan 65241 /* Asia/Magadan */ +#define fb_tzid_asia_makassar 65240 /* Asia/Makassar */ +#define fb_tzid_asia_manila 65239 /* Asia/Manila */ +#define fb_tzid_asia_muscat 65238 /* Asia/Muscat */ +#define fb_tzid_asia_nicosia 65237 /* Asia/Nicosia */ +#define fb_tzid_asia_novokuznetsk 65236 /* Asia/Novokuznetsk */ +#define fb_tzid_asia_novosibirsk 65235 /* Asia/Novosibirsk */ +#define fb_tzid_asia_omsk 65234 /* Asia/Omsk */ +#define fb_tzid_asia_oral 65233 /* Asia/Oral */ +#define fb_tzid_asia_phnom_penh 65232 /* Asia/Phnom_Penh */ +#define fb_tzid_asia_pontianak 65231 /* Asia/Pontianak */ +#define fb_tzid_asia_pyongyang 65230 /* Asia/Pyongyang */ +#define fb_tzid_asia_qatar 65229 /* Asia/Qatar */ +#define fb_tzid_asia_qyzylorda 65228 /* Asia/Qyzylorda */ +#define fb_tzid_asia_rangoon 65227 /* Asia/Rangoon */ +#define fb_tzid_asia_riyadh 65226 /* Asia/Riyadh */ +#define fb_tzid_asia_saigon 65225 /* Asia/Saigon */ +#define fb_tzid_asia_sakhalin 65224 /* Asia/Sakhalin */ +#define fb_tzid_asia_samarkand 65223 /* Asia/Samarkand */ +#define fb_tzid_asia_seoul 65222 /* Asia/Seoul */ +#define fb_tzid_asia_shanghai 65221 /* Asia/Shanghai */ +#define fb_tzid_asia_singapore 65220 /* Asia/Singapore */ +#define fb_tzid_asia_srednekolymsk 65219 /* Asia/Srednekolymsk */ +#define fb_tzid_asia_taipei 65218 /* Asia/Taipei */ +#define fb_tzid_asia_tashkent 65217 /* Asia/Tashkent */ +#define fb_tzid_asia_tbilisi 65216 /* Asia/Tbilisi */ +#define fb_tzid_asia_tehran 65215 /* Asia/Tehran */ +#define fb_tzid_asia_tel_aviv 65214 /* Asia/Tel_Aviv */ +#define fb_tzid_asia_thimbu 65213 /* Asia/Thimbu */ +#define fb_tzid_asia_thimphu 65212 /* Asia/Thimphu */ +#define fb_tzid_asia_tokyo 65211 /* Asia/Tokyo */ +#define fb_tzid_asia_tomsk 65210 /* Asia/Tomsk */ +#define fb_tzid_asia_ujung_pandang 65209 /* Asia/Ujung_Pandang */ +#define fb_tzid_asia_ulaanbaatar 65208 /* Asia/Ulaanbaatar */ +#define fb_tzid_asia_ulan_bator 65207 /* Asia/Ulan_Bator */ +#define fb_tzid_asia_urumqi 65206 /* Asia/Urumqi */ +#define fb_tzid_asia_ust_nera 65205 /* Asia/Ust-Nera */ +#define fb_tzid_asia_vientiane 65204 /* Asia/Vientiane */ +#define fb_tzid_asia_vladivostok 65203 /* Asia/Vladivostok */ +#define fb_tzid_asia_yakutsk 65202 /* Asia/Yakutsk */ +#define fb_tzid_asia_yangon 65201 /* Asia/Yangon */ +#define fb_tzid_asia_yekaterinburg 65200 /* Asia/Yekaterinburg */ +#define fb_tzid_asia_yerevan 65199 /* Asia/Yerevan */ +#define fb_tzid_atlantic_azores 65198 /* Atlantic/Azores */ +#define fb_tzid_atlantic_bermuda 65197 /* Atlantic/Bermuda */ +#define fb_tzid_atlantic_canary 65196 /* Atlantic/Canary */ +#define fb_tzid_atlantic_cape_verde 65195 /* Atlantic/Cape_Verde */ +#define fb_tzid_atlantic_faeroe 65194 /* Atlantic/Faeroe */ +#define fb_tzid_atlantic_faroe 65193 /* Atlantic/Faroe */ +#define fb_tzid_atlantic_jan_mayen 65192 /* Atlantic/Jan_Mayen */ +#define fb_tzid_atlantic_madeira 65191 /* Atlantic/Madeira */ +#define fb_tzid_atlantic_reykjavik 65190 /* Atlantic/Reykjavik */ +#define fb_tzid_atlantic_south_georgia 65189 /* Atlantic/South_Georgia */ +#define fb_tzid_atlantic_st_helena 65188 /* Atlantic/St_Helena */ +#define fb_tzid_atlantic_stanley 65187 /* Atlantic/Stanley */ +#define fb_tzid_australia_act 65186 /* Australia/ACT */ +#define fb_tzid_australia_adelaide 65185 /* Australia/Adelaide */ +#define fb_tzid_australia_brisbane 65184 /* Australia/Brisbane */ +#define fb_tzid_australia_broken_hill 65183 /* Australia/Broken_Hill */ +#define fb_tzid_australia_canberra 65182 /* Australia/Canberra */ +#define fb_tzid_australia_currie 65181 /* Australia/Currie */ +#define fb_tzid_australia_darwin 65180 /* Australia/Darwin */ +#define fb_tzid_australia_eucla 65179 /* Australia/Eucla */ +#define fb_tzid_australia_hobart 65178 /* Australia/Hobart */ +#define fb_tzid_australia_lhi 65177 /* Australia/LHI */ +#define fb_tzid_australia_lindeman 65176 /* Australia/Lindeman */ +#define fb_tzid_australia_lord_howe 65175 /* Australia/Lord_Howe */ +#define fb_tzid_australia_melbourne 65174 /* Australia/Melbourne */ +#define fb_tzid_australia_nsw 65173 /* Australia/NSW */ +#define fb_tzid_australia_north 65172 /* Australia/North */ +#define fb_tzid_australia_perth 65171 /* Australia/Perth */ +#define fb_tzid_australia_queensland 65170 /* Australia/Queensland */ +#define fb_tzid_australia_south 65169 /* Australia/South */ +#define fb_tzid_australia_sydney 65168 /* Australia/Sydney */ +#define fb_tzid_australia_tasmania 65167 /* Australia/Tasmania */ +#define fb_tzid_australia_victoria 65166 /* Australia/Victoria */ +#define fb_tzid_australia_west 65165 /* Australia/West */ +#define fb_tzid_australia_yancowinna 65164 /* Australia/Yancowinna */ +#define fb_tzid_bet 65163 /* BET */ +#define fb_tzid_bst 65162 /* BST */ +#define fb_tzid_brazil_acre 65161 /* Brazil/Acre */ +#define fb_tzid_brazil_denoronha 65160 /* Brazil/DeNoronha */ +#define fb_tzid_brazil_east 65159 /* Brazil/East */ +#define fb_tzid_brazil_west 65158 /* Brazil/West */ +#define fb_tzid_cat 65157 /* CAT */ +#define fb_tzid_cet 65156 /* CET */ +#define fb_tzid_cnt 65155 /* CNT */ +#define fb_tzid_cst 65154 /* CST */ +#define fb_tzid_cst6cdt 65153 /* CST6CDT */ +#define fb_tzid_ctt 65152 /* CTT */ +#define fb_tzid_canada_atlantic 65151 /* Canada/Atlantic */ +#define fb_tzid_canada_central 65150 /* Canada/Central */ +#define fb_tzid_canada_east_saskatchewan 65149 /* Canada/East-Saskatchewan */ +#define fb_tzid_canada_eastern 65148 /* Canada/Eastern */ +#define fb_tzid_canada_mountain 65147 /* Canada/Mountain */ +#define fb_tzid_canada_newfoundland 65146 /* Canada/Newfoundland */ +#define fb_tzid_canada_pacific 65145 /* Canada/Pacific */ +#define fb_tzid_canada_saskatchewan 65144 /* Canada/Saskatchewan */ +#define fb_tzid_canada_yukon 65143 /* Canada/Yukon */ +#define fb_tzid_chile_continental 65142 /* Chile/Continental */ +#define fb_tzid_chile_easterisland 65141 /* Chile/EasterIsland */ +#define fb_tzid_cuba 65140 /* Cuba */ +#define fb_tzid_eat 65139 /* EAT */ +#define fb_tzid_ect 65138 /* ECT */ +#define fb_tzid_eet 65137 /* EET */ +#define fb_tzid_est 65136 /* EST */ +#define fb_tzid_est5edt 65135 /* EST5EDT */ +#define fb_tzid_egypt 65134 /* Egypt */ +#define fb_tzid_eire 65133 /* Eire */ +#define fb_tzid_etc_gmt 65132 /* Etc/GMT */ +#define fb_tzid_etc_gmt_plus_0 65131 /* Etc/GMT+0 */ +#define fb_tzid_etc_gmt_plus_1 65130 /* Etc/GMT+1 */ +#define fb_tzid_etc_gmt_plus_10 65129 /* Etc/GMT+10 */ +#define fb_tzid_etc_gmt_plus_11 65128 /* Etc/GMT+11 */ +#define fb_tzid_etc_gmt_plus_12 65127 /* Etc/GMT+12 */ +#define fb_tzid_etc_gmt_plus_2 65126 /* Etc/GMT+2 */ +#define fb_tzid_etc_gmt_plus_3 65125 /* Etc/GMT+3 */ +#define fb_tzid_etc_gmt_plus_4 65124 /* Etc/GMT+4 */ +#define fb_tzid_etc_gmt_plus_5 65123 /* Etc/GMT+5 */ +#define fb_tzid_etc_gmt_plus_6 65122 /* Etc/GMT+6 */ +#define fb_tzid_etc_gmt_plus_7 65121 /* Etc/GMT+7 */ +#define fb_tzid_etc_gmt_plus_8 65120 /* Etc/GMT+8 */ +#define fb_tzid_etc_gmt_plus_9 65119 /* Etc/GMT+9 */ +#define fb_tzid_etc_gmt_minus_0 65118 /* Etc/GMT-0 */ +#define fb_tzid_etc_gmt_minus_1 65117 /* Etc/GMT-1 */ +#define fb_tzid_etc_gmt_minus_10 65116 /* Etc/GMT-10 */ +#define fb_tzid_etc_gmt_minus_11 65115 /* Etc/GMT-11 */ +#define fb_tzid_etc_gmt_minus_12 65114 /* Etc/GMT-12 */ +#define fb_tzid_etc_gmt_minus_13 65113 /* Etc/GMT-13 */ +#define fb_tzid_etc_gmt_minus_14 65112 /* Etc/GMT-14 */ +#define fb_tzid_etc_gmt_minus_2 65111 /* Etc/GMT-2 */ +#define fb_tzid_etc_gmt_minus_3 65110 /* Etc/GMT-3 */ +#define fb_tzid_etc_gmt_minus_4 65109 /* Etc/GMT-4 */ +#define fb_tzid_etc_gmt_minus_5 65108 /* Etc/GMT-5 */ +#define fb_tzid_etc_gmt_minus_6 65107 /* Etc/GMT-6 */ +#define fb_tzid_etc_gmt_minus_7 65106 /* Etc/GMT-7 */ +#define fb_tzid_etc_gmt_minus_8 65105 /* Etc/GMT-8 */ +#define fb_tzid_etc_gmt_minus_9 65104 /* Etc/GMT-9 */ +#define fb_tzid_etc_gmt0 65103 /* Etc/GMT0 */ +#define fb_tzid_etc_greenwich 65102 /* Etc/Greenwich */ +#define fb_tzid_etc_uct 65101 /* Etc/UCT */ +#define fb_tzid_etc_utc 65100 /* Etc/UTC */ +#define fb_tzid_etc_universal 65099 /* Etc/Universal */ +#define fb_tzid_etc_zulu 65098 /* Etc/Zulu */ +#define fb_tzid_europe_amsterdam 65097 /* Europe/Amsterdam */ +#define fb_tzid_europe_andorra 65096 /* Europe/Andorra */ +#define fb_tzid_europe_astrakhan 65095 /* Europe/Astrakhan */ +#define fb_tzid_europe_athens 65094 /* Europe/Athens */ +#define fb_tzid_europe_belfast 65093 /* Europe/Belfast */ +#define fb_tzid_europe_belgrade 65092 /* Europe/Belgrade */ +#define fb_tzid_europe_berlin 65091 /* Europe/Berlin */ +#define fb_tzid_europe_bratislava 65090 /* Europe/Bratislava */ +#define fb_tzid_europe_brussels 65089 /* Europe/Brussels */ +#define fb_tzid_europe_bucharest 65088 /* Europe/Bucharest */ +#define fb_tzid_europe_budapest 65087 /* Europe/Budapest */ +#define fb_tzid_europe_busingen 65086 /* Europe/Busingen */ +#define fb_tzid_europe_chisinau 65085 /* Europe/Chisinau */ +#define fb_tzid_europe_copenhagen 65084 /* Europe/Copenhagen */ +#define fb_tzid_europe_dublin 65083 /* Europe/Dublin */ +#define fb_tzid_europe_gibraltar 65082 /* Europe/Gibraltar */ +#define fb_tzid_europe_guernsey 65081 /* Europe/Guernsey */ +#define fb_tzid_europe_helsinki 65080 /* Europe/Helsinki */ +#define fb_tzid_europe_isle_of_man 65079 /* Europe/Isle_of_Man */ +#define fb_tzid_europe_istanbul 65078 /* Europe/Istanbul */ +#define fb_tzid_europe_jersey 65077 /* Europe/Jersey */ +#define fb_tzid_europe_kaliningrad 65076 /* Europe/Kaliningrad */ +#define fb_tzid_europe_kiev 65075 /* Europe/Kiev */ +#define fb_tzid_europe_kirov 65074 /* Europe/Kirov */ +#define fb_tzid_europe_lisbon 65073 /* Europe/Lisbon */ +#define fb_tzid_europe_ljubljana 65072 /* Europe/Ljubljana */ +#define fb_tzid_europe_london 65071 /* Europe/London */ +#define fb_tzid_europe_luxembourg 65070 /* Europe/Luxembourg */ +#define fb_tzid_europe_madrid 65069 /* Europe/Madrid */ +#define fb_tzid_europe_malta 65068 /* Europe/Malta */ +#define fb_tzid_europe_mariehamn 65067 /* Europe/Mariehamn */ +#define fb_tzid_europe_minsk 65066 /* Europe/Minsk */ +#define fb_tzid_europe_monaco 65065 /* Europe/Monaco */ +#define fb_tzid_europe_moscow 65064 /* Europe/Moscow */ +#define fb_tzid_europe_nicosia 65063 /* Europe/Nicosia */ +#define fb_tzid_europe_oslo 65062 /* Europe/Oslo */ +#define fb_tzid_europe_paris 65061 /* Europe/Paris */ +#define fb_tzid_europe_podgorica 65060 /* Europe/Podgorica */ +#define fb_tzid_europe_prague 65059 /* Europe/Prague */ +#define fb_tzid_europe_riga 65058 /* Europe/Riga */ +#define fb_tzid_europe_rome 65057 /* Europe/Rome */ +#define fb_tzid_europe_samara 65056 /* Europe/Samara */ +#define fb_tzid_europe_san_marino 65055 /* Europe/San_Marino */ +#define fb_tzid_europe_sarajevo 65054 /* Europe/Sarajevo */ +#define fb_tzid_europe_saratov 65053 /* Europe/Saratov */ +#define fb_tzid_europe_simferopol 65052 /* Europe/Simferopol */ +#define fb_tzid_europe_skopje 65051 /* Europe/Skopje */ +#define fb_tzid_europe_sofia 65050 /* Europe/Sofia */ +#define fb_tzid_europe_stockholm 65049 /* Europe/Stockholm */ +#define fb_tzid_europe_tallinn 65048 /* Europe/Tallinn */ +#define fb_tzid_europe_tirane 65047 /* Europe/Tirane */ +#define fb_tzid_europe_tiraspol 65046 /* Europe/Tiraspol */ +#define fb_tzid_europe_ulyanovsk 65045 /* Europe/Ulyanovsk */ +#define fb_tzid_europe_uzhgorod 65044 /* Europe/Uzhgorod */ +#define fb_tzid_europe_vaduz 65043 /* Europe/Vaduz */ +#define fb_tzid_europe_vatican 65042 /* Europe/Vatican */ +#define fb_tzid_europe_vienna 65041 /* Europe/Vienna */ +#define fb_tzid_europe_vilnius 65040 /* Europe/Vilnius */ +#define fb_tzid_europe_volgograd 65039 /* Europe/Volgograd */ +#define fb_tzid_europe_warsaw 65038 /* Europe/Warsaw */ +#define fb_tzid_europe_zagreb 65037 /* Europe/Zagreb */ +#define fb_tzid_europe_zaporozhye 65036 /* Europe/Zaporozhye */ +#define fb_tzid_europe_zurich 65035 /* Europe/Zurich */ +#define fb_tzid_factory 65034 /* Factory */ +#define fb_tzid_gb 65033 /* GB */ +#define fb_tzid_gb_eire 65032 /* GB-Eire */ +#define fb_tzid_gmt_plus_0 65031 /* GMT+0 */ +#define fb_tzid_gmt_minus_0 65030 /* GMT-0 */ +#define fb_tzid_gmt0 65029 /* GMT0 */ +#define fb_tzid_greenwich 65028 /* Greenwich */ +#define fb_tzid_hst 65027 /* HST */ +#define fb_tzid_hongkong 65026 /* Hongkong */ +#define fb_tzid_iet 65025 /* IET */ +#define fb_tzid_ist 65024 /* IST */ +#define fb_tzid_iceland 65023 /* Iceland */ +#define fb_tzid_indian_antananarivo 65022 /* Indian/Antananarivo */ +#define fb_tzid_indian_chagos 65021 /* Indian/Chagos */ +#define fb_tzid_indian_christmas 65020 /* Indian/Christmas */ +#define fb_tzid_indian_cocos 65019 /* Indian/Cocos */ +#define fb_tzid_indian_comoro 65018 /* Indian/Comoro */ +#define fb_tzid_indian_kerguelen 65017 /* Indian/Kerguelen */ +#define fb_tzid_indian_mahe 65016 /* Indian/Mahe */ +#define fb_tzid_indian_maldives 65015 /* Indian/Maldives */ +#define fb_tzid_indian_mauritius 65014 /* Indian/Mauritius */ +#define fb_tzid_indian_mayotte 65013 /* Indian/Mayotte */ +#define fb_tzid_indian_reunion 65012 /* Indian/Reunion */ +#define fb_tzid_iran 65011 /* Iran */ +#define fb_tzid_israel 65010 /* Israel */ +#define fb_tzid_jst 65009 /* JST */ +#define fb_tzid_jamaica 65008 /* Jamaica */ +#define fb_tzid_japan 65007 /* Japan */ +#define fb_tzid_kwajalein 65006 /* Kwajalein */ +#define fb_tzid_libya 65005 /* Libya */ +#define fb_tzid_met 65004 /* MET */ +#define fb_tzid_mit 65003 /* MIT */ +#define fb_tzid_mst 65002 /* MST */ +#define fb_tzid_mst7mdt 65001 /* MST7MDT */ +#define fb_tzid_mexico_bajanorte 65000 /* Mexico/BajaNorte */ +#define fb_tzid_mexico_bajasur 64999 /* Mexico/BajaSur */ +#define fb_tzid_mexico_general 64998 /* Mexico/General */ +#define fb_tzid_net 64997 /* NET */ +#define fb_tzid_nst 64996 /* NST */ +#define fb_tzid_nz 64995 /* NZ */ +#define fb_tzid_nz_chat 64994 /* NZ-CHAT */ +#define fb_tzid_navajo 64993 /* Navajo */ +#define fb_tzid_plt 64992 /* PLT */ +#define fb_tzid_pnt 64991 /* PNT */ +#define fb_tzid_prc 64990 /* PRC */ +#define fb_tzid_prt 64989 /* PRT */ +#define fb_tzid_pst 64988 /* PST */ +#define fb_tzid_pst8pdt 64987 /* PST8PDT */ +#define fb_tzid_pacific_apia 64986 /* Pacific/Apia */ +#define fb_tzid_pacific_auckland 64985 /* Pacific/Auckland */ +#define fb_tzid_pacific_bougainville 64984 /* Pacific/Bougainville */ +#define fb_tzid_pacific_chatham 64983 /* Pacific/Chatham */ +#define fb_tzid_pacific_chuuk 64982 /* Pacific/Chuuk */ +#define fb_tzid_pacific_easter 64981 /* Pacific/Easter */ +#define fb_tzid_pacific_efate 64980 /* Pacific/Efate */ +#define fb_tzid_pacific_enderbury 64979 /* Pacific/Enderbury */ +#define fb_tzid_pacific_fakaofo 64978 /* Pacific/Fakaofo */ +#define fb_tzid_pacific_fiji 64977 /* Pacific/Fiji */ +#define fb_tzid_pacific_funafuti 64976 /* Pacific/Funafuti */ +#define fb_tzid_pacific_galapagos 64975 /* Pacific/Galapagos */ +#define fb_tzid_pacific_gambier 64974 /* Pacific/Gambier */ +#define fb_tzid_pacific_guadalcanal 64973 /* Pacific/Guadalcanal */ +#define fb_tzid_pacific_guam 64972 /* Pacific/Guam */ +#define fb_tzid_pacific_honolulu 64971 /* Pacific/Honolulu */ +#define fb_tzid_pacific_johnston 64970 /* Pacific/Johnston */ +#define fb_tzid_pacific_kiritimati 64969 /* Pacific/Kiritimati */ +#define fb_tzid_pacific_kosrae 64968 /* Pacific/Kosrae */ +#define fb_tzid_pacific_kwajalein 64967 /* Pacific/Kwajalein */ +#define fb_tzid_pacific_majuro 64966 /* Pacific/Majuro */ +#define fb_tzid_pacific_marquesas 64965 /* Pacific/Marquesas */ +#define fb_tzid_pacific_midway 64964 /* Pacific/Midway */ +#define fb_tzid_pacific_nauru 64963 /* Pacific/Nauru */ +#define fb_tzid_pacific_niue 64962 /* Pacific/Niue */ +#define fb_tzid_pacific_norfolk 64961 /* Pacific/Norfolk */ +#define fb_tzid_pacific_noumea 64960 /* Pacific/Noumea */ +#define fb_tzid_pacific_pago_pago 64959 /* Pacific/Pago_Pago */ +#define fb_tzid_pacific_palau 64958 /* Pacific/Palau */ +#define fb_tzid_pacific_pitcairn 64957 /* Pacific/Pitcairn */ +#define fb_tzid_pacific_pohnpei 64956 /* Pacific/Pohnpei */ +#define fb_tzid_pacific_ponape 64955 /* Pacific/Ponape */ +#define fb_tzid_pacific_port_moresby 64954 /* Pacific/Port_Moresby */ +#define fb_tzid_pacific_rarotonga 64953 /* Pacific/Rarotonga */ +#define fb_tzid_pacific_saipan 64952 /* Pacific/Saipan */ +#define fb_tzid_pacific_samoa 64951 /* Pacific/Samoa */ +#define fb_tzid_pacific_tahiti 64950 /* Pacific/Tahiti */ +#define fb_tzid_pacific_tarawa 64949 /* Pacific/Tarawa */ +#define fb_tzid_pacific_tongatapu 64948 /* Pacific/Tongatapu */ +#define fb_tzid_pacific_truk 64947 /* Pacific/Truk */ +#define fb_tzid_pacific_wake 64946 /* Pacific/Wake */ +#define fb_tzid_pacific_wallis 64945 /* Pacific/Wallis */ +#define fb_tzid_pacific_yap 64944 /* Pacific/Yap */ +#define fb_tzid_poland 64943 /* Poland */ +#define fb_tzid_portugal 64942 /* Portugal */ +#define fb_tzid_roc 64941 /* ROC */ +#define fb_tzid_rok 64940 /* ROK */ +#define fb_tzid_sst 64939 /* SST */ +#define fb_tzid_singapore 64938 /* Singapore */ +#define fb_tzid_systemv_ast4 64937 /* SystemV/AST4 */ +#define fb_tzid_systemv_ast4adt 64936 /* SystemV/AST4ADT */ +#define fb_tzid_systemv_cst6 64935 /* SystemV/CST6 */ +#define fb_tzid_systemv_cst6cdt 64934 /* SystemV/CST6CDT */ +#define fb_tzid_systemv_est5 64933 /* SystemV/EST5 */ +#define fb_tzid_systemv_est5edt 64932 /* SystemV/EST5EDT */ +#define fb_tzid_systemv_hst10 64931 /* SystemV/HST10 */ +#define fb_tzid_systemv_mst7 64930 /* SystemV/MST7 */ +#define fb_tzid_systemv_mst7mdt 64929 /* SystemV/MST7MDT */ +#define fb_tzid_systemv_pst8 64928 /* SystemV/PST8 */ +#define fb_tzid_systemv_pst8pdt 64927 /* SystemV/PST8PDT */ +#define fb_tzid_systemv_yst9 64926 /* SystemV/YST9 */ +#define fb_tzid_systemv_yst9ydt 64925 /* SystemV/YST9YDT */ +#define fb_tzid_turkey 64924 /* Turkey */ +#define fb_tzid_uct 64923 /* UCT */ +#define fb_tzid_us_alaska 64922 /* US/Alaska */ +#define fb_tzid_us_aleutian 64921 /* US/Aleutian */ +#define fb_tzid_us_arizona 64920 /* US/Arizona */ +#define fb_tzid_us_central 64919 /* US/Central */ +#define fb_tzid_us_east_indiana 64918 /* US/East-Indiana */ +#define fb_tzid_us_eastern 64917 /* US/Eastern */ +#define fb_tzid_us_hawaii 64916 /* US/Hawaii */ +#define fb_tzid_us_indiana_starke 64915 /* US/Indiana-Starke */ +#define fb_tzid_us_michigan 64914 /* US/Michigan */ +#define fb_tzid_us_mountain 64913 /* US/Mountain */ +#define fb_tzid_us_pacific 64912 /* US/Pacific */ +#define fb_tzid_us_pacific_new 64911 /* US/Pacific-New */ +#define fb_tzid_us_samoa 64910 /* US/Samoa */ +#define fb_tzid_utc 64909 /* UTC */ +#define fb_tzid_universal 64908 /* Universal */ +#define fb_tzid_vst 64907 /* VST */ +#define fb_tzid_w_su 64906 /* W-SU */ +#define fb_tzid_wet 64905 /* WET */ +#define fb_tzid_zulu 64904 /* Zulu */ +#define fb_tzid_america_nuuk 64903 /* America/Nuuk */ +#define fb_tzid_asia_qostanay 64902 /* Asia/Qostanay */ +#define fb_tzid_pacific_kanton 64901 /* Pacific/Kanton */ + +#endif /* FIREBIRD_TIME_ZONES_H */ diff --git a/src/firebird/include/firebird/UdrCppEngine.h b/src/firebird/include/firebird/UdrCppEngine.h new file mode 100644 index 00000000..d9aac7e5 --- /dev/null +++ b/src/firebird/include/firebird/UdrCppEngine.h @@ -0,0 +1,452 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Adriano dos Santos Fernandes + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2008 Adriano dos Santos Fernandes + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ + +#ifndef FIREBIRD_UDR_CPP_ENGINE +#define FIREBIRD_UDR_CPP_ENGINE + +#ifndef FB_UDR_STATUS_TYPE +#error FB_UDR_STATUS_TYPE must be defined with the Status class before UdrCppEngine.h inclusion. +#endif + +#include "./Message.h" +#include + + +// Build must export firebird_udr_plugin function. +#define FB_UDR_IMPLEMENT_ENTRY_POINT \ + namespace Firebird \ + { \ + namespace Udr \ + { \ + RegistrationNode* regFunctions = NULL; \ + RegistrationNode* regProcedures = NULL; \ + RegistrationNode* regTriggers = NULL; \ + } \ + } \ + \ + extern "C" FB_DLL_EXPORT FB_BOOLEAN* FB_UDR_PLUGIN_ENTRY_POINT(::Firebird::IStatus* status, \ + FB_BOOLEAN* theirUnloadFlag, ::Firebird::IUdrPlugin* udrPlugin) \ + { \ + ::Firebird::Udr::FactoryRegistration::finish(status, udrPlugin); \ + \ + class UnloadDetector \ + { \ + public: \ + UnloadDetector(FB_BOOLEAN* aTheirUnloadFlag, ::Firebird::IUdrPlugin* aUdrPlugin) \ + : myUnloadFlag(FB_FALSE), \ + theirUnloadFlag(aTheirUnloadFlag), \ + udrPlugin(aUdrPlugin) \ + { \ + } \ + \ + ~UnloadDetector() \ + { \ + if (!myUnloadFlag) \ + *theirUnloadFlag = FB_TRUE; \ + } \ + \ + FB_BOOLEAN myUnloadFlag; \ + FB_BOOLEAN* theirUnloadFlag; \ + ::Firebird::IUdrPlugin* udrPlugin; \ + }; \ + \ + static UnloadDetector unloadDetector(theirUnloadFlag, udrPlugin); \ + \ + return &unloadDetector.myUnloadFlag; \ + } + + +#define FB_UDR_BEGIN_FUNCTION(name) \ + namespace Func##name \ + { \ + class Impl; \ + \ + static ::Firebird::Udr::FunctionFactoryImpl factory(#name); \ + \ + class Impl : public ::Firebird::Udr::Function \ + { \ + public: \ + FB__UDR_COMMON_IMPL + +#define FB_UDR_END_FUNCTION \ + }; \ + } + +#define FB_UDR_EXECUTE_FUNCTION \ + void execute(FB_UDR_STATUS_TYPE* status, ::Firebird::IExternalContext* context, \ + void* in, void* out) \ + { \ + internalExecute(status, context, (InMessage::Type*) in, (OutMessage::Type*) out); \ + } \ + \ + void internalExecute(FB_UDR_STATUS_TYPE* status, ::Firebird::IExternalContext* context, \ + InMessage::Type* in, OutMessage::Type* out) + + +#define FB_UDR_BEGIN_PROCEDURE(name) \ + namespace Proc##name \ + { \ + class Impl; \ + \ + static ::Firebird::Udr::ProcedureFactoryImpl factory(#name); \ + \ + class Impl : public ::Firebird::Udr::Procedure \ + { \ + public: \ + FB__UDR_COMMON_IMPL + +#define FB_UDR_END_PROCEDURE \ + }; \ + }; \ + } + +#define FB_UDR_EXECUTE_PROCEDURE \ + ::Firebird::IExternalResultSet* open(FB_UDR_STATUS_TYPE* status, \ + ::Firebird::IExternalContext* context, void* in, void* out) \ + { \ + return new ResultSet(status, context, this, (InMessage::Type*) in, (OutMessage::Type*) out); \ + } \ + \ + class ResultSet : public ::Firebird::Udr::ResultSet \ + { \ + public: \ + ResultSet(FB_UDR_STATUS_TYPE* status, ::Firebird::IExternalContext* context, \ + Impl* const procedure, InMessage::Type* const in, OutMessage::Type* const out) \ + : ::Firebird::Udr::ResultSet( \ + context, procedure, in, out) + +#define FB_UDR_FETCH_PROCEDURE \ + FB_BOOLEAN fetch(FB_UDR_STATUS_TYPE* status) \ + { \ + return (FB_BOOLEAN) internalFetch(status); \ + } \ + \ + bool internalFetch(FB_UDR_STATUS_TYPE* status) + + +#define FB_UDR_BEGIN_TRIGGER(name) \ + namespace Trig##name \ + { \ + class Impl; \ + \ + static ::Firebird::Udr::TriggerFactoryImpl factory(#name); \ + \ + class Impl : public ::Firebird::Udr::Trigger \ + { \ + public: \ + FB__UDR_COMMON_IMPL + +#define FB_UDR_END_TRIGGER \ + }; \ + } + +#define FB_UDR_EXECUTE_TRIGGER \ + void execute(FB_UDR_STATUS_TYPE* status, ::Firebird::IExternalContext* context, \ + unsigned int action, void* oldFields, void* newFields) \ + { \ + internalExecute(status, context, action, \ + (FieldsMessage::Type*) oldFields, (FieldsMessage::Type*) newFields); \ + } \ + \ + void internalExecute(FB_UDR_STATUS_TYPE* status, ::Firebird::IExternalContext* context, \ + unsigned int action, \ + FieldsMessage::Type* oldFields, FieldsMessage::Type* newFields) + + +#define FB_UDR_CONSTRUCTOR \ + Impl(FB_UDR_STATUS_TYPE* const status, ::Firebird::IExternalContext* const context, \ + ::Firebird::IRoutineMetadata* const metadata__) \ + : master(context->getMaster()), \ + metadata(metadata__) + +#define FB_UDR_DESTRUCTOR \ + ~Impl() + + +#define FB_UDR_MESSAGE(name, fields) \ + FB_MESSAGE(name, FB_UDR_STATUS_TYPE, fields) + +#define FB_UDR_TRIGGER_MESSAGE(name, fields) \ + FB_TRIGGER_MESSAGE(name, FB_UDR_STATUS_TYPE, fields) + + +#define FB__UDR_COMMON_IMPL \ + Impl(const void* const, ::Firebird::IExternalContext* const context, \ + ::Firebird::IRoutineMetadata* const aMetadata) \ + : master(context->getMaster()), \ + metadata(aMetadata) \ + { \ + } \ + \ + ::Firebird::IMaster* master; \ + ::Firebird::IRoutineMetadata* metadata; + +#define FB__UDR_COMMON_TYPE(name) \ + struct name \ + { \ + typedef unsigned char Type; \ + static void setup(FB_UDR_STATUS_TYPE*, ::Firebird::IMetadataBuilder*) {} \ + } + + +namespace Firebird +{ + namespace Udr + { +//------------------------------------------------------------------------------ + + +template class Procedure; + + +template +class ResultSet : public IExternalResultSetImpl +{ +public: + ResultSet(IExternalContext* aContext, Procedure* aProcedure, + typename InMessage::Type* aIn, typename OutMessage::Type* aOut) + : context(aContext), + procedure(aProcedure), + in(aIn), + out(aOut) + { + } + +public: + void dispose() + { + delete static_cast(this); + } + +protected: + IExternalContext* const context; + Procedure* const procedure; + typename InMessage::Type* const in; + typename OutMessage::Type* const out; +}; + + +template +class Function : public IExternalFunctionImpl +{ +public: + FB__UDR_COMMON_TYPE(InMessage); + FB__UDR_COMMON_TYPE(OutMessage); + + void dispose() + { + delete static_cast(this); + } + + void getCharSet(StatusType* /*status*/, IExternalContext* /*context*/, + char* /*name*/, unsigned /*nameSize*/) + { + } +}; + + +template +class Procedure : public IExternalProcedureImpl +{ +public: + FB__UDR_COMMON_TYPE(InMessage); + FB__UDR_COMMON_TYPE(OutMessage); + + void dispose() + { + delete static_cast(this); + } + + void getCharSet(StatusType* /*status*/, IExternalContext* /*context*/, + char* /*name*/, unsigned /*nameSize*/) + { + } +}; + + +template +class Trigger : public IExternalTriggerImpl +{ +public: + FB__UDR_COMMON_TYPE(FieldsMessage); + + void dispose() + { + delete static_cast(this); + } + + void getCharSet(StatusType* /*status*/, IExternalContext* /*context*/, + char* /*name*/, unsigned /*nameSize*/) + { + } +}; + + +template struct RegistrationNode +{ + const char* name; + T* factory; + RegistrationNode* next; +}; + +extern RegistrationNode* regFunctions; +extern RegistrationNode* regProcedures; +extern RegistrationNode* regTriggers; + +class FactoryRegistration +{ +public: + template static void schedule(const char* name, T* factory, + RegistrationNode** list) + { + RegistrationNode* node = new RegistrationNode(); + node->name = name; + node->factory = factory; + node->next = *list; + + *list = node; + } + + static void finish(IStatus* status, IUdrPlugin* plugin) + { + CheckStatusWrapper statusWrapper(status); + + if (!run(&statusWrapper, plugin, &IUdrPlugin::registerFunction, regFunctions)) + return; + + if (!run(&statusWrapper, plugin, &IUdrPlugin::registerProcedure, regProcedures)) + return; + + if (!run(&statusWrapper, plugin, &IUdrPlugin::registerTrigger, regTriggers)) + return; + } + +private: + template + static bool run(CheckStatusWrapper* statusWrapper, IUdrPlugin* plugin, + void (IUdrPlugin::*routine)(CheckStatusWrapper* status, const char* name, T* factory), + RegistrationNode* list) + { + for (RegistrationNode* node = list; node; node = node->next) + { + (plugin->*routine)(statusWrapper, node->name, node->factory); + + if (statusWrapper->getState() & IStatus::STATE_ERRORS) + return false; + } + + return true; + } +}; + + +template class FunctionFactoryImpl : + public IUdrFunctionFactoryImpl, StatusType> +{ +public: + explicit FunctionFactoryImpl(const char* name) + { + FactoryRegistration::schedule(name, this, ®Functions); + } + + void dispose() + { + // Do not delete this. The instances are statically allocated. + } + + void setup(StatusType* status, IExternalContext* /*context*/, + IRoutineMetadata* /*metadata*/, IMetadataBuilder* in, IMetadataBuilder* out) + { + T::InMessage::setup(status, in); + T::OutMessage::setup(status, out); + } + + IExternalFunction* newItem(StatusType* status, IExternalContext* context, + IRoutineMetadata* metadata) + { + return new T(status, context, metadata); + } +}; + + +template class ProcedureFactoryImpl : + public IUdrProcedureFactoryImpl, StatusType> +{ +public: + explicit ProcedureFactoryImpl(const char* name) + { + FactoryRegistration::schedule(name, this, ®Procedures); + } + + void dispose() + { + // Do not delete this. The instances are statically allocated. + } + + void setup(StatusType* status, IExternalContext* /*context*/, + IRoutineMetadata* /*metadata*/, IMetadataBuilder* in, IMetadataBuilder* out) + { + T::InMessage::setup(status, in); + T::OutMessage::setup(status, out); + } + + IExternalProcedure* newItem(StatusType* status, IExternalContext* context, + IRoutineMetadata* metadata) + { + return new T(status, context, metadata); + } +}; + + +template class TriggerFactoryImpl : + public IUdrTriggerFactoryImpl, StatusType> +{ +public: + explicit TriggerFactoryImpl(const char* name) + { + FactoryRegistration::schedule(name, this, ®Triggers); + } + + void dispose() + { + // Do not delete this. The instances are statically allocated. + } + + void setup(StatusType* status, IExternalContext* /*context*/, + IRoutineMetadata* /*metadata*/, IMetadataBuilder* fields) + { + T::FieldsMessage::setup(status, fields); + } + + IExternalTrigger* newItem(StatusType* status, IExternalContext* context, + IRoutineMetadata* metadata) + { + return new T(status, context, metadata); + } +}; + + +//------------------------------------------------------------------------------ + } // namespace Udr +} // namespace Firebird + +#endif // FIREBIRD_UDR_CPP_ENGINE diff --git a/src/ibpp/_ibpp.h b/src/ibpp/_ibpp.h index bb6c770d..aa23894e 100644 --- a/src/ibpp/_ibpp.h +++ b/src/ibpp/_ibpp.h @@ -36,7 +36,10 @@ #endif #endif -#include "../firebird/include/ibase.h" // From Firebird installation +// From Firebird installation +#include "../firebird/include/ibase.h" +// Firebird 3+ interfaces +#include "../firebird/include/firebird/Interface.h" #if (defined(__GNUC__) && defined(IBPP_WINDOWS)) // UNSETTING flags used above for ibase.h -- Huge conflicts with libstdc++ ! diff --git a/src/ibpp/time.cpp b/src/ibpp/time.cpp index 63ba45da..41abb2c4 100644 --- a/src/ibpp/time.cpp +++ b/src/ibpp/time.cpp @@ -172,6 +172,27 @@ namespace ibpp_internals // These helper functions are used from row.cpp and from array.cpp. // +/* FB3+: get the IMaster-interface. + * This is needed to convert times with time zone correctly */ +const int FB_MAX_TIME_ZONE_NAME_LENGTH = 32; +typedef struct FBINTF +{ + Firebird::IMaster* master; + Firebird::ThrowStatusWrapper* status; + Firebird::IUtil* util; +} *PFBINTF; +static FBINTF gFbIntf = {}; +PFBINTF getFbIntf(void) +{ + if (gFbIntf.master != NULL) + return &gFbIntf; + + gFbIntf.master = Firebird::fb_get_master_interface(); + gFbIntf.status = new Firebird::ThrowStatusWrapper(gFbIntf.master->getStatus()); + gFbIntf.util = gFbIntf.master->getUtilInterface(); + return &gFbIntf; +} + void encodeDate(ISC_DATE& isc_dt, const IBPP::Date& dt) { // There simply has a shift of 15019 between the native Firebird @@ -198,7 +219,14 @@ void decodeTime(IBPP::Time& tm, const ISC_TIME& isc_tm) void decodeTimeTz(IBPP::Time& tm, const ISC_TIME_TZ& isc_tm) { - tm.SetTime(IBPP::Time::tmTimezone, (int)isc_tm.utc_time, isc_tm.time_zone); + unsigned h, m, s, frac; + char tzBuf[FB_MAX_TIME_ZONE_NAME_LENGTH]; + + PFBINTF fbIntf = getFbIntf(); + fbIntf->util->decodeTimeTz(fbIntf->status, &isc_tm, &h, &m, &s, &frac, + sizeof(tzBuf), tzBuf); + + tm.SetTime(IBPP::Time::tmTimezone, h, m, s, frac, isc_tm.time_zone); } void encodeTimestamp(ISC_TIMESTAMP& isc_ts, const IBPP::Timestamp& ts) @@ -215,8 +243,17 @@ void decodeTimestamp(IBPP::Timestamp& ts, const ISC_TIMESTAMP& isc_ts) void decodeTimestampTz(IBPP::Timestamp& ts, const ISC_TIMESTAMP_TZ& isc_ts) { - decodeDate(ts, isc_ts.utc_timestamp.timestamp_date); - ts.SetTime(IBPP::Time::tmTimezone, (int)isc_ts.utc_timestamp.timestamp_time, isc_ts.time_zone); + unsigned h, n, s, frac; + unsigned y, m, d; + char tzBuf[FB_MAX_TIME_ZONE_NAME_LENGTH]; + + PFBINTF fbIntf = getFbIntf(); + fbIntf->util->decodeTimeStampTz(fbIntf->status, &isc_ts, &y, &m, &d, &h, &n, &s, &frac, + sizeof(tzBuf), tzBuf); + + ts.Clear(); + ts.SetDate(y, m, d); + ts.SetTime(IBPP::Time::tmTimezone, h, n, s, frac, isc_ts.time_zone); } } From 8cfd6bc0efdcc7e0df0ae4493ab978f06937c284 Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Sat, 30 Dec 2023 00:03:05 +0100 Subject: [PATCH 2/3] Modify _ibpp.cpp to load fb_get_master_interface dynamically. * Remove some IBPP_LATE_BIND directives (not needed anymore) * define m_get_master_interface-prototype --- CMakeLists.txt | 3 +- src/ibpp/_ibpp.cpp | 13 ++++--- src/ibpp/_ibpp.h | 31 +++++++++++++++-- src/ibpp/fbinterfaces.cpp | 73 +++++++++++++++++++++++++++++++++++++++ src/ibpp/time.cpp | 33 ++++-------------- 5 files changed, 117 insertions(+), 36 deletions(-) create mode 100644 src/ibpp/fbinterfaces.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 8eb65d58..6fa6d0f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -315,6 +315,7 @@ list(APPEND IBPP_SOURCE_LIST ${SOURCEDIR}/ibpp/dbkey.cpp ${SOURCEDIR}/ibpp/events.cpp ${SOURCEDIR}/ibpp/exception.cpp + ${SOURCEDIR}/ibpp/fbinterfaces.cpp ${SOURCEDIR}/ibpp/ibint128.cpp ${SOURCEDIR}/ibpp/row.cpp ${SOURCEDIR}/ibpp/service.cpp @@ -391,7 +392,7 @@ if (UNIX AND NOT APPLE) add_definitions(-DIBPP_LINUX) add_definitions(-DFR_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}") # Need to link the fbclient lib in *nix systems - list(APPEND FR_LIBS -lfbclient) + list(APPEND FR_LIBS -lfbclient -ldl) include(CheckCXXSourceCompiles) check_cxx_source_compiles(" diff --git a/src/ibpp/_ibpp.cpp b/src/ibpp/_ibpp.cpp index 036d0c2c..86582da0 100644 --- a/src/ibpp/_ibpp.cpp +++ b/src/ibpp/_ibpp.cpp @@ -39,7 +39,6 @@ #endif #ifdef IBPP_UNIX -#ifdef IBPP_LATE_BIND #include #include @@ -48,7 +47,6 @@ static const char* fblibs[] = {"libfbembed.so.2.5","libfbembed.so.2.1","libfbclient.so.2",""}; #endif -#endif // Many compilers confuses those following min/max with macros min and max ! @@ -259,8 +257,6 @@ FBCLIENT* FBCLIENT::Call() #endif #ifdef IBPP_UNIX -#ifdef IBPP_LATE_BIND - mHandle = 0; if (getenv("FBLIB") != 0) mHandle = dlopen(getenv("FBLIB"),RTLD_LAZY); @@ -279,7 +275,6 @@ FBCLIENT* FBCLIENT::Call() throw LogicExceptionImpl("FBCLIENT::Call()", _("Can't find or load the Firebird Client Library")); -#endif #endif @@ -292,6 +287,9 @@ FBCLIENT* FBCLIENT::Call() #define FB_ENTRYPOINT(X) \ if ((m_##X = (proto_##X*)GetProcAddress(mHandle, "fb_"#X)) == 0) \ throw LogicExceptionImpl("FBCLIENT:gds()", _("Entry-point fb_"#X" not found")) +#define FB_ENTRYPOINT_NOTHROW(X) \ + if ((m_##X = (proto_##X*)GetProcAddress(mHandle, "fb_"#X)) == 0) \ + m_##X = NULL; #endif #ifdef IBPP_UNIX #ifdef IBPP_LATE_BIND @@ -305,6 +303,9 @@ FBCLIENT* FBCLIENT::Call() #define IB_ENTRYPOINT(X) m_##X = (proto_##X*)isc_##X #define FB_ENTRYPOINT(X) m_##X = (proto_##X*)fb_##X #endif +#define FB_ENTRYPOINT_NOTHROW(X) \ + if ((m_##X = (proto_##X*)dlsym(mHandle,"fb_"#X)) == 0) \ + m_##X = NULL; #endif IB_ENTRYPOINT(create_database); @@ -354,6 +355,8 @@ FBCLIENT* FBCLIENT::Call() IB_ENTRYPOINT(service_start); IB_ENTRYPOINT(service_query); + FB_ENTRYPOINT_NOTHROW(get_master_interface); + mReady = true; } diff --git a/src/ibpp/_ibpp.h b/src/ibpp/_ibpp.h index aa23894e..8655bddd 100644 --- a/src/ibpp/_ibpp.h +++ b/src/ibpp/_ibpp.h @@ -386,6 +386,11 @@ typedef void ISC_EXPORT proto_encode_sql_time (void *, typedef void ISC_EXPORT proto_encode_timestamp (void *, ISC_TIMESTAMP *); +// +// FB3+ / get master-interface (fb_get_master_interface) +// +typedef Firebird::IMaster* ISC_EXPORT proto_get_master_interface(); + // // Internal binding structure to the FBCLIENT DLL // @@ -401,9 +406,7 @@ struct FBCLIENT std::string mSearchPaths; // Optional additional search paths #endif #ifdef IBPP_UNIX -#ifdef IBPP_LATE_BIND - void *mHandle; -#endif + void *mHandle; #endif @@ -470,6 +473,8 @@ struct FBCLIENT //proto_encode_sql_time* m_encode_sql_time; //proto_encode_timestamp* m_encode_timestamp; + proto_get_master_interface* m_get_master_interface; + // Constructor (No need for a specific destructor) FBCLIENT() { @@ -1479,6 +1484,26 @@ struct consts // See _ibpp.cpp for initializations of these constants static const int32_t max32; }; +/* FB3+: get the IMaster-interface. + * This is needed to convert times with time zone correctly (FB4+). + * Implemented in fbinterfaces.cpp */ +const int FB_MAX_TIME_ZONE_NAME_LENGTH = 32; +class fbIntfClass +{ + private: + static fbIntfClass gmFbIntf; + bool init(std::string& errmsg); + public: + Firebird::IMaster* mMaster; + Firebird::ThrowStatusWrapper* mStatus; + Firebird::IUtil* mUtil; + + fbIntfClass(); + ~fbIntfClass(); + + static fbIntfClass* getInstance(); +}; + } // namespace ibpp_internal #endif // __INTERNAL_IBPP_H__ diff --git a/src/ibpp/fbinterfaces.cpp b/src/ibpp/fbinterfaces.cpp new file mode 100644 index 00000000..7ac1eb82 --- /dev/null +++ b/src/ibpp/fbinterfaces.cpp @@ -0,0 +1,73 @@ +/* + Copyright (c) 2004-2023 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "_ibpp.h" + +namespace ibpp_internals +{ + +fbIntfClass fbIntfClass::gmFbIntf; + +fbIntfClass::fbIntfClass() +{ + mMaster = NULL; + mStatus = NULL; + mUtil = NULL; +} + +fbIntfClass* fbIntfClass::getInstance() +{ + std::string errMsg; + if (!gmFbIntf.init(errMsg)) + throw LogicExceptionImpl(errMsg); + return &gmFbIntf; +} + +bool fbIntfClass::init(std::string& errmsg) +{ + if (mMaster != NULL) + return true; + + if (gds.m_get_master_interface == NULL) + { + errmsg = "fb_get_master_interface is not present in fbclient.so/dll. " + "You need a fbclient 4.0+!"; + return false; + } + + mMaster = gds.m_get_master_interface(); + mStatus = new Firebird::ThrowStatusWrapper(mMaster->getStatus()); + mUtil = mMaster->getUtilInterface(); + return true; +} + +fbIntfClass::~fbIntfClass() +{ + mMaster = NULL; + if (mStatus != NULL) + delete mStatus; + mStatus = NULL; + mUtil = NULL; +} + +} // ibpp_internals \ No newline at end of file diff --git a/src/ibpp/time.cpp b/src/ibpp/time.cpp index 41abb2c4..e3fde0c4 100644 --- a/src/ibpp/time.cpp +++ b/src/ibpp/time.cpp @@ -172,27 +172,6 @@ namespace ibpp_internals // These helper functions are used from row.cpp and from array.cpp. // -/* FB3+: get the IMaster-interface. - * This is needed to convert times with time zone correctly */ -const int FB_MAX_TIME_ZONE_NAME_LENGTH = 32; -typedef struct FBINTF -{ - Firebird::IMaster* master; - Firebird::ThrowStatusWrapper* status; - Firebird::IUtil* util; -} *PFBINTF; -static FBINTF gFbIntf = {}; -PFBINTF getFbIntf(void) -{ - if (gFbIntf.master != NULL) - return &gFbIntf; - - gFbIntf.master = Firebird::fb_get_master_interface(); - gFbIntf.status = new Firebird::ThrowStatusWrapper(gFbIntf.master->getStatus()); - gFbIntf.util = gFbIntf.master->getUtilInterface(); - return &gFbIntf; -} - void encodeDate(ISC_DATE& isc_dt, const IBPP::Date& dt) { // There simply has a shift of 15019 between the native Firebird @@ -222,9 +201,9 @@ void decodeTimeTz(IBPP::Time& tm, const ISC_TIME_TZ& isc_tm) unsigned h, m, s, frac; char tzBuf[FB_MAX_TIME_ZONE_NAME_LENGTH]; - PFBINTF fbIntf = getFbIntf(); - fbIntf->util->decodeTimeTz(fbIntf->status, &isc_tm, &h, &m, &s, &frac, - sizeof(tzBuf), tzBuf); + fbIntfClass* fbIntf = fbIntfClass::getInstance(); + fbIntf->mUtil->decodeTimeTz(fbIntf->mStatus, &isc_tm, &h, &m, &s, &frac, + sizeof(tzBuf), tzBuf); tm.SetTime(IBPP::Time::tmTimezone, h, m, s, frac, isc_tm.time_zone); } @@ -247,9 +226,9 @@ void decodeTimestampTz(IBPP::Timestamp& ts, const ISC_TIMESTAMP_TZ& isc_ts) unsigned y, m, d; char tzBuf[FB_MAX_TIME_ZONE_NAME_LENGTH]; - PFBINTF fbIntf = getFbIntf(); - fbIntf->util->decodeTimeStampTz(fbIntf->status, &isc_ts, &y, &m, &d, &h, &n, &s, &frac, - sizeof(tzBuf), tzBuf); + fbIntfClass* fbIntf = fbIntfClass::getInstance(); + fbIntf->mUtil->decodeTimeStampTz(fbIntf->mStatus, &isc_ts, &y, &m, &d, &h, &n, &s, &frac, + sizeof(tzBuf), tzBuf); ts.Clear(); ts.SetDate(y, m, d); From d6d3157011e295f13889cd99165662b5324ecc26 Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Sat, 30 Dec 2023 12:05:45 +0100 Subject: [PATCH 3/3] The returned timezone name is now used to detect that fbclient failed to load ICU (GMT-fallback). * In this case, fbclient (IUtil.decodeTime(stamp)Tz) returns "GMT*" as the time zone name. * "GMT*" is now also displayed by flamerobin in this case. --- src/gui/DataGeneratorFrame.cpp | 4 +-- src/gui/InsertParametersDialog.cpp | 4 +-- src/gui/controls/DataGridRowBuffer.cpp | 29 +++++++++++++++++++ src/gui/controls/DataGridRowBuffer.h | 2 ++ src/gui/controls/DataGridRows.cpp | 36 ++++++++++++++++++------ src/ibpp/ibpp.h | 21 ++++++++++---- src/ibpp/time.cpp | 39 ++++++++++++++++---------- 7 files changed, 101 insertions(+), 34 deletions(-) diff --git a/src/gui/DataGeneratorFrame.cpp b/src/gui/DataGeneratorFrame.cpp index 5a5a68ff..2a9e1726 100644 --- a/src/gui/DataGeneratorFrame.cpp +++ b/src/gui/DataGeneratorFrame.cpp @@ -1185,7 +1185,7 @@ void setFromFile(IBPP::Statement st, int param, int y, mo, d, h, mi, s, t; IBPP::dtoi(mydate, &y, &mo, &d); IBPP::ttoi(mytime, &h, &mi, &s, &t); - st->Set(param, IBPP::Timestamp(y, mo, d, IBPP::Time::tmNone, h, mi, s, t, IBPP::Time::TZ_NONE)); + st->Set(param, IBPP::Timestamp(y, mo, d, IBPP::Time::tmNone, h, mi, s, t, IBPP::Time::TZ_NONE, NULL)); break; } case IBPP::sdBlob: @@ -1451,7 +1451,7 @@ void setDatetime(IBPP::Statement st, int param, GeneratorSettings* gs, int y, mo, d, h, mi, s, t; IBPP::dtoi(myDate, &y, &mo, &d); IBPP::ttoi(myTime, &h, &mi, &s, &t); - st->Set(param, IBPP::Timestamp(y, mo, d, IBPP::Time::tmNone, h, mi, s, t, IBPP::Time::TZ_NONE)); + st->Set(param, IBPP::Timestamp(y, mo, d, IBPP::Time::tmNone, h, mi, s, t, IBPP::Time::TZ_NONE, NULL)); } } diff --git a/src/gui/InsertParametersDialog.cpp b/src/gui/InsertParametersDialog.cpp index 91fe22ce..508f3f5c 100644 --- a/src/gui/InsertParametersDialog.cpp +++ b/src/gui/InsertParametersDialog.cpp @@ -616,7 +616,7 @@ void InsertParametersDialog::parseTime(int row, const wxString& source) int hr = 0, mn = 0, sc = 0, ms = 0; if (!GridCellFormats::get().parseTime(it, temp.end(), hr, mn, sc, ms)) throw FRError(_("Cannot parse time")); - itm.SetTime(IBPP::Time::tmNone, hr, mn, sc, 10 * ms, IBPP::Time::TZ_NONE); + itm.SetTime(IBPP::Time::tmNone, hr, mn, sc, 10 * ms, IBPP::Time::TZ_NONE, NULL); } statementM->Set(row+1, itm); } @@ -651,7 +651,7 @@ void InsertParametersDialog::parseTimeStamp(int row, const wxString& source) throw FRError(_("Cannot parse timestamp")); } its.SetDate(y, m, d); - its.SetTime(IBPP::Time::tmNone, hr, mn, sc, 10 * ms, IBPP::Time::TZ_NONE); + its.SetTime(IBPP::Time::tmNone, hr, mn, sc, 10 * ms, IBPP::Time::TZ_NONE, NULL); } // all done, set the value diff --git a/src/gui/controls/DataGridRowBuffer.cpp b/src/gui/controls/DataGridRowBuffer.cpp index 4c4774ac..3b5f4b32 100644 --- a/src/gui/controls/DataGridRowBuffer.cpp +++ b/src/gui/controls/DataGridRowBuffer.cpp @@ -32,6 +32,17 @@ #include "gui/controls/DataGridRowBuffer.h" +// Time + timestamp internal struct +union TimeZoneBufferValue +{ + int rawValue; + struct _s + { + uint16_t timeZone16; + uint8_t isGmtFallback:1; + } s; +}; + DataGridRowBuffer::DataGridRowBuffer(unsigned fieldCount) { isModifiedM = 0; @@ -138,6 +149,16 @@ bool DataGridRowBuffer::getValue(unsigned offset, IBPP::DBKey& value, return true; } +bool DataGridRowBuffer::getValue32(unsigned offset, int& timeZone, bool& isGmtFallback) +{ + TimeZoneBufferValue value; + if (!getValue(offset, value.rawValue)) + return false; + timeZone = value.s.timeZone16; + isGmtFallback = (bool)value.s.isGmtFallback; + return true; +} + bool DataGridRowBuffer::isFieldNA(unsigned /*num*/) { return false; @@ -258,6 +279,14 @@ void DataGridRowBuffer::setValue(unsigned offset, IBPP::DBKey value) invalidateIsDeletable(); } +void DataGridRowBuffer::setValue32(unsigned offset, int timeZone, bool isGmtFallback) +{ + TimeZoneBufferValue value; + value.s.timeZone16 = (uint16_t)timeZone; + value.s.isGmtFallback = isGmtFallback; + setValue(offset, value.rawValue); +} + bool DataGridRowBuffer::isInserted() { return false; diff --git a/src/gui/controls/DataGridRowBuffer.h b/src/gui/controls/DataGridRowBuffer.h index e3aa8c98..4355d142 100644 --- a/src/gui/controls/DataGridRowBuffer.h +++ b/src/gui/controls/DataGridRowBuffer.h @@ -72,6 +72,7 @@ class DataGridRowBuffer bool getValue(unsigned offset, int64_t& value); bool getValue(unsigned offset, int128_t& value); bool getValue(unsigned offset, IBPP::DBKey& value, unsigned size); + bool getValue32(unsigned offset, int& timeZone, bool& isGmtFallback); bool isFieldNull(unsigned num); void setFieldNull(unsigned num, bool isNull); virtual bool isFieldNA(unsigned num); @@ -88,6 +89,7 @@ class DataGridRowBuffer void setValue(unsigned offset, int64_t value); void setValue(unsigned offset, int128_t value); void setValue(unsigned offset, IBPP::DBKey value); + void setValue32(unsigned offset, int timeZone, bool isGmtFallback); virtual bool isInserted(); bool isFieldModified(unsigned num); diff --git a/src/gui/controls/DataGridRows.cpp b/src/gui/controls/DataGridRows.cpp index 09631018..b51216f9 100644 --- a/src/gui/controls/DataGridRows.cpp +++ b/src/gui/controls/DataGridRows.cpp @@ -369,11 +369,17 @@ void GridCellFormats::formatAppendTz(wxString &s, IBPP::Time &t, bool hasTz, int timezone = t.GetTimezone(); if (showTimezoneInfoM == tzRawId) { + if (t.IsTimeZoneGmtFallback()) + timezone = 0; s += wxString::Format(" (%05d)", timezone); } else { - wxString tzName = db->getTimezoneName(timezone); + wxString tzName; + if (t.IsTimeZoneGmtFallback()) + tzName = "GMT*"; + else + tzName = db->getTimezoneName(timezone); s += wxString::Format(" (%s)", tzName); } } @@ -993,9 +999,14 @@ bool TimeColumnDef::readFromBuffer(DataGridRowBuffer* buffer, IBPP::Time &t) if (withTimezoneM) { - tzMode = IBPP::Time::tmTimezone; - if (!buffer->getValue(offsetM + sizeof(int), vTimezone)) + bool vIsGmtFallback; + if (!buffer->getValue32(offsetM + sizeof(int), + vTimezone, vIsGmtFallback)) return wxEmptyString; + + tzMode = IBPP::Time::tmTimezone; + if (vIsGmtFallback) + tzMode = IBPP::Time::tmTimezoneGmtFallback; } else { @@ -1011,7 +1022,8 @@ void TimeColumnDef::writeToBuffer(DataGridRowBuffer* buffer, IBPP::Time &t) wxASSERT(buffer); buffer->setValue(offsetM, t.GetTime()); if (withTimezoneM) - buffer->setValue(offsetM + sizeof(int), t.GetTimezone()); + buffer->setValue32(offsetM + sizeof(int), + t.GetTimezone(), t.IsTimeZoneGmtFallback()); } wxString TimeColumnDef::getAsString(DataGridRowBuffer* buffer, Database* db) @@ -1053,7 +1065,7 @@ void TimeColumnDef::setFromString(DataGridRowBuffer* buffer, int hr = 0, mn = 0, sc = 0, ms = 0; if (!GridCellFormats::get().parseTime(it, temp.end(), hr, mn, sc, ms)) throw FRError(_("Cannot parse time")); - itm.SetTime(IBPP::Time::tmNone, hr, mn, sc, 10 * ms, IBPP::Time::TZ_NONE); + itm.SetTime(IBPP::Time::tmNone, hr, mn, sc, 10 * ms, IBPP::Time::TZ_NONE, NULL); } writeToBuffer(buffer, itm); } @@ -1108,7 +1120,8 @@ void TimestampColumnDef::writeToBuffer(DataGridRowBuffer* buffer, IBPP::Timestam buffer->setValue(offsetM, ts.GetDate()); buffer->setValue(offsetM + sizeof(int), ts.GetTime()); if (withTimezoneM) - buffer->setValue(offsetM + sizeof(int) * 2, ts.GetTimezone()); + buffer->setValue32(offsetM + sizeof(int) * 2, + ts.GetTimezone(), ts.IsTimeZoneGmtFallback()); } bool TimestampColumnDef::readFromBuffer(DataGridRowBuffer* buffer, IBPP::Timestamp &ts) @@ -1126,9 +1139,14 @@ bool TimestampColumnDef::readFromBuffer(DataGridRowBuffer* buffer, IBPP::Timesta int vTimezone = 0; if (withTimezoneM) { - tzMode = IBPP::Time::tmTimezone; - if (!buffer->getValue(offsetM + sizeof(int) * 2, vTimezone)) + bool vIsGmtFallback; + if (!buffer->getValue32(offsetM + sizeof(int) * 2, + vTimezone, vIsGmtFallback)) return wxEmptyString; + + tzMode = IBPP::Time::tmTimezone; + if (vIsGmtFallback) + tzMode = IBPP::Time::tmTimezoneGmtFallback; } else { @@ -1199,7 +1217,7 @@ void TimestampColumnDef::setFromString(DataGridRowBuffer* buffer, throw FRError(_("Cannot parse timestamp")); } its.SetDate(y, m, d); - its.SetTime(IBPP::Time::tmNone, hr, mn, sc, 10 * ms, IBPP::Time::TZ_NONE); + its.SetTime(IBPP::Time::tmNone, hr, mn, sc, 10 * ms, IBPP::Time::TZ_NONE, NULL); } writeToBuffer(buffer, its); diff --git a/src/ibpp/ibpp.h b/src/ibpp/ibpp.h index fdd46838..85b73e1c 100644 --- a/src/ibpp/ibpp.h +++ b/src/ibpp/ibpp.h @@ -353,9 +353,14 @@ namespace IBPP tmNone, // ISC_TIME_TZ / ISC_TIMESTAMP_TZ tmTimezone, + // small case when fbclient fails to load ICU + // in this case fbclient returns time zone name "GMT*" + tmTimezoneGmtFallback }; - /* no time zone -> utc = local */ - const static int TZ_NONE = 0; + // no time zone -> utc = local + const static int TZ_NONE = 0; + // GMT-fallback (returned by fbclient) + const static std::string TZ_GMT_FALLBACK; protected: // The time, in ten-thousandths of seconds since midnight - UTC and TZ mutable int mTime; @@ -367,7 +372,8 @@ namespace IBPP public: void Clear() { mTime = 0; mTimezoneMode = tmNone; mTimezone = TZ_NONE; } void Now(); - void SetTime(TimezoneMode tzMode, int hour, int minute, int second, int tenthousandths, int timezone); + void SetTime(TimezoneMode tzMode, int hour, int minute, int second, int tenthousandths, int timezone, + char* fbTimezoneName); void SetTime(TimezoneMode tzMode, int tm, int timezone); void GetTime(int& hour, int& minute, int& second) const; void GetTime(int& hour, int& minute, int& second, int& tenthousandths) const; @@ -379,13 +385,16 @@ namespace IBPP int SubSeconds() const; // Actually tenthousandths of seconds Time() { Clear(); } Time(TimezoneMode tzMode, int tm, int timezone) { SetTime(tzMode, tm, timezone); } - Time(TimezoneMode tzMode, int hour, int minute, int second, int tenthousandths, int timezone); + Time(TimezoneMode tzMode, int hour, int minute, int second, int tenthousandths, int timezone, + char* fbTimezoneName); Time(const Time&); // Copy Constructor Time& operator=(const Timestamp&); // Timestamp Assignment operator Time& operator=(const Time&); // Time Assignment operator bool operator==(const Time& rv) { return mTime == rv.GetTime(); } bool operator<(const Time& rv) { return mTime < rv.GetTime(); } + + bool IsTimeZoneGmtFallback() { return mTimezoneMode == tmTimezoneGmtFallback; } }; /* Class Timestamp represent a date AND a time. It is usefull in @@ -405,8 +414,8 @@ namespace IBPP Timestamp(int y, int m, int d) { Date::SetDate(y, m, d); Time::Clear(); } - Timestamp(int y, int mo, int d, TimezoneMode tzMode, int h, int mi, int s, int t, int tz) - { Date::SetDate(y, mo, d); Time::SetTime(tzMode, h, mi, s, t, tz); } + Timestamp(int y, int mo, int d, TimezoneMode tzMode, int h, int mi, int s, int t, int tz, char* fbTimezoneName) + { Date::SetDate(y, mo, d); Time::SetTime(tzMode, h, mi, s, t, tz, fbTimezoneName); } Timestamp(const Timestamp& rv) : Date(rv.mDate), Time::Time(rv) {} // Copy Constructor diff --git a/src/ibpp/time.cpp b/src/ibpp/time.cpp index e3fde0c4..80654d87 100644 --- a/src/ibpp/time.cpp +++ b/src/ibpp/time.cpp @@ -30,11 +30,13 @@ using namespace ibpp_internals; +const std::string IBPP::Time::TZ_GMT_FALLBACK = "GMT*"; + void IBPP::Time::Now() { time_t systime = time(0); tm* loctime = localtime(&systime); - SetTime(IBPP::Time::tmNone, loctime->tm_hour, loctime->tm_min, loctime->tm_sec, 0, IBPP::Time::TZ_NONE); + SetTime(IBPP::Time::tmNone, loctime->tm_hour, loctime->tm_min, loctime->tm_sec, 0, IBPP::Time::TZ_NONE, NULL); } void IBPP::Time::SetTime(TimezoneMode tzMode, int tm, int timezone) @@ -47,17 +49,23 @@ void IBPP::Time::SetTime(TimezoneMode tzMode, int tm, int timezone) SetTimezone(timezone); } -void IBPP::Time::SetTime(TimezoneMode tzMode, int hour, int minute, int second, int tenthousandths, int timezone) +void IBPP::Time::SetTime(TimezoneMode tzMode, int hour, int minute, int second, int tenthousandths, int timezone, char* fbTimezoneName) { - if (hour < 0 || hour > 23 || - minute < 0 || minute > 59 || - second < 0 || second > 59 || - tenthousandths < 0 || tenthousandths > 9999) - throw LogicExceptionImpl("Time::SetTime", - _("Invalid hour, minute, second values")); - int tm; - IBPP::itot(&tm, hour, minute, second, tenthousandths); - SetTime(tzMode, tm, timezone); + if (hour < 0 || hour > 23 || + minute < 0 || minute > 59 || + second < 0 || second > 59 || + tenthousandths < 0 || tenthousandths > 9999) + throw LogicExceptionImpl("Time::SetTime", + _("Invalid hour, minute, second values")); + + // Check, if fbclient fails to load icu. In this case + // TimeZoneName "GMT*" ist returned. + if ((tzMode = tmTimezone) && (fbTimezoneName == TZ_GMT_FALLBACK)) + tzMode = tmTimezoneGmtFallback; + + int tm; + IBPP::itot(&tm, hour, minute, second, tenthousandths); + SetTime(tzMode, tm, timezone); } void IBPP::Time::SetTimezone(int tz) @@ -108,9 +116,9 @@ int IBPP::Time::SubSeconds() const // Actually tenthousandths of seconds return tenthousandths; } -IBPP::Time::Time(TimezoneMode tzMode, int hour, int minute, int second, int tenthousandths, int timezone) +IBPP::Time::Time(TimezoneMode tzMode, int hour, int minute, int second, int tenthousandths, int timezone, char* fbTimezoneName) { - SetTime(tzMode, hour, minute, second, tenthousandths, timezone); + SetTime(tzMode, hour, minute, second, tenthousandths, timezone, fbTimezoneName); } IBPP::Time::Time(const IBPP::Time& copied) @@ -200,12 +208,13 @@ void decodeTimeTz(IBPP::Time& tm, const ISC_TIME_TZ& isc_tm) { unsigned h, m, s, frac; char tzBuf[FB_MAX_TIME_ZONE_NAME_LENGTH]; + IBPP::Time::TimezoneMode tzMode = IBPP::Time::tmTimezone; fbIntfClass* fbIntf = fbIntfClass::getInstance(); fbIntf->mUtil->decodeTimeTz(fbIntf->mStatus, &isc_tm, &h, &m, &s, &frac, sizeof(tzBuf), tzBuf); - tm.SetTime(IBPP::Time::tmTimezone, h, m, s, frac, isc_tm.time_zone); + tm.SetTime(tzMode, h, m, s, frac, isc_tm.time_zone, tzBuf); } void encodeTimestamp(ISC_TIMESTAMP& isc_ts, const IBPP::Timestamp& ts) @@ -232,7 +241,7 @@ void decodeTimestampTz(IBPP::Timestamp& ts, const ISC_TIMESTAMP_TZ& isc_ts) ts.Clear(); ts.SetDate(y, m, d); - ts.SetTime(IBPP::Time::tmTimezone, h, n, s, frac, isc_ts.time_zone); + ts.SetTime(IBPP::Time::tmTimezone, h, n, s, frac, isc_ts.time_zone, tzBuf); } }