Important bug fix for MacOS

Unlike Linux, RTTI does not work in MacOS/clang when the classes
originate from different compile units. I think that Linux's C++
runtime not only checks for identical vtable, but alternatively
for same name. On MacOS, dynamic_cast will fail instead. This fix
solves this issue by placing the important steam format option
specializations into a single specific shared object (the DB plugin).
This commit is contained in:
Matthias Koefferlein 2018-10-04 14:10:22 -07:00
parent d8b1808234
commit 4ffcaba5d1
4 changed files with 12 additions and 8 deletions

View File

@ -25,6 +25,7 @@
#include "dbSaveLayoutOptions.h"
#include "dbLoadLayoutOptions.h"
#include "dbPluginCommon.h"
namespace db
{
@ -34,7 +35,7 @@ namespace db
* NOTE: this structure is non-public linkage by intention. This way it's instantiated
* in all compile units and the shared object does not need to be linked.
*/
class CIFReaderOptions
class DB_PLUGIN_PUBLIC CIFReaderOptions
: public FormatSpecificReaderOptions
{
public:
@ -118,7 +119,7 @@ public:
* NOTE: this structure is non-public linkage by intention. This way it's instantiated
* in all compile units and the shared object does not need to be linked.
*/
class CIFWriterOptions
class DB_PLUGIN_PUBLIC CIFWriterOptions
: public FormatSpecificWriterOptions
{
public:

View File

@ -25,6 +25,7 @@
#include "dbLoadLayoutOptions.h"
#include "dbSaveLayoutOptions.h"
#include "dbPluginCommon.h"
namespace db
{
@ -34,7 +35,7 @@ namespace db
* NOTE: this structure is non-public linkage by intention. This way it's instantiated
* in all compile units and the shared object does not need to be linked.
*/
class DXFReaderOptions
class DB_PLUGIN_PUBLIC DXFReaderOptions
: public FormatSpecificReaderOptions
{
public:
@ -192,7 +193,7 @@ public:
* NOTE: this structure is non-public linkage by intention. This way it's instantiated
* in all compile units and the shared object does not need to be linked.
*/
class DXFWriterOptions
class DB_PLUGIN_PUBLIC DXFWriterOptions
: public FormatSpecificWriterOptions
{
public:

View File

@ -25,6 +25,7 @@
#include "dbSaveLayoutOptions.h"
#include "dbLoadLayoutOptions.h"
#include "dbPluginCommon.h"
namespace db
{
@ -34,7 +35,7 @@ namespace db
* NOTE: this structure is non-public linkage by intention. This way it's instantiated
* in all compile units and the shared object does not need to be linked.
*/
class GDS2ReaderOptions
class DB_PLUGIN_PUBLIC GDS2ReaderOptions
: public FormatSpecificReaderOptions
{
public:
@ -97,7 +98,7 @@ public:
* NOTE: this structure is non-public linkage by intention. This way it's instantiated
* in all compile units and the shared object does not need to be linked.
*/
class GDS2WriterOptions
class DB_PLUGIN_PUBLIC GDS2WriterOptions
: public FormatSpecificWriterOptions
{
public:

View File

@ -25,6 +25,7 @@
#include "dbSaveLayoutOptions.h"
#include "dbLoadLayoutOptions.h"
#include "dbPluginCommon.h"
namespace db
{
@ -34,7 +35,7 @@ namespace db
* NOTE: this structure is non-public linkage by intention. This way it's instantiated
* in all compile units and the shared object does not need to be linked.
*/
class OASISReaderOptions
class DB_PLUGIN_PUBLIC OASISReaderOptions
: public FormatSpecificReaderOptions
{
public:
@ -92,7 +93,7 @@ public:
* NOTE: this structure is non-public linkage by intention. This way it's instantiated
* in all compile units and the shared object does not need to be linked.
*/
class OASISWriterOptions
class DB_PLUGIN_PUBLIC OASISWriterOptions
: public FormatSpecificWriterOptions
{
public: