00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file OS_NS_ctype.h 00006 * 00007 * OS_NS_ctype.h,v 1.7 2005/10/28 16:14:54 ossama Exp 00008 * 00009 * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> 00010 * @author Jesper S. M|ller<stophph@diku.dk> 00011 * @author and a cast of thousands... 00012 * 00013 * Originally in OS.h. 00014 */ 00015 //============================================================================= 00016 00017 #ifndef ACE_OS_NS_CTYPE_H 00018 # define ACE_OS_NS_CTYPE_H 00019 00020 # include /**/ "ace/pre.h" 00021 00022 # include "ace/config-all.h" 00023 00024 # if !defined (ACE_LACKS_PRAGMA_ONCE) 00025 # pragma once 00026 # endif /* ACE_LACKS_PRAGMA_ONCE */ 00027 00028 #include "ace/ACE_export.h" 00029 00030 #if defined (ACE_EXPORT_MACRO) 00031 # undef ACE_EXPORT_MACRO 00032 #endif 00033 #define ACE_EXPORT_MACRO ACE_Export 00034 00035 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00036 00037 namespace ACE_OS { 00038 00039 // these are non-standard names... 00040 00041 /** @name Functions from <cctype> 00042 * 00043 * Included are the functions defined in <cctype> and their <cwctype> 00044 * equivalents. 00045 * 00046 * Since they are often implemented as macros, we don't use the same name 00047 * here. Instead, we change by prepending "ace_". 00048 */ 00049 //@{ 00050 00051 /// Returns true if the character is an alphanumeric character. 00052 ACE_NAMESPACE_INLINE_FUNCTION 00053 int ace_isalnum (ACE_TCHAR c); 00054 00055 /// Returns true if the character is an alphabetic character. 00056 ACE_NAMESPACE_INLINE_FUNCTION 00057 int ace_isalpha (ACE_TCHAR c); 00058 00059 /// Returns true if the character is a control character. 00060 ACE_NAMESPACE_INLINE_FUNCTION 00061 int ace_iscntrl (ACE_TCHAR c); 00062 00063 /// Returns true if the character is a decimal-digit character. 00064 ACE_NAMESPACE_INLINE_FUNCTION 00065 int ace_isdigit (ACE_TCHAR c); 00066 00067 /// Returns true if the character is a printable character other than a space. 00068 ACE_NAMESPACE_INLINE_FUNCTION 00069 int ace_isgraph (ACE_TCHAR c); 00070 00071 /// Returns true if the character is a lowercase character. 00072 ACE_NAMESPACE_INLINE_FUNCTION 00073 int ace_islower (ACE_TCHAR c); 00074 00075 /// Returns true if the character is a printable character. 00076 ACE_NAMESPACE_INLINE_FUNCTION 00077 int ace_isprint (ACE_TCHAR c); 00078 00079 /// Returns true if the character is a punctuation character. 00080 ACE_NAMESPACE_INLINE_FUNCTION 00081 int ace_ispunct (ACE_TCHAR c); 00082 00083 /// Returns true if the character is a space character. 00084 ACE_NAMESPACE_INLINE_FUNCTION 00085 int ace_isspace (ACE_TCHAR c); 00086 00087 /// Returns true if the character is an uppercase character. 00088 ACE_NAMESPACE_INLINE_FUNCTION 00089 int ace_isupper (ACE_TCHAR c); 00090 00091 /// Returns true if the character is a hexadecimal-digit character. 00092 ACE_NAMESPACE_INLINE_FUNCTION 00093 int ace_isxdigit (ACE_TCHAR c); 00094 00095 /// Converts a character to lower case (char version). 00096 ACE_NAMESPACE_INLINE_FUNCTION 00097 int ace_tolower (int c); 00098 00099 #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWLOWER) 00100 /// Converts a character to lower case (wchar_t version). 00101 ACE_NAMESPACE_INLINE_FUNCTION 00102 wint_t ace_towlower (wint_t c); 00103 #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWLOWER */ 00104 00105 /// Converts a character to upper case (char version). 00106 ACE_NAMESPACE_INLINE_FUNCTION 00107 int ace_toupper (int c); 00108 00109 #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_TOWUPPER) 00110 /// Converts a character to upper case (wchar_t version). 00111 ACE_NAMESPACE_INLINE_FUNCTION 00112 wint_t ace_towupper (wint_t c); 00113 #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWUPPER */ 00114 00115 //@} 00116 00117 } /* namespace ACE_OS */ 00118 00119 ACE_END_VERSIONED_NAMESPACE_DECL 00120 00121 # if defined (ACE_HAS_INLINED_OSCALLS) 00122 # if defined (ACE_INLINE) 00123 # undef ACE_INLINE 00124 # endif /* ACE_INLINE */ 00125 # define ACE_INLINE inline 00126 # include "ace/OS_NS_ctype.inl" 00127 # endif /* ACE_HAS_INLINED_OSCALLS */ 00128 00129 # include /**/ "ace/post.h" 00130 #endif /* ACE_OS_NS_CTYPE_H */