mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 05:16:58 +00:00
Add message variants of the deprecation macros. With CXX_ATTRIBUTES, prefer the standard [[deprecated]] as of C++14 and place it before the export marker, since a C++11 attribute cannot follow __declspec. Fixes: #20527
92 lines
1.9 KiB
C++
92 lines
1.9 KiB
C++
#ifndef LIBSHARED_H
|
|
#define LIBSHARED_H
|
|
|
|
#include "libshared_export.h"
|
|
|
|
namespace libshared {
|
|
|
|
class Class
|
|
{
|
|
public:
|
|
int method() const;
|
|
|
|
int LIBSHARED_EXPORT method_exported() const;
|
|
|
|
int LIBSHARED_DEPRECATED method_deprecated() const;
|
|
|
|
int LIBSHARED_DEPRECATED_EXPORT method_deprecated_exported() const;
|
|
|
|
int LIBSHARED_NO_EXPORT method_excluded() const;
|
|
|
|
static int const data;
|
|
|
|
static int const LIBSHARED_EXPORT data_exported;
|
|
|
|
static int const LIBSHARED_NO_EXPORT data_excluded;
|
|
};
|
|
|
|
class LIBSHARED_EXPORT ExportedClass
|
|
{
|
|
public:
|
|
int method() const;
|
|
|
|
int LIBSHARED_DEPRECATED method_deprecated() const;
|
|
|
|
int LIBSHARED_NO_EXPORT method_excluded() const;
|
|
|
|
static int const data;
|
|
|
|
static int const LIBSHARED_NO_EXPORT data_excluded;
|
|
};
|
|
|
|
class LIBSHARED_NO_EXPORT ExcludedClass
|
|
{
|
|
public:
|
|
int method() const;
|
|
|
|
int LIBSHARED_EXPORT method_exported() const;
|
|
|
|
int LIBSHARED_DEPRECATED method_deprecated() const;
|
|
|
|
int LIBSHARED_DEPRECATED_EXPORT method_deprecated_exported() const;
|
|
|
|
int LIBSHARED_NO_EXPORT method_excluded() const;
|
|
|
|
static int const data;
|
|
|
|
static int const LIBSHARED_EXPORT data_exported;
|
|
|
|
static int const LIBSHARED_NO_EXPORT data_excluded;
|
|
};
|
|
|
|
int function();
|
|
|
|
int LIBSHARED_EXPORT function_exported();
|
|
|
|
int LIBSHARED_DEPRECATED function_deprecated();
|
|
|
|
int LIBSHARED_DEPRECATED_EXPORT function_deprecated_exported();
|
|
|
|
int LIBSHARED_DEPRECATED_MSG("libshared DEPRECATED_MSG")
|
|
function_deprecated_msg();
|
|
|
|
int LIBSHARED_DEPRECATED_EXPORT_MSG("libshared DEPRECATED_EXPORT_MSG")
|
|
function_deprecated_exported_msg();
|
|
|
|
int LIBSHARED_DEPRECATED_NO_EXPORT_MSG("libshared DEPRECATED_NO_EXPORT_MSG")
|
|
function_deprecated_excluded_msg();
|
|
|
|
int LIBSHARED_NO_EXPORT function_excluded();
|
|
|
|
extern int const data;
|
|
|
|
extern int const LIBSHARED_EXPORT data_exported;
|
|
|
|
extern int const LIBSHARED_NO_EXPORT data_excluded;
|
|
|
|
} // namespace libshared
|
|
|
|
LIBSHARED_EXPORT void use_int(int);
|
|
|
|
#endif
|