summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-07-12 16:50:35 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-07-12 16:50:35 +0200
commit73bea4600f5bb3ad748d9bfa65ef6cd14e6bbd55 (patch)
tree14c6448e2fc0ff8714c51caaed273ffeb6bd5b59 /src/map/map_handler.erl
parentb6e8cc8606b288970d7cdf577c6dd36950adac91 (diff)
Starting work on the Map handler...
Diffstat (limited to 'src/map/map_handler.erl')
-rw-r--r--src/map/map_handler.erl34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/map/map_handler.erl b/src/map/map_handler.erl
new file mode 100644
index 0000000..9c7f4ce
--- /dev/null
+++ b/src/map/map_handler.erl
@@ -0,0 +1,34 @@
+-module(map_handler).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-export([start/1]).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-spec start (pid()) -> 'ok'.
+start (TimedCachesManagerPid) ->
+ case shr_database:fetch(map_db, <<"0">>, admin) of
+ {ok, _} -> ok;
+ not_found ->
+ shr_database:insert
+ (
+ map_db,
+ <<"0">>,
+ any,
+ any,
+ map_shim:generate_random_map()
+ )
+ end,
+ shr_timed_caches_manager:new_cache(TimedCachesManagerPid, map_db, none),
+ ok.