C++ Unified Device Interface
|
#include <Common.h>
Public Member Functions | |
Common (std::shared_ptr< Common > parent, std::string uuid, std::string name, std::string description, std::string ontology="") | |
virtual | ~Common () |
std::vector< std::string > | fqid (void) |
std::shared_ptr< Common > | operator[] (std::string fqid) |
bool | insert (std::string uuid, std::shared_ptr< Common > &child) |
bool | insert (std::string uuid, Common *child) |
bool | remove (std::string uuid) |
template<typename T > | |
T * | cast (void) |
bool | is_object (void) const |
bool | is_variable (void) const |
bool | is_function (void) const |
bool | is_parameter (void) const |
virtual HTTP::Json | wjson (void) |
virtual std::string | json (void) |
HTTP::Response | handle (HTTP::Request request, std::wsmatch match=std::wsmatch()) |
HTTP Handler. More... | |
![]() | |
Resource () | |
Constructor. More... | |
~Resource () | |
Default Destructor. More... | |
virtual Response | handle (Request message, std::wsmatch match=std::wsmatch()) |
HTTP Handler. More... | |
virtual Response | handle_get (Request message, std::wsmatch match=std::wsmatch()) |
HTTP GET Handler. More... | |
virtual Response | handle_put (Request message, std::wsmatch match=std::wsmatch()) |
HTTP PUT Handler. More... | |
virtual Response | handle_post (Request message, std::wsmatch match=std::wsmatch()) |
HTTP POST Handler. More... | |
virtual Response | handle_delete (Request message, std::wsmatch match=std::wsmatch()) |
HTTP DELETE Handler. More... | |
virtual Response | handle_patch (Request message, std::wsmatch match=std::wsmatch()) |
HTTP PATCH Handler. More... | |
virtual Response | handle_options (Request message, std::wsmatch match=std::wsmatch()) |
HTTP OPTIONS Handler. More... | |
virtual Response | handle_head (Request message, std::wsmatch match=std::wsmatch()) |
HTTP HEAD Handler. More... | |
virtual Response | handle_exception (Request message, std::exception &exception, std::wsmatch match=std::wsmatch()) |
HTTP Exception handler. More... | |
Public Attributes | |
std::map< std::string, std::shared_ptr< Common > > | children |
std::shared_ptr< Common > | parent |
std::shared_ptr< Common > | self |
std::string | uuid |
std::string | name |
std::string | description |
std::string | ontology |
std::recursive_mutex | mutex |
Additional Inherited Members | |
![]() | |
static web::json::value | request_info (Request message, std::wsmatch match=std::wsmatch()) |
Request Info. More... | |
![]() | |
void | apply_headers (Response &response) |
Apply headers. More... | |
![]() | |
std::vector< web::http::method > | allowed_methods |
Allowed methods. More... | |
std::wstring | content_type |
Content type. More... | |
std::wstring | allowed_origins |
Allowed Origins. More... | |
SOIL::Common::Common | ( | std::shared_ptr< Common > | parent, |
std::string | uuid, | ||
std::string | name, | ||
std::string | description, | ||
std::string | ontology = "" |
||
) |
Definition at line 5 of file Common.cpp.
|
virtual |
Definition at line 19 of file Common.cpp.
std::vector< std::string > SOIL::Common::fqid | ( | void | ) |
Definition at line 26 of file Common.cpp.
|
virtual |
Handler that is called by the server on HTTP requests. By default, this function redirects to the more specifc ones based on the respective HTTP Verb. In case an exception occurs, it calls the exception handler.
[in] | message | Incoming HTTP request as preprocessed by cpprestsdk |
[in] | match | Match result of the request path that led to this resource |
Reimplemented from HTTP::Resource.
Definition at line 143 of file Common.cpp.
bool SOIL::Common::insert | ( | std::string | uuid, |
Common * | child | ||
) |
Definition at line 86 of file Common.cpp.
bool SOIL::Common::insert | ( | std::string | uuid, |
std::shared_ptr< Common > & | child | ||
) |
Definition at line 79 of file Common.cpp.
bool SOIL::Common::is_function | ( | void | ) | const |
Definition at line 108 of file Common.cpp.
bool SOIL::Common::is_object | ( | void | ) | const |
Definition at line 98 of file Common.cpp.
bool SOIL::Common::is_parameter | ( | void | ) | const |
Definition at line 113 of file Common.cpp.
bool SOIL::Common::is_variable | ( | void | ) | const |
Definition at line 103 of file Common.cpp.
|
virtual |
Definition at line 136 of file Common.cpp.
std::shared_ptr< SOIL::Common > SOIL::Common::operator[] | ( | std::string | fqid | ) |
Definition at line 38 of file Common.cpp.
bool SOIL::Common::remove | ( | std::string | uuid | ) |
Definition at line 91 of file Common.cpp.
|
virtual |
Reimplemented in SOIL::Function, SOIL::Object, SOIL::Figure< T, x, y >, SOIL::Figure< T, -1, -1 >, SOIL::Parameter< T, x, y >, and SOIL::Variable< T, x, y >.
Definition at line 118 of file Common.cpp.
std::map<std::string, std::shared_ptr<Common> > SOIL::Common::children |