blob: e9c04c00311629760ed3dff6b35252f54c7eeb08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
// -*- C++ -*-
//=============================================================================
/**
* @file OS_NS_ctype.h
*
* $Id$
*
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
* @author Jesper S. M|ller<stophph@diku.dk>
* @author and a cast of thousands...
*
* Originally in OS.h.
*/
//=============================================================================
#ifndef ACE_OS_NS_CTYPE_H
# define ACE_OS_NS_CTYPE_H
# include /**/ "ace/pre.h"
# include "ace/config-all.h"
# if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/ACE_export.h"
#if defined (ACE_EXPORT_MACRO)
# undef ACE_EXPORT_MACRO
#endif
#define ACE_EXPORT_MACRO ACE_Export
namespace ACE_OS
{
// these are non-standard names...
/** @name Functions from <cctype>
*
* Included are the functions defined in <cctype> and their <cwctype>
* equivalents.
*
* Since they are often implemented as macros, we don't use the same name
* here. Instead, we change by prepending "ace_".
*/
//@{
/// Returns true if the character is an alphanumeric character.
template <typename CHAR_TYPE> inline
int ace_isalnum (CHAR_TYPE c);
/// Returns true if the character is an alphabetic character.
template <typename CHAR_TYPE> inline
int ace_isalpha (CHAR_TYPE c);
/// Returns true if the character is a control character.
template <typename CHAR_TYPE> inline
int ace_iscntrl (CHAR_TYPE c);
/// Returns true if the character is a decimal-digit character.
template <typename CHAR_TYPE> inline
int ace_isdigit (CHAR_TYPE c);
/// Returns true if the character is a printable character other than a space.
template <typename CHAR_TYPE> inline
int ace_isgraph (CHAR_TYPE c);
/// Returns true if the character is a lowercase character.
template <typename CHAR_TYPE> inline
int ace_islower (CHAR_TYPE c);
/// Returns true if the character is a printable character.
template <typename CHAR_TYPE> inline
int ace_isprint (CHAR_TYPE c);
/// Returns true if the character is a punctuation character.
template <typename CHAR_TYPE> inline
int ace_ispunct (CHAR_TYPE c);
/// Returns true if the character is a space character.
template <typename CHAR_TYPE> inline
int ace_isspace (CHAR_TYPE c);
/// Returns true if the character is an uppercase character.
template <typename CHAR_TYPE> inline
int ace_isupper (CHAR_TYPE c);
/// Returns true if the character is a hexadecimal-digit character.
template <typename CHAR_TYPE> inline
int ace_isxdigit (CHAR_TYPE c);
/// Converts a character to lower case (char version).
ACE_NAMESPACE_INLINE_FUNCTION
int ace_tolower (int c);
/// Converts a character to lower case (wchar_t version).
ACE_NAMESPACE_INLINE_FUNCTION
wint_t ace_towlower (wint_t c);
/// Converts a character to upper case (char version).
ACE_NAMESPACE_INLINE_FUNCTION
int ace_toupper (int c);
/// Converts a character to upper case (wchar_t version).
ACE_NAMESPACE_INLINE_FUNCTION
wint_t ace_towupper (wint_t c);
//@}
} /* namespace ACE_OS */
# if defined (ACE_HAS_INLINED_OSCALLS)
# if defined (ACE_INLINE)
# undef ACE_INLINE
# endif /* ACE_INLINE */
# define ACE_INLINE inline
# include "ace/OS_NS_ctype.inl"
# endif /* ACE_HAS_INLINED_OSCALLS */
#include "ace/OS_NS_ctype_T.inl"
# include /**/ "ace/post.h"
#endif /* ACE_OS_NS_CTYPE_H */
|