whitespace -> use tabs
[satcheck.git] / stl-model.h
1 /*      Copyright (c) 2015 Regents of the University of California
2  *
3  *      Author: Brian Demsky <bdemsky@uci.edu>
4  *
5  *      This program is free software; you can redistribute it and/or
6  *      modify it under the terms of the GNU General Public License
7  *      version 2 as published by the Free Software Foundation.
8  */
9
10 #ifndef __STL_MODEL_H__
11 #define __STL_MODEL_H__
12
13 #include <vector>
14 #include <list>
15 #include "mymemory.h"
16
17 template<typename _Tp>
18 class ModelList : public std::list<_Tp, ModelAlloc<_Tp> >
19 {
20  public:
21         typedef std::list< _Tp, ModelAlloc<_Tp> > list;
22
23         ModelList() :
24                 list()
25         { }
26
27         ModelList(size_t n, const _Tp& val = _Tp()) :
28                 list(n, val)
29         { }
30
31                 MEMALLOC;
32 };
33
34 template<typename _Tp>
35 class SnapList : public std::list<_Tp, SnapshotAlloc<_Tp> >
36 {
37  public:
38         typedef std::list<_Tp, SnapshotAlloc<_Tp> > list;
39
40         SnapList() :
41                 list()
42         { }
43
44         SnapList(size_t n, const _Tp& val = _Tp()) :
45                 list(n, val)
46         { }
47
48         SNAPSHOTALLOC;
49 };
50
51 template<typename _Tp>
52 class ModelVector : public std::vector<_Tp, ModelAlloc<_Tp> >
53 {
54  public:
55         typedef std::vector< _Tp, ModelAlloc<_Tp> > vector;
56
57         ModelVector() :
58                 vector()
59         { }
60
61         ModelVector(size_t n, const _Tp& val = _Tp()) :
62                 vector(n, val)
63         { }
64
65                 MEMALLOC;
66 };
67
68 template<typename _Tp>
69 class SnapVector : public std::vector<_Tp, SnapshotAlloc<_Tp> >
70 {
71  public:
72         typedef std::vector< _Tp, SnapshotAlloc<_Tp> > vector;
73
74         SnapVector() :
75                 vector()
76         { }
77
78         SnapVector(size_t n, const _Tp& val = _Tp()) :
79                 vector(n, val)
80         { }
81
82         SNAPSHOTALLOC;
83 };
84
85 #endif /* __STL_MODEL_H__ */