source: to-imperative/trunk/runtime/rf_char.ih @ 756

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
14namespace rftype
15{
16
17using namespace rfrt ;
18
19inline Char::Char(wchar_t _wch) :
20  Term (term_sym, type_char)
21{
22  uint_data2 = _wch;
23}
24
25inline bool Char::is_digit() const {
26  return iswdigit(this->uint_data2);
27};
28
29inline wchar_t Char::to_wchar_t() const {
30  return uint_data2;
31};
32
33inline 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
41inline 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
49inline Int Char::to_byte() const {
50  Int(ch);
51};
52
53inline bool Char::operator==(const Char& c) const {
54  return (ch == c.ch);
55};
56
57
58
59inline 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.