Sen API
Sen Libraries
Loading...
Searching...
No Matches
component.h File Reference

Go to the source code of this file.

Classes

class  sen::kernel::Component
 Base class for implementing sen kernel components. More...

Namespaces

namespace  sen
namespace  sen::kernel
 Strong type for the unique identifier for a transport timer.

Macros

#define SEN_COMPONENT_MAKER   senMakeKernelComponent
#define SEN_COMPONENT_INFO_MAKER   senMakeKernelComponentInfo
#define SEN_COMPONENT(component_name)
 Use this macro to make your library loadable. NOLINTNEXTLINE(cppcoreguidelines-macro-usage, bugprone-macro-parentheses).

Functions

PassResult sen::kernel::done ()
 Convenience helper for doing sen::Ok(sen::kernel::OpState {sen::kernel::OpFinished {}}).
constexpr bool sen::kernel::getDebugEnabled () noexcept
constexpr WordSize sen::kernel::getWordSize () noexcept
constexpr const char * sen::kernel::getGitRef () noexcept
constexpr const char * sen::kernel::getGitHash () noexcept
GitStatus sen::kernel::getGitStatus () noexcept

Variables

constexpr auto * sen::kernel::componentMakerFuncName = SEN_STRINGIFY(SEN_COMPONENT_MAKER)
constexpr auto * sen::kernel::componentInfoMakerFuncName = SEN_STRINGIFY(SEN_COMPONENT_INFO_MAKER)

Macro Definition Documentation

◆ SEN_COMPONENT_MAKER

SEN_EXPORT sen::kernel::Component * SEN_COMPONENT_MAKER   senMakeKernelComponent

◆ SEN_COMPONENT_INFO_MAKER

SEN_EXPORT const sen::kernel::ComponentInfo * SEN_COMPONENT_INFO_MAKER   senMakeKernelComponentInfo

◆ SEN_COMPONENT

#define SEN_COMPONENT ( component_name)
Value:
\
extern "C" SEN_EXPORT sen::kernel::Component* SEN_COMPONENT_MAKER() \
{ \
return new component_name(); /* NOLINT(cppcoreguidelines-owning-memory) */ \
} \
\
extern "C" SEN_EXPORT const sen::kernel::ComponentInfo* SEN_COMPONENT_INFO_MAKER() \
{ \
static sen::kernel::ComponentInfo info {}; \
info.name = SEN_TARGET_NAME; \
info.description = SEN_TARGET_DESCRIPTION; \
info.buildInfo.maintainer = SEN_TARGET_MAINTAINER; \
info.buildInfo.version = SEN_TARGET_VERSION; \
info.buildInfo.compiler = SEN_COMPILER_STRING; \
info.buildInfo.debugMode = sen::kernel::getDebugEnabled(); \
info.buildInfo.wordSize = sen::kernel::getWordSize(); \
info.buildInfo.buildTime = std::string(__DATE__) + " " + __TIME__; \
info.buildInfo.gitRef = sen::kernel::getGitRef(); \
info.buildInfo.gitHash = sen::kernel::getGitHash(); \
info.buildInfo.gitStatus = sen::kernel::getGitStatus(); \
return &info; \
}
Base class for implementing sen kernel components.
Definition component.h:34
#define SEN_COMPONENT_INFO_MAKER
Definition component.h:88
#define SEN_COMPONENT_MAKER
Definition component.h:87
constexpr const char * getGitRef() noexcept
Definition component.h:121
constexpr bool getDebugEnabled() noexcept
Definition component.h:100
constexpr const char * getGitHash() noexcept
Definition component.h:130
constexpr WordSize getWordSize() noexcept
Definition component.h:109
GitStatus getGitStatus() noexcept
Definition component.h:139

Use this macro to make your library loadable. NOLINTNEXTLINE(cppcoreguidelines-macro-usage, bugprone-macro-parentheses).