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
13namespace libetonyek
14{
15
16namespace NUMToken
17{
18
19namespace detail
20{
21
22template<unsigned N, unsigned P>
24{
25 static const unsigned value = log_impl<(N >> 1), P + 1>::value;
26};
27
28template<unsigned P>
29struct log_impl<1, P>
30{
31 static const unsigned value = P;
32};
33
34template<unsigned P>
35struct log_impl<0, P>
36{
37};
38
39template<unsigned N>
40struct log
41{
42 static const unsigned value = log_impl<N, 0>::value;
43};
44
45}
46
47enum
48{
50
51 // elements
52
53 // attributes
54
55 // attribute values
56
58};
59
60// namespaces
61enum
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: */
@ LAST_TOKEN
Definition: NUMToken.h:57
@ INVALID_TOKEN
Definition: NUMToken.h:49
@ NS_URI_SF
Definition: NUMToken.h:66
@ NS_NONE
Definition: NUMToken.h:64
@ NS_URI_LS
Definition: NUMToken.h:65
@ NS_URI_XSI
Definition: NUMToken.h:68
@ NS_URI_SFA
Definition: NUMToken.h:67
@ TOKEN_RANGE
Definition: NUMToken.h:63
Definition: EtonyekDocument.cpp:41
static const unsigned value
Definition: NUMToken.h:25
Definition: NUMToken.h:41
static const unsigned value
Definition: NUMToken.h:42
Definition: NUMToken.h:74
int operator()(const char *str) const
Definition: NUMToken.cpp:29

Generated for libetonyek by doxygen 1.9.3