NUMToken.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * This file is part of the libetonyek project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef NUMTOKEN_H_INCLUDED
11 #define NUMTOKEN_H_INCLUDED
12 
13 namespace libetonyek
14 {
15 
16 namespace NUMToken
17 {
18 
19 namespace detail
20 {
21 
22 template<unsigned N, unsigned P>
23 struct log_impl
24 {
25  static const unsigned value = log_impl<(N >> 1), P + 1>::value;
26 };
27 
28 template<unsigned P>
29 struct log_impl<1, P>
30 {
31  static const unsigned value = P;
32 };
33 
34 template<unsigned P>
35 struct log_impl<0, P>
36 {
37 };
38 
39 template<unsigned N>
40 struct log
41 {
42  static const unsigned value = log_impl<N, 0>::value;
43 };
44 
45 }
46 
47 enum
48 {
50 
51  // elements
52 
53  // attributes
54 
55  // attribute values
56 
58 };
59 
60 // namespaces
61 enum
62 {
69 };
70 
71 }
72 
74 {
75  int operator()(const char *str) const;
76 };
77 
78 }
79 
80 #endif // NUMTOKEN_H_INCLUDED
81 
82 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: EtonyekDocument.cpp:40
Definition: NUMToken.h:64
Definition: NUMToken.h:57
Definition: NUMToken.h:49
Definition: NUMToken.h:65
Definition: NUMToken.h:67
Definition: NUMToken.h:63
static const unsigned value
Definition: NUMToken.h:25
Definition: NUMToken.h:68
Definition: NUMToken.h:66
Definition: NUMToken.h:73
static const unsigned value
Definition: NUMToken.h:42
Definition: NUMToken.h:40

Generated for libetonyek by doxygen 1.8.9.1