Get rid of export macro, use CMake

Wed, 09 May 2018 08:56:34 +0200

author
David Demelier <markand@malikania.fr>
date
Wed, 09 May 2018 08:56:34 +0200
changeset 6
d9c9a35cb4b2
parent 5
ebcc8c9c8831
child 7
6ecc84c922b2

Get rid of export macro, use CMake

generator/make-unicode/unicode.hpp file | annotate | diff | comparison | revisions
unicode.hpp file | annotate | diff | comparison | revisions
--- a/generator/make-unicode/unicode.hpp	Wed Jan 03 09:01:59 2018 +0100
+++ b/generator/make-unicode/unicode.hpp	Wed May 09 08:56:34 2018 +0200
@@ -26,40 +26,6 @@
  * \warning These files are auto-generated!
  */
 
-/**
- * \page unicode Basic unicode management.
- *
- * ## Export macros
- *
- * You must define `UNICODE_DLL` globally and `UNICODE_BUILDING_DLL` when
- * compiling the library if you want a DLL, alternatively you can provide
- * your own `UNICODE_EXPORT` macro instead.
- */
-
-/**
- * \cond UNICODE_HIDDEN_SYMBOLS
- */
-
-#if !defined(UNICODE_EXPORT)
-#   if defined(UNICODE_DLL)
-#       if defined(_WIN32)
-#           if defined(UNICODE_BUILDING_DLL)
-#               define UNICODE_EXPORT __declspec(dllexport)
-#           else
-#               define UNICODE_EXPORT __declspec(dllimport)
-#           endif
-#       else
-#           define UNICODE_EXPORT
-#       endif
-#   else
-#       define UNICODE_EXPORT
-#   endif
-#endif
-
-/**
- * \endcond
- */
-
 #include <stdexcept>
 #include <string>
 
@@ -74,7 +40,7 @@
  * \param point the unicode code point
  * \param res the output buffer
  */
-UNICODE_EXPORT void encode(char32_t point, char res[5]) noexcept;
+void encode(char32_t point, char res[5]) noexcept;
 
 /**
  * Decode the multibyte buffer into an unicode code point.
@@ -82,7 +48,7 @@
  * \param c the code point destination
  * \param res the multibyte string.
  */
-UNICODE_EXPORT void decode(char32_t& c, const char* res) noexcept;
+void decode(char32_t& c, const char* res) noexcept;
 
 /**
  * Get the number of bytes for the first multi byte character from a
@@ -94,7 +60,7 @@
  * \param c the first multi byte character
  * \return the number of bytes [1-4] or -1 if invalid
  */
-UNICODE_EXPORT int nbytes_utf8(char c) noexcept;
+int nbytes_utf8(char c) noexcept;
 
 /**
  * Get the number of bytes for the unicode point.
@@ -102,7 +68,7 @@
  * \param point the unicode point
  * \return the number of bytes [1-4] or -1 if invalid
  */
-UNICODE_EXPORT int nbytes_point(char32_t point) noexcept;
+int nbytes_point(char32_t point) noexcept;
 
 /**
  * Get real number of character in a string.
@@ -111,7 +77,7 @@
  * \return the length
  * \throw std::invalid_argument on invalid sequence
  */
-UNICODE_EXPORT unsigned length(const std::string& str);
+unsigned length(const std::string& str);
 
 /**
  * Iterate over all real characters in the UTF-8 string.
@@ -147,7 +113,7 @@
  * \return the UTF-8 string
  * \throw std::invalid_argument on invalid sequence
  */
-UNICODE_EXPORT std::string to_utf8(const std::u32string& array);
+std::string to_utf8(const std::u32string& array);
 
 /**
  * Convert a UTF-8 string to UTF-32 string.
@@ -156,7 +122,7 @@
  * \return the UTF-32 string
  * \throw std::invalid_argument on invalid sequence
  */
-UNICODE_EXPORT std::u32string to_utf32(const std::string& str);
+std::u32string to_utf32(const std::string& str);
 
 /**
  * Check if the unicode character is space.
@@ -164,7 +130,7 @@
  * \param c the character
  * \return true if space
  */
