Joedb 10.2.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Procedures.h
Go to the documentation of this file.
1/////////////////////////////////////////////////////////////////////////////
2//
3// This code was automatically generated by the joedb compiler
4// https://www.joedb.org/
5//
6// Path to compiler: /home/rcoulom/repos/joedb/compcmake/gcc_debug/joedbc
7// Version: 10.2.1
8// joedbc compilation time: Sep 15 2025 20:22:33
9// Generation of this file: 2025-09-15 18:23:01 GMT
10//
11/////////////////////////////////////////////////////////////////////////////
12#ifndef tutorial_rpc_Procedures_declared
13#define tutorial_rpc_Procedures_declared
14
15#include "city/Procedure.h"
17#include "../Procedure.h"
18
19namespace tutorial::rpc
20{
21 /// A collection of procedures to be used by joedb::rpc::Server
23 {
24 public:
26 {
27 private:
28 void execute(city::Writable_Database &message) const override
29 {
30 service.insert_city(message);
31 }
32
33 public:
35 } insert_city;
36
38 {
39 private:
40 void execute(city::Writable_Database &message) const override
41 {
42 service.delete_city(message);
43 }
44
45 public:
47 } delete_city;
48
50 {
51 private:
52 void execute(population::Writable_Database &message) const override
53 {
54 service.get_population(message);
55 }
56
57 public:
59 } get_population;
60
62 {
63 private:
64 void execute(tutorial::Writable_Database &message) const override
65 {
66 service.get_inhabitants(message);
67 }
68
69 public:
71 } get_inhabitants;
72
73 const std::vector<joedb::rpc::Procedure *> procedures
74 {
79 };
80
82 insert_city(service),
83 delete_city(service),
84 get_population(service),
85 get_inhabitants(service)
86 {
87 }
88 };
89}
90
91#endif
Class for all procedures based on this message schema.
Definition Procedure.h:23
rpc::Service & service
Definition Procedure.h:25
A Database that contains a joedb::Writable_Journal and keeps them in sync.
A collection of procedures to be used by joedb::rpc::Server.
Definition Procedures.h:23
const std::vector< joedb::rpc::Procedure * > procedures
Definition Procedures.h:74
Procedures(Service &service)
Definition Procedures.h:81
A collection of procedures that will be executed in the rpc server.
Definition Service.h:17
void get_inhabitants(tutorial::Writable_Database &message)
A message can have the same schema as the main database.
Definition Service.h:81
void get_population(population::Writable_Database &population)
A procedure can return values by writing them to the message database.
Definition Service.h:59
void delete_city(city::Writable_Database &city)
Delete a city from a name string.
Definition Service.h:43
void insert_city(city::Writable_Database &city)
Insert a city from a name string.
Definition Service.h:27
Class for all procedures based on this message schema.
Definition Procedure.h:23
A Database that contains a joedb::Writable_Journal and keeps them in sync.
Class for all procedures based on this message schema.
Definition Procedure.h:23
A Database that contains a joedb::Writable_Journal and keeps them in sync.
Automatically generated by joedbc.
Definition Client.h:19