-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstorage.cpp
More file actions
33 lines (27 loc) · 934 Bytes
/
storage.cpp
File metadata and controls
33 lines (27 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// (c) 2015-2016 Sebastian Kapfer <sebastian.kapfer@fau.de>, FAU Erlangen
#include "storage.hpp"
#include <memory>
void AbstractStorage::load_periods (string_ref filename)
{
set_periods (Periods::from_file (filename));
}
void AbstractStorage::add_data (string_ref filename)
{
::add_data (this, filename);
}
void AbstractStorage::save_data (string_ref filename)
{
::save_data (filename, this);
}
AbstractStorage *make_storage (string_ref encoding_typecode)
{
return Factory <AbstractStorage>::make (encoding_typecode);
}
static Register <Storage <Monodisperse2D>> one ("mono2d");
static Register <Storage <Tagged <Monodisperse2D>>> three ("tagged_mono2d");
static Register <Storage <Monodisperse3D>> two ("mono3d");
AbstractChainRunner *make_chainrunner (string_ref interaction_type, AbstractStorage *stor)
{
return Factory <AbstractChainRunner>::make (
interaction_type + "/" + stor->typecode ());
}