summaryrefslogtreecommitdiff
path: root/subplotlib/helpers/subplotlib_context.rs
blob: d5ea7cc9cbe52ca10948d37235c93cb4db98c2a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::collections::HashMap;

#[derive(Debug, Default)]
struct Context {
    counter: usize,
    files: HashMap<String, SubplotDataFile>,
    this_file: Option<SubplotDataFile>,
}

impl Context {
    fn remember_file(&mut self, name: &str, content: SubplotDataFile) {
        self.files.insert(name.to_string(), content);
    }
}

impl ContextElement for Context {
    // An empty implementation is sufficient for now
}