aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/types.hh
blob: 6c4c5ab74f86b94c3e1cb0688e1b29d868f1a91d (plain)
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
34
35
36
37
#pragma once

#include "ref.hh"

#include <list>
#include <set>
#include <string>
#include <map>
#include <vector>

namespace nix {

using std::list;
using std::set;
using std::vector;
using std::string;

typedef list<string> Strings;
typedef set<string> StringSet;
typedef std::map<string, string> StringMap;

/* Paths are just strings. */

typedef string Path;
typedef list<Path> Paths;
typedef set<Path> PathSet;

typedef vector<std::pair<string, string>> Headers;

/* Helper class to run code at startup. */
template<typename T>
struct OnStartup
{
    OnStartup(T && t) { t(); }
};

}