diff --git a/apps/EnumUtils/enumutils_describe.py b/apps/EnumUtils/enumutils_describe.py index 4154fdaff..18946350d 100644 --- a/apps/EnumUtils/enumutils_describe.py +++ b/apps/EnumUtils/enumutils_describe.py @@ -36,7 +36,7 @@ def processFile(path, filename): if input is None: print('Failed to open %s.h' % filename) return - + file = input.read() enums = [] @@ -46,22 +46,22 @@ def processFile(path, filename): values = [] for value in EnumValuesPattern.finditer(enum.group(3)): valueData = value.group(0) - + valueNameMatch = EnumValueNamePattern.search(valueData) if valueNameMatch is None: if EnumValueSkipLinePattern.search(valueData) is None: print('Name of value not found: %s' % repr(valueData)) continue valueName = valueNameMatch.group(1) - + valueCommentMatch = EnumValueCommentPattern.search(valueData) valueComment = None if valueCommentMatch: valueComment = valueCommentMatch.group(1) - + valueTitle = None valueDescription = None - + if valueComment is not None: if CommentSkipFormat.match(valueComment) is not None: continue @@ -71,20 +71,20 @@ def processFile(path, filename): valueDescription = commentMatch.group(6) else: valueDescription = valueComment - + if valueTitle is None: valueTitle = valueName if valueDescription is None: valueDescription = '' - + values.append((valueName, valueTitle, valueDescription)) - + enums.append((prefix + name, prefix, values)) print('%s.h: Enum %s parsed with %d values' % (filename, name, len(values))) - + if not enums: return - + print('Done parsing %s.h (in %s)\n' % (filename, path)) output = open('%s/enuminfo_%s.cpp' % (path, filename), 'w') if output is None: @@ -107,7 +107,7 @@ def processFile(path, filename): output.write('|* ' + tag + ' *|\n') output.write('\\*' + ('*'*(len(tag)+2)) + '*/\n') output.write('template <>\n') - output.write('EnumText EnumUtils<%s>::ToString(%s value)\n' % (name, name)) + output.write('AC_API_EXPORT EnumText EnumUtils<%s>::ToString(%s value)\n' % (name, name)) output.write('{\n') output.write(' switch (value)\n') output.write(' {\n') @@ -118,10 +118,10 @@ def processFile(path, filename): output.write('}\n') output.write('\n') output.write('template <>\n') - output.write('size_t EnumUtils<%s>::Count() { return %d; }\n' % (name, len(values))) + output.write('AC_API_EXPORT size_t EnumUtils<%s>::Count() { return %d; }\n' % (name, len(values))) output.write('\n') output.write('template <>\n') - output.write('%s EnumUtils<%s>::FromIndex(size_t index)\n' % (name, name)) + output.write('AC_API_EXPORT %s EnumUtils<%s>::FromIndex(size_t index)\n' % (name, name)) output.write('{\n') output.write(' switch (index)\n') output.write(' {\n') @@ -132,7 +132,7 @@ def processFile(path, filename): output.write('}\n') output.write('\n') output.write('template <>\n') - output.write('size_t EnumUtils<%s>::ToIndex(%s value)\n' % (name, name)) + output.write('AC_API_EXPORT size_t EnumUtils<%s>::ToIndex(%s value)\n' % (name, name)) output.write('{\n') output.write(' switch (value)\n') output.write(' {\n') diff --git a/src/common/Logging/enuminfo_AppenderConsole.cpp b/src/common/Logging/enuminfo_AppenderConsole.cpp index dd5c42e31..fc5ead412 100644 --- a/src/common/Logging/enuminfo_AppenderConsole.cpp +++ b/src/common/Logging/enuminfo_AppenderConsole.cpp @@ -16,7 +16,7 @@ namespace Acore::Impl::EnumUtilsImpl |* data for enum 'ColorTypes' in 'AppenderConsole.h' auto-generated *| \********************************************************************/ template <> -EnumText EnumUtils::ToString(ColorTypes value) +AC_API_EXPORT EnumText EnumUtils::ToString(ColorTypes value) { switch (value) { @@ -40,10 +40,10 @@ EnumText EnumUtils::ToString(ColorTypes value) } template <> -size_t EnumUtils::Count() { return 15; } +AC_API_EXPORT size_t EnumUtils::Count() { return 15; } template <> -ColorTypes EnumUtils::FromIndex(size_t index) +AC_API_EXPORT ColorTypes EnumUtils::FromIndex(size_t index) { switch (index) { @@ -67,7 +67,7 @@ ColorTypes EnumUtils::FromIndex(size_t index) } template <> -size_t EnumUtils::ToIndex(ColorTypes value) +AC_API_EXPORT size_t EnumUtils::ToIndex(ColorTypes value) { switch (value) { diff --git a/src/common/Logging/enuminfo_LogCommon.cpp b/src/common/Logging/enuminfo_LogCommon.cpp index 8b4f3bfd6..4f3e1e8b0 100644 --- a/src/common/Logging/enuminfo_LogCommon.cpp +++ b/src/common/Logging/enuminfo_LogCommon.cpp @@ -16,7 +16,7 @@ namespace Acore::Impl::EnumUtilsImpl |* data for enum 'LogLevel' in 'LogCommon.h' auto-generated *| \************************************************************/ template <> -EnumText EnumUtils::ToString(LogLevel value) +AC_API_EXPORT EnumText EnumUtils::ToString(LogLevel value) { switch (value) { @@ -32,10 +32,10 @@ EnumText EnumUtils::ToString(LogLevel value) } template <> -size_t EnumUtils::Count() { return 7; } +AC_API_EXPORT size_t EnumUtils::Count() { return 7; } template <> -LogLevel EnumUtils::FromIndex(size_t index) +AC_API_EXPORT LogLevel EnumUtils::FromIndex(size_t index) { switch (index) { @@ -51,7 +51,7 @@ LogLevel EnumUtils::FromIndex(size_t index) } template <> -size_t EnumUtils::ToIndex(LogLevel value) +AC_API_EXPORT size_t EnumUtils::ToIndex(LogLevel value) { switch (value) { @@ -70,7 +70,7 @@ size_t EnumUtils::ToIndex(LogLevel value) |* data for enum 'AppenderType' in 'LogCommon.h' auto-generated *| \****************************************************************/ template <> -EnumText EnumUtils::ToString(AppenderType value) +AC_API_EXPORT EnumText EnumUtils::ToString(AppenderType value) { switch (value) { @@ -83,10 +83,10 @@ EnumText EnumUtils::ToString(AppenderType value) } template <> -size_t EnumUtils::Count() { return 4; } +AC_API_EXPORT size_t EnumUtils::Count() { return 4; } template <> -AppenderType EnumUtils::FromIndex(size_t index) +AC_API_EXPORT AppenderType EnumUtils::FromIndex(size_t index) { switch (index) { @@ -99,7 +99,7 @@ AppenderType EnumUtils::FromIndex(size_t index) } template <> -size_t EnumUtils::ToIndex(AppenderType value) +AC_API_EXPORT size_t EnumUtils::ToIndex(AppenderType value) { switch (value) {