Skip to content

Commit 86e5962

Browse files
author
Pavel Siska
committed
processPluginEntry
1 parent 9da90e9 commit 86e5962

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* @file
3+
* @author Pavel Siska <[email protected]>
4+
* @brief Defines the ProcessPluginEntry structure used for plugin registration.
5+
*
6+
* The ProcessPluginEntry structure stores metadata and runtime information
7+
* about a specific flow-processing plugin. It is used by the framework to
8+
* manage plugin lifecycle, context allocation, and activation state.
9+
*
10+
* @copyright Copyright (c) 2025 CESNET, z.s.p.o.
11+
*/
12+
13+
#pragma once
14+
15+
#include <cstdint>
16+
#include <memory>
17+
#include <string>
18+
19+
namespace ipxp {
20+
21+
class ProcessPlugin;
22+
23+
/**
24+
* @brief Metadata and runtime handle for a registered ProcessPlugin.
25+
*
26+
* This structure associates a plugin instance with its configuration
27+
* and runtime requirements. It contains the plugin's name, context
28+
* memory requirements, and activation state.
29+
*/
30+
struct ProcessPluginEntry {
31+
/**< @brief Human-readable plugin name (unique identifier). */
32+
std::string name;
33+
34+
/**< @brief Required size of the plugin's per-flow context in bytes. */
35+
std::size_t contextSize;
36+
37+
/**< @brief Required alignment for the plugin's context. */
38+
std::size_t contextAlignment;
39+
40+
/**< @brief Whether the plugin is currently enabled in the framework. */
41+
bool enabled;
42+
43+
/**< @brief Shared pointer to the actual plugin implementation. */
44+
std::shared_ptr<ProcessPlugin> plugin;
45+
};
46+
47+
} // namespace ipxp

0 commit comments

Comments
 (0)