[yunq] Add codegen for clients and servers (untested).
This commit is contained in:
parent
963cc0b4fa
commit
71e3521b87
12 changed files with 472 additions and 75 deletions
22
yunq/client.h.jinja
Normal file
22
yunq/client.h.jinja
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// Generated file - DO NOT MODIFY
|
||||
#pragma once
|
||||
|
||||
#include <ztypes.h>
|
||||
|
||||
#include "{{file}}.h"
|
||||
|
||||
{% for interface in interfaces -%}
|
||||
class {{interface.name}}Client {
|
||||
public:
|
||||
{{interface.name}}Client(z_cap_t {{interface.name}}_cap) : endpoint_({{interface.name}}_cap) {}
|
||||
{{interface.name}}Client(const {{interface.name}}Client&) = delete;
|
||||
{{interface.name}}Client({{interface.name}}Client&&) = delete;
|
||||
{% for method in interface.methods %}
|
||||
[[nodiscard]] glcr::ErrorCode {{method.name}}(const {{method.request}}& request, {{method.response}}& response);
|
||||
{% endfor %}
|
||||
private:
|
||||
z_cap_t endpoint_;
|
||||
};
|
||||
|
||||
{%- endfor %}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue