ctype_base.h revision 1.9
10Sstevel@tonic-gate// Locale support -*- C++ -*-
20Sstevel@tonic-gate
30Sstevel@tonic-gate// Copyright (C) 2002-2018 Free Software Foundation, Inc.
40Sstevel@tonic-gate//
50Sstevel@tonic-gate// This file is part of the GNU ISO C++ Library.  This library is free
60Sstevel@tonic-gate// software; you can redistribute it and/or modify it under the
70Sstevel@tonic-gate// terms of the GNU General Public License as published by the
80Sstevel@tonic-gate// Free Software Foundation; either version 3, or (at your option)
90Sstevel@tonic-gate// any later version.
100Sstevel@tonic-gate
110Sstevel@tonic-gate// This library is distributed in the hope that it will be useful,
120Sstevel@tonic-gate// but WITHOUT ANY WARRANTY; without even the implied warranty of
130Sstevel@tonic-gate// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
140Sstevel@tonic-gate// GNU General Public License for more details.
150Sstevel@tonic-gate
160Sstevel@tonic-gate// Under Section 7 of GPL version 3, you are granted additional
170Sstevel@tonic-gate// permissions described in the GCC Runtime Library Exception, version
180Sstevel@tonic-gate// 3.1, as published by the Free Software Foundation.
190Sstevel@tonic-gate
200Sstevel@tonic-gate// You should have received a copy of the GNU General Public License and
210Sstevel@tonic-gate// a copy of the GCC Runtime Library Exception along with this program;
220Sstevel@tonic-gate// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
230Sstevel@tonic-gate// <http://www.gnu.org/licenses/>.
240Sstevel@tonic-gate
250Sstevel@tonic-gate/** @file bits/ctype_base.h
260Sstevel@tonic-gate *  This is an internal header file, included by other library headers.
270Sstevel@tonic-gate *  Do not attempt to use it directly. @headername{locale}
280Sstevel@tonic-gate */
290Sstevel@tonic-gate
300Sstevel@tonic-gate//
310Sstevel@tonic-gate// ISO C++ 14882: 22.1  Locales
320Sstevel@tonic-gate//
330Sstevel@tonic-gate
340Sstevel@tonic-gate// Information as gleaned from /usr/include/ctype.h.
350Sstevel@tonic-gate
360Sstevel@tonic-gatenamespace std _GLIBCXX_VISIBILITY(default)
370Sstevel@tonic-gate{
380Sstevel@tonic-gate_GLIBCXX_BEGIN_NAMESPACE_VERSION
390Sstevel@tonic-gate
400Sstevel@tonic-gate  /// @brief  Base class for ctype.
410Sstevel@tonic-gate  struct ctype_base
420Sstevel@tonic-gate  {
43    // Non-standard typedefs.
44    typedef const unsigned char*	__to_type;
45
46    // NB: Offsets into ctype<char>::_M_table force a particular size
47    // on the mask type. Because of this, we don't use an enum.
48    typedef short		mask;
49    static const mask upper    	= _UP;
50    static const mask lower 	= _LO;
51    static const mask alpha 	= _LO | _UP | _XA;
52    static const mask digit 	= _DI;
53    static const mask xdigit 	= _XD;
54    static const mask space 	= _CN | _SP | _XS;
55    static const mask print 	= _DI | _LO | _PU | _SP | _UP | _XA;
56    static const mask graph 	= _DI | _LO | _PU | _UP | _XA;
57    static const mask cntrl 	= _BB;
58    static const mask punct 	= _PU;
59    static const mask alnum 	= _DI | _LO | _UP | _XA;
60#if __cplusplus >= 201103L
61    static const mask blank	= _SP | _XB;
62#endif
63  };
64
65_GLIBCXX_END_NAMESPACE_VERSION
66} // namespace
67