Flex  0.17.9
server_app.h
Go to the documentation of this file.
1 
16 #ifndef GRAPHSCOPE_SERVER_APP_H_
17 #define GRAPHSCOPE_SERVER_APP_H_
18 
22 
23 namespace gs {
24 
25 class ServerApp : public WriteAppBase {
26  public:
27  ServerApp() {}
28  AppBase::AppType type() const override;
29  bool Query(GraphDBSession& graph, Decoder& input, Encoder& output) override;
30 
31  private:
32  struct vertex_range {
33  vertex_range(uint32_t f, uint32_t t) : from(f), to(t) {}
34 
35  bool contains(uint32_t v) const { return v >= from && v < to; }
36 
37  bool empty() const { return (from >= to); }
38 
39  uint32_t from;
40  uint32_t to;
41  };
42 };
43 
45  public:
48 
49  AppWrapper CreateApp(const GraphDB& graph) override;
50 };
51 
52 } // namespace gs
53 
54 #endif // GRAPHSCOPE_SERVER_APP_H_
graph_db_session.h
gs::ServerApp::Query
bool Query(GraphDBSession &graph, Decoder &input, Encoder &output) override
Definition: server_app.cc:87
gs
Definition: adj_list.h:23
gs::ServerAppFactory::CreateApp
AppWrapper CreateApp(const GraphDB &graph) override
Definition: server_app.cc:310
gs::ServerAppFactory::ServerAppFactory
ServerAppFactory()
Definition: server_app.h:46
gs::Encoder
Definition: app_utils.h:25
gs::Decoder
Definition: app_utils.h:65
gs::ServerAppFactory
Definition: server_app.h:44
gs::ServerApp::ServerApp
ServerApp()
Definition: server_app.h:27
gs::WriteAppBase
Definition: app_base.h:67
gs::ServerApp::type
AppBase::AppType type() const override
Definition: server_app.cc:85
gs::GraphDBSession
Definition: graph_db_session.h:36
gs::GraphDB
Definition: graph_db.h:70
gs::ServerApp
Definition: server_app.h:25
gs::ServerApp::vertex_range::vertex_range
vertex_range(uint32_t f, uint32_t t)
Definition: server_app.h:33
gs::ServerApp::vertex_range
Definition: server_app.h:32
gs::ServerApp::vertex_range::from
uint32_t from
Definition: server_app.h:39
gs::ServerApp::vertex_range::empty
bool empty() const
Definition: server_app.h:37
gs::AppWrapper
Definition: app_base.h:78
graph_db.h
app_base.h
gs::AppBase::AppType
AppType
Definition: app_base.h:37
gs::ServerAppFactory::~ServerAppFactory
~ServerAppFactory()
Definition: server_app.h:47
gs::ServerApp::vertex_range::to
uint32_t to
Definition: server_app.h:40
gs::ServerApp::vertex_range::contains
bool contains(uint32_t v) const
Definition: server_app.h:35
gs::AppFactoryBase
Definition: app_base.h:115