ztsdb
vector.hpp
1 // (C) 2016 Leonardo Silvestri
2 //
3 // This file is part of ztsdb.
4 //
5 // ztsdb is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // ztsdb is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with ztsdb. If not, see <http://www.gnu.org/licenses/>.
17 
18 
19 #ifndef VECTOR_HPP
20 #define VECTOR_HPP
21 
22 #include "vector_base.hpp"
23 
24 namespace arr {
25  // define numbers for types; the vector type needs these in order to
26  // know how to read a vector from a file.
27  TYPE_NB(double, 0);
28  TYPE_NB(bool, 1);
29  TYPE_NB(Global::dtime, 2);
30  TYPE_NB(arr::zstring, 3);
31  TYPE_NB(Global::duration, 4);
32  TYPE_NB(tz::interval, 5);
33  TYPE_NB(tz::period, 6);
34 
35  // define names for types so that we can print out more meaningful
36  // error messages:
37  TYPE_NAME(double, "double");
38  TYPE_NAME(bool, "logical");
39  TYPE_NAME(Global::dtime, "time");
40  TYPE_NAME(arr::zstring, "character");
41  TYPE_NAME(Global::duration, "duration");
42  TYPE_NAME(tz::interval, "interval");
43  TYPE_NAME(tz::period, "period");
44 }
45 
46 // #include "vector_bool.hpp"
47 
48 
49 
50 #endif
tz::period
Definition: period.hpp:30
arr::ZString
Definition: string.hpp:33
tz::interval
Definition: interval.hpp:31
arr
Contains the classes and functions that implement a multidimentional array type.
Definition: allocator.hpp:29