removed include.hpp

This commit is contained in:
Dominik Tomičević 2015-10-11 21:02:42 +02:00
parent 14594e799b
commit 0effba90d9

View File

@ -1,53 +0,0 @@
/** @file include.hpp
* @brief Links all restful resources to the application
*
* This file is autogenerated by the python script link_resources.py
*
* YOU SHOULD NOT EDIT THIS FILE MANUALLY!
*
* well, only if you're editing the template file, that's ok :)
*/
#ifndef MEMGRAPH_API_RESOURCES_INCLUDE_HPP
#define MEMGRAPH_API_RESOURCES_INCLUDE_HPP
#include <list>
#include <memory>
#include "utils/ioc/container.hpp"
#include "api/restful/resource.hpp"
#include "transactions/engine.hpp"
#include "threading/task.hpp"
#include "speedy/speedy.hpp"
// for each file in this folder a script will generate an include directive if
// this file contains any resources
// e.g.
// #include "node.hpp"
// #include "relationship.hpp"
#include "node.hpp"
#include "node.hpp"
template <class T>
void insert(ioc::Container& container, const std::string& path)
{
auto app = container.resolve<sp::Speedy>();
auto resource = container.singleton<T, Task, Db>();
resource->link(*app, path);
}
void init(ioc::Container& container)
{
// for each resource in a file included above, the script will generate a
// linkage command call to the function above
// e.g.
// insert<CLASS>(PATH);
//
// insert<Nodes>("/node");
// insert<Node>("/node/{id:\\d+}");
insert<Nodes>(container, "/node");
insert<Node>(container, "/node/{id:\\d+}");
}
#endif