OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ActionHandleConnector.h File Reference

Go to the source code of this file.

Namespaces

namespace  ot
 

Macros

#define OT_ADD_HANDLER(___functionName, ___className, ___actionName, ___messageTypeFlags)   ot::ActionHandleConnector<___className> ActionHandleConnector##___functionName##=ot::ActionHandleConnector<___className>(___actionName, ___messageTypeFlags, this, &___className::___functionName)
 
#define OT_HANDLER(___functionName, ___className, ___actionName, ___messageTypeFlags)   std::string ___functionName(ot::JsonDocument& _document); OT_ADD_HANDLER(___functionName, ___className, ___actionName, ___messageTypeFlags);
 Creates a function that will be registered in the dispatch system. The generated function will look like this: std::string <functionName>(JsonDocument& _document);.
 
#define OT_ACTIONLIST(...)   std::list<std::string>({__VA_ARGS__})
 Creates a string list.
 

Detailed Description

Author
Alexander Kuester (alexk95)
Date
March 2024

Macro Definition Documentation

◆ OT_ACTIONLIST

#define OT_ACTIONLIST ( ...)    std::list<std::string>({__VA_ARGS__})

Creates a string list.

◆ OT_ADD_HANDLER

#define OT_ADD_HANDLER ( ___functionName,
___className,
___actionName,
___messageTypeFlags )   ot::ActionHandleConnector<___className> ActionHandleConnector##___functionName##=ot::ActionHandleConnector<___className>(___actionName, ___messageTypeFlags, this, &___className::___functionName)

◆ OT_HANDLER

#define OT_HANDLER ( ___functionName,
___className,
___actionName,
___messageTypeFlags )   std::string ___functionName(ot::JsonDocument& _document); OT_ADD_HANDLER(___functionName, ___className, ___actionName, ___messageTypeFlags);

Creates a function that will be registered in the dispatch system. The generated function will look like this: std::string <functionName>(JsonDocument& _document);.

Parameters
___functionNameThe name of the new function.
___classNameThe name of the class where the function is created at.
___actionNameThe action that should be registered in the dispatch system.