-UNICODE_EXPORT bool isspace(char32_t c) noexcept;
+bool isspace(char32_t c) noexcept;
 
 /**
  * Check if the unicode character is digit.
@@ -172,7 +138,7 @@
  * \param c the character
  * \return true if digit
  */
-UNICODE_EXPORT bool isdigit(char32_t c) noexcept;
+bool isdigit(char32_t c) noexcept;
 
 /**
  * Check if the unicode character is alpha category.
@@ -180,7 +146,7 @@
  * \param c the character
  * \return true if alpha
  */
-UNICODE_EXPORT bool isalpha(char32_t c) noexcept;
+bool isalpha(char32_t c) noexcept;
 
 /**
  * Check if the unicode character is upper case.
@@ -188,7 +154,7 @@
  * \param c the character
  * \return true if upper case
  */
-UNICODE_EXPORT bool isupper(char32_t c) noexcept;
+bool isupper(char32_t c) noexcept;
 
 /**
  * Check if the unicode character is lower case.
@@ -196,7 +162,7 @@
  * \param c the character
  * \return true if lower case
  */
-UNICODE_EXPORT bool islower(char32_t c) noexcept;
+bool islower(char32_t c) noexcept;
 
 /**
  * Check if the unicode character is title case.
@@ -204,7 +170,7 @@
  * \param c the character
  * \return true if title case
  */
-UNICODE_EXPORT bool istitle(char32_t c) noexcept;
+bool istitle(char32_t c) noexcept;
 
 /**
  * Convert to upper case.
@@ -212,7 +178,7 @@
  * \param c the character
  * \return the upper case character
  */
-UNICODE_EXPORT char32_t toupper(char32_t c) noexcept;
+char32_t toupper(char32_t c) noexcept;
 
 /**
  * Convert to lower case.
@@ -220,7 +186,7 @@
  * \param c the character
  * \return the lower case character
  */
-UNICODE_EXPORT char32_t tolower(char32_t c) noexcept;
+char32_t tolower(char32_t c) noexcept;
 
 /**
  * Convert to title case.
@@ -228,7 +194,7 @@
  * \param c the character
  * \return the title case character
  */
-UNICODE_EXPORT char32_t totitle(char32_t c) noexcept;
+char32_t totitle(char32_t c) noexcept;
 
 /**
  * Convert the UTF-32 string to upper case.
--- a/unicode.hpp	Wed Jan 03 09:01:59 2018 +0100
+++ b/unicode.hpp	Wed May 09 08:56:34 2018 +0200
@@ -26,40 +26,6 @@
  * \warning These files are auto-generated!
  */
 
-/**
- * \page unicode Basic unicode management.
- *
- * ## Export macros
- *
- * You must define `UNICODE_DLL` globally and `UNICODE_BUILDING_DLL` when
- * compiling the library if you want a DLL, alternatively you can provide
- * your own `UNICODE_EXPORT` macro instead.
- */
-
-/**
- * \cond UNICODE_HIDDEN_SYMBOLS
- */
-
-#if !defined(UNICODE_EXPORT)
-#   if defined(UNICODE_DLL)
-#       if defined(_WIN32)
-#           if defined(UNICODE_BUILDING_DLL)
-#               define UNICODE_EXPORT __declspec(dllexport)
-#           else
-#               define UNICODE_EXPORT __declspec(dllimport)
-#           endif
-#       else
-#           define UNICODE_EXPORT
-#       endif
-#   else
-#       define UNICODE_EXPORT
-#   endif
-#endif
-
-/**
- * \endcond
- */
-
 #include <stdexcept>
 #include <string>
 
@@ -74,7 +40,7 @@
  * \param point the unicode code point
  * \param res the output buffer
  */
-UNICODE_EXPORT void encode(char32_t point, char res[5]) noexcept;
+void encode(char32_t point, char res[5]) noexcept;
 
 /**
  * Decode the multibyte buffer into an unicode code point.
@@ -82,7 +48,7 @@
  * \param c the code point destination
  * \param res the multibyte string.
  */
