comparison enigma/enigma_types.h @ 1:1459e74fda3f

Finished creating rotor class and factories.
author Brian Neal <bgneal@gmail.com>
date Fri, 22 Jun 2012 20:15:11 -0500
parents 74ebb2150658
children
comparison
equal deleted inserted replaced
0:74ebb2150658 1:1459e74fda3f
6 // 6 //
7 // enigma_types.h - This file contains common types used throughout Cpp-Enigma. 7 // enigma_types.h - This file contains common types used throughout Cpp-Enigma.
8 8
9 #include <exception> 9 #include <exception>
10 #include <string> 10 #include <string>
11 #include <array>
11 12
12 namespace enigma 13 namespace enigma
13 { 14 {
14 class enigma_error : public std::exception 15 class enigma_error : public std::exception
15 { 16 {
26 } 27 }
27 28
28 private: 29 private:
29 std::string what_arg; 30 std::string what_arg;
30 }; 31 };
32
33 // Arrays of 26 items are very commonly used:
34 typedef std::array<int, 26> alpha_int_array;
35 typedef std::array<bool, 26> alpha_bool_array;
31 } 36 }
32 37
33 #endif 38 #endif