/*
 * File: public.h
 * 
 * Purpose: Import/export defines for using/building DLL interfaces.
 *
 * Use this platform-independent EXPORT macro to define any symbols
 * that must be exported from your DSO/DLL.  (Under Linux, all symbols
 * in a DSO are exported, but under Windows, you must formally specify
 * each public entry point.)
 */

/*
 * Do not put #ifndef __PUBLIC_H__ around this file.
 * You may need to include it multiple times in the same translation unit:
 * once with IMPORTING defined, once with EXPORTING defined.
 */
#undef IMPORT
#undef EXPORT

/*
 * Under Borland, use __import and __export keywords.
 */
#if defined(__BORLANDC__)
    #define EXPORT __export
    #define IMPORT __import
/*
 * Under Microsoft, use __declspec
 */
#elif defined(_MSC_VER)
    #define EXPORT __declspec(dllexport)
    #define IMPORT __declspec(dllimport)
/*
 * Otherwise, don't use
 */
#else
    #define EXPORT
    #define IMPORT
#endif

/*
 * If building a DLL, define "EXPORTING" before including this.
 * If using a DLL, define "IMPORTING" before including this.
 * Use PUBLIC in class definitions and global declarations.
 * Use EXPORT in function definitions and global definitions.
 */
#undef PUBLIC
#if defined(IMPORTING)
#define PUBLIC IMPORT
#elif defined(EXPORTING)
#define PUBLIC EXPORT
#else
#define PUBLIC
#endif