-UNICODE_EXPORT void decode(char32_t& c, const char* res) noexcept;
+void decode(char32_t& c, const char* res) noexcept;
 
 /**
  * Get the number of bytes for the first multi byte character from a
@@ -94,7 +60,7 @@
  * \param c the first multi byte character
  * \return the number of bytes [1-4] or -1 if invalid
  */
-UNICODE_EXPORT int nbytes_utf8(char c) noexcept;
+int nbytes_utf8(char c) noexcept;
 
 /**
  * Get the number of bytes for the unicode point.
@@ -102,7 +68,7 @@
  * \param point the unicode point
  * \return the number of bytes [1-4] or -1 if invalid
  */
-UNICODE_EXPORT int nbytes_point(char32_t point) noexcept;
+int nbytes_point(char32_t point) noexcept;
 
 /**
  * Get real number of character in a string.
@@ -111,7 +77,7 @@
  * \return the length
  * \throw std::invalid_argument on invalid sequence
  */
-UNICODE_EXPORT unsigned length(const std::string& str);
+unsigned length(const std::string& str);
 
 /**
  * Iterate over all real characters in the UTF-8 string.
@@ -147,7 +113,7 @@
  * \return the UTF-8 string
  * \throw std::invalid_argument on invalid sequence
  */
-UNICODE_EXPORT std::string to_utf8(const std::u32string& array);
+std::string to_utf8(const std::u32string& array);
 
 /**
  * Convert a UTF-8 string to UTF-32 string.
@@ -156,7 +122,7 @@
  * \return the UTF-32 string
  * \throw std::invalid_argument on invalid sequence
  */
-UNICODE_EXPORT std::u32string to_utf32(const std::string& str);
+std::u32string to_utf32(const std::string& str);
 
 /**
  * Check if the unicode character is space.
@@ -164,7 +130,7 @@
  * \param c the character
  * \return true if space
  */
-UNICODE_EXPORT bool isspace(char32_t c) noexcept;
+bool isspace(char32_t c) noexcept;
 
 /**
  * Check if the unicode character is digit.
@@ -172,7 +138,7 @@
  * \param c the character
  * \return true if digit
  */
-UNICODE_EXPORT bool isdigit(char32_t c) noexcept;
+bool isdigit(char32_t c) noexcept;
 
 /**
  * Check if the unicode character is alpha category.
@@ -180,7 +146,7 @@
  * \param c the character
  * \return true if alpha
  */
-UNICODE_EXPORT bool isalpha(char32_t c) noexcept;
+bool isalpha(char32_t c) noexcept;
 
 /**
  * Check if the unicode character is upper case.
@@ -188,7 +154,7 @@
  * \param c the character
  * \return true if upper case
  */
-UNICODE_EXPORT bool isupper(char32_t c) noexcept;
+bool isupper(char32_t c) noexcept;
 
 /**
  * Check if the unicode character is lower case.
@@ -196,7 +162,7 @@
  * \param c the character
  * \return true if lower case
  */
-UNICODE_EXPORT bool islower(char32_t c) noexcept;
+bool islower(char32_t c) noexcept;
 
 /**
  * Check if the unicode character is title case.
@@ -204,7 +170,7 @@
  * \param c the character
  * \return true if title case
  */
-UNICODE_EXPORT bool istitle(char32_t c) noexcept;
+bool istitle(char32_t c) noexcept;
 
 /**
  * Convert to upper case.
@@ -212,7 +178,7 @@
  * \param c the character
  * \return the upper case character
  */
-UNICODE_EXPORT char32_t toupper(char32_t c) noexcept;
+char32_t toupper(char32_t c) noexcept;
 
 /**
  * Convert to lower case.
@@ -220,7 +186,7 @@
  * \param c the character
  * \return the lower case character
  */
-UNICODE_EXPORT char32_t tolower(char32_t c) noexcept;
+char32_t tolower(char32_t c) noexcept;
 
 /**
  * Convert to title case.
@@ -228,7 +194,7 @@
  * \param c the character
  * \return the title case character
  */
-UNICODE_EXPORT char32_t totitle(char32_t c) noexcept;
+char32_t totitle(char32_t c) noexcept;
 
 /**
  * Convert the UTF-32 string to upper case.

mercurial