Exemple #1
0
 /// <summary>
 /// Gets a boolean indicating whether the function is a dllexport or visibility("default")
 /// </summary>
 /// <param name="function">The function to check against</param>
 /// <returns><c>true</c> if the function is a dllexport or visibility("default")</returns>
 public static bool IsPublicExport(this CppFunction function)
 {
     return(function.Attributes != null &&
            function.Attributes.Any(attr => attr.IsPublicExport()) ||
            function.LinkageKind == CppLinkageKind.External ||
            function.LinkageKind == CppLinkageKind.UniqueExternal);
 }
Exemple #2
0
        /// <summary>
        /// Gets a boolean indicating whether the function is a dllexport or visibility("default")
        /// </summary>
        /// <param name="function">The function to check against</param>
        /// <returns><c>true</c> if the function is a dllexport or visibility("default")</returns>
        public static bool IsPublicExport(this CppFunction function)
        {
            if (function.Attributes != null)
            {
                foreach (var attr in function.Attributes)
                {
                    if (attr.IsPublicExport())
                    {
                        return(true);
                    }
                }
            }

            return(function.LinkageKind == CppLinkageKind.External || function.LinkageKind == CppLinkageKind.UniqueExternal);
        }