HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_WebAPIHandlerImpl< Args > Class Template Reference

#include <NET_WebAPIHandler.h>

+ Inheritance diagram for NET_WebAPIHandlerImpl< Args >:

Public Types

using Callback = std::function< NET_WebResponse(NET_HTTPRequest &req, Args...)>
 
- Public Types inherited from NET_WebAPIHandler
using ParamDefault = UT_Optional< UT_StringHolder >
 
using ParamIdx = unsigned
 
using ParamArray = UT_Array< NET_Param >
 

Public Member Functions

 NET_WebAPIHandlerImpl (const UT_StringHolder &name, const ParamArray &param_arr, Callback clb)
 
void exec (NET_HTTPRequest &req, NET_WebResponse &resp) override
 
void exec (NET_HTTPRequest &req, NET_WebResponse &resp, UT_JSONValueArray *args, UT_JSONValueMap *kwargs) override
 
 operator bool () const
 
bool isValid () const override
 
- Public Member Functions inherited from NET_WebAPIHandler
virtual ~NET_WebAPIHandler ()=default
 
virtual void call (NET_WebSocketAPIRequest &req, UT_JSONValueArray *args, UT_JSONValueMap *kwargs)
 
const UT_StringHoldergetName () const
 
UT_Optional< ParamIdxgetParamIndex (const UT_String &name) const
 
UT_Optional< const
UT_StringHolder & > 
getParamDefault (const UT_String &name) const
 
 operator bool () const
 

Static Public Attributes

static constexpr std::size_t Size = sizeof...(Args)
 

Additional Inherited Members

- Protected Member Functions inherited from NET_WebAPIHandler
 NET_WebAPIHandler (const UT_StringHolder &name, const ParamArray &param_arr)
 
- Protected Attributes inherited from NET_WebAPIHandler
UT_StringHolder myName
 
ParamArray myParams
 

Detailed Description

template<typename... Args>
class NET_WebAPIHandlerImpl< Args >

Definition at line 343 of file NET_WebAPIHandler.h.

Member Typedef Documentation

template<typename... Args>
using NET_WebAPIHandlerImpl< Args >::Callback = std::function<NET_WebResponse(NET_HTTPRequest &req, Args...)>

Definition at line 348 of file NET_WebAPIHandler.h.

Constructor & Destructor Documentation

template<typename... Args>
NET_WebAPIHandlerImpl< Args >::NET_WebAPIHandlerImpl ( const UT_StringHolder name,
const ParamArray param_arr,
Callback  clb 
)
inline

Definition at line 350 of file NET_WebAPIHandler.h.

Member Function Documentation

template<typename... Args>
void NET_WebAPIHandlerImpl< Args >::exec ( NET_HTTPRequest req,
NET_WebResponse resp 
)
inlineoverridevirtual

Reimplemented from NET_WebAPIHandler.

Definition at line 359 of file NET_WebAPIHandler.h.

template<typename... Args>
void NET_WebAPIHandlerImpl< Args >::exec ( NET_HTTPRequest req,
NET_WebResponse resp,
UT_JSONValueArray args,
UT_JSONValueMap kwargs 
)
inlineoverridevirtual

Reimplemented from NET_WebAPIHandler.

Definition at line 437 of file NET_WebAPIHandler.h.

template<typename... Args>
bool NET_WebAPIHandlerImpl< Args >::isValid ( ) const
inlineoverridevirtual

Implements NET_WebAPIHandler.

Definition at line 470 of file NET_WebAPIHandler.h.

template<typename... Args>
NET_WebAPIHandlerImpl< Args >::operator bool ( ) const
inline

Definition at line 469 of file NET_WebAPIHandler.h.

Member Data Documentation

template<typename... Args>
constexpr std::size_t NET_WebAPIHandlerImpl< Args >::Size = sizeof...(Args)
static

Definition at line 346 of file NET_WebAPIHandler.h.


The documentation for this class was generated from the following file: