Skip to content

Commit 98c9ecd

Browse files
committed
ipfixprobe - introduce API function
1 parent 3081762 commit 98c9ecd

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

include/ipfixprobe/api.hpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* @file
3+
* @brief Definitions for API functions
4+
* @author Pavel Siska <[email protected]>
5+
* @date 2025
6+
*
7+
* Copyright (c) 2025 CESNET
8+
*
9+
* SPDX-License-Identifier: BSD-3-Clause
10+
*/
11+
12+
#pragma once
13+
14+
/**
15+
* \def IPXP_API
16+
* \brief Macro for exporting public API symbols
17+
*
18+
* This macro is used to explicitly mark symbols that are part of the public API.
19+
* If the compiler supports visibility attributes, it ensures that only symbols
20+
* marked with this macro are exported, while others remain hidden.
21+
*
22+
* Using this macro helps reduce the symbol table size, improves load time,
23+
* and minimizes symbol conflicts by keeping internal symbols hidden.
24+
*
25+
* Example usage:
26+
* \code
27+
* class IPXP_API MyClass {
28+
* public:
29+
* void doSomething();
30+
* };
31+
* \endcode
32+
*/
33+
#define IPXP_API [[gnu::visibility("default")]]

0 commit comments

Comments
 (0)