HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_WebAPIHandler.h File Reference
#include "NET_API.h"
#include "NET_ConvertToType.h"
#include "NET_HTTPRequest.h"
#include "NET_WebAPI.h"
#include "NET_HTTPDefines.h"
#include "NET_WebSocketAPIRequest.h"
#include <UT/UT_ArrayStringMap.h>
#include <UT/UT_Assert.h>
#include <UT/UT_JSONValue.h>
#include <UT/UT_JSONValueArray.h>
#include <UT/UT_JSONValueMap.h>
#include <UT/UT_Optional.h>
#include <UT/UT_StringArray.h>
#include <UT/UT_StringHolder.h>
#include <UT/UT_UniquePtr.h>
#include <UT/UT_WorkBuffer.h>
#include <functional>
#include <stdexcept>
#include <tuple>
#include <type_traits>
+ Include dependency graph for NET_WebAPIHandler.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  NET_APIHandlerValueException
 
class  NET_WebAPIHandler
 
class  NET_WebAPIHandler::NET_Param
 
struct  NET_WebHelpers::ParamDetail
 
class  NET_WebAPIHandlerImpl< Args >
 
class  NET_WebSocketAPIHandlerImpl< Args >
 

Namespaces

 NET_WebHelpers
 

Macros

#define _NET_IS_STRING(T)   ( std::is_same<UT_StringHolder, T>::value || std::is_same<std::string, T>::value )
 
#define _NET_IS_INTEGRAL(T)   ( std::is_integral<T>::value && !std::is_same<bool, T>::value )
 
#define _NET_REQUIRES(T)   typename std::enable_if< T >::type * = nullptr
 

Functions

template<class T >
NET_WebHelpers::convertArrayValue (const ParamDetail &detail)
 
template<class... Args, std::size_t... Idxs>
std::tuple< Args...> NET_WebHelpers::convertArrayToTupleImpl (const UT_Array< ParamDetail > &arr, std::index_sequence< Idxs...>)
 
template<class... Args>
std::tuple< Args...> NET_WebHelpers::convertArrayToTuple (const UT_Array< ParamDetail > &arr)
 
template<class T , _NET_REQUIRES(!_NET_IS_STRING(T)&&!_NET_IS_INTEGRAL(T)) >
bool NET_WebHelpers::netConvertDefault (T &value, const UT_StringRef &def_value)
 
template<class T , _NET_REQUIRES(_NET_IS_STRING(T)&&!_NET_IS_INTEGRAL(T)) >
bool NET_WebHelpers::netConvertDefault (UT_StringHolder &value, const UT_StringRef &def_value)
 
template<class T >
NET_WebHelpers::convertJSONValue (NET_WebAPIHandler::ParamArray &params, UT_JSONValueArray *args, UT_JSONValueMap *kwargs, std::size_t idx)
 
template<class... Args, std::size_t... Idxs>
std::tuple< Args...> NET_WebHelpers::convertJSONArrayToTupleImpl (NET_WebAPIHandler::ParamArray &params, UT_JSONValueArray *args, UT_JSONValueMap *kwargs, std::index_sequence< Idxs...>)
 
template<class... Args, std::size_t Size = sizeof...(Args)>
auto NET_WebHelpers::convertJSONArrayToTuple (NET_WebAPIHandler::ParamArray &params, UT_JSONValueArray *args, UT_JSONValueMap *kwargs) -> typename std::enable_if_t< Size==0
 
template<class F , class ReqObj , class Tuple , std::size_t... I>
decltype(auto) NET_WebHelpers::applyImpl (F &&f, ReqObj &req, Tuple &&t, std::index_sequence< I...>)
 
template<class F , class ReqObj , class Tuple >
decltype(auto) NET_WebHelpers::applyTuple (F &&f, ReqObj &req, Tuple &&tuple)
 

Variables

void NET_WebHelpers::kwargs
 

Macro Definition Documentation

#define _NET_IS_INTEGRAL (   T)    ( std::is_integral<T>::value && !std::is_same<bool, T>::value )

Definition at line 192 of file NET_WebAPIHandler.h.

#define _NET_IS_STRING (   T)    ( std::is_same<UT_StringHolder, T>::value || std::is_same<std::string, T>::value )

Definition at line 189 of file NET_WebAPIHandler.h.

#define _NET_REQUIRES (   T)    typename std::enable_if< T >::type * = nullptr

Definition at line 195 of file NET_WebAPIHandler.h.