Last change
on this file since 756 was
756,
checked in by luba, 18 years ago
|
- method is_not_space() is added
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
893 bytes
|
Line | |
---|
1 | // $Source$ |
---|
2 | // $Revision: 756 $ |
---|
3 | // $Date: 2003-05-25 16:58:24 +0000 (Sun, 25 May 2003) $ |
---|
4 | // $Author: luba $ |
---|
5 | |
---|
6 | #include "rf_char.hh" |
---|
7 | //#include "rf_int.hh" |
---|
8 | #include "rf_term.ih" |
---|
9 | |
---|
10 | #include <wctype.h> |
---|
11 | #include <wchar.h> |
---|
12 | #include <locale.h> |
---|
13 | |
---|
14 | namespace rftype |
---|
15 | { |
---|
16 | |
---|
17 | using namespace rfrt ; |
---|
18 | |
---|
19 | inline Char::Char(wchar_t _wch) : |
---|
20 | Term (term_sym, type_char) |
---|
21 | { |
---|
22 | uint_data2 = _wch; |
---|
23 | } |
---|
24 | |
---|
25 | inline bool Char::is_digit() const { |
---|
26 | return iswdigit(this->uint_data2); |
---|
27 | }; |
---|
28 | |
---|
29 | inline wchar_t Char::to_wchar_t() const { |
---|
30 | return uint_data2; |
---|
31 | }; |
---|
32 | |
---|
33 | inline bool Char::is_not_space() const { |
---|
34 | bool res = true; |
---|
35 | if (uint_data2 == 32) |
---|
36 | res = false; |
---|
37 | return res; |
---|
38 | } |
---|
39 | |
---|
40 | #if 0 |
---|
41 | inline Char::Char(const Char& _ch) : |
---|
42 | Term (term_sym, type_char) |
---|
43 | { |
---|
44 | uint_data2 = _ch.uint_data2; |
---|
45 | } |
---|
46 | #endif |
---|
47 | #if 0 |
---|
48 | |
---|
49 | inline Int Char::to_byte() const { |
---|
50 | Int(ch); |
---|
51 | }; |
---|
52 | |
---|
53 | inline bool Char::operator==(const Char& c) const { |
---|
54 | return (ch == c.ch); |
---|
55 | }; |
---|
56 | |
---|
57 | |
---|
58 | |
---|
59 | inline wchar_t Char::to_wchar_t() const { |
---|
60 | return ch; |
---|
61 | } |
---|
62 | |
---|
63 | #endif |
---|
64 | |
---|
65 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.