Last change
on this file since 733 was
733,
checked in by luba, 18 years ago
|
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.6 KB
|
Line | |
---|
1 | #ifndef __rf_word_hh__ |
---|
2 | #define __rf_word_hh__ |
---|
3 | |
---|
4 | #include "rf_types.hh" |
---|
5 | #include "rf_term.hh" |
---|
6 | #include "rf_expr.hh" |
---|
7 | |
---|
8 | namespace rftype |
---|
9 | { |
---|
10 | |
---|
11 | using namespace rfrt ; |
---|
12 | |
---|
13 | class Word : |
---|
14 | public Term |
---|
15 | { |
---|
16 | |
---|
17 | struct Header |
---|
18 | { |
---|
19 | size_t ref_count ; |
---|
20 | size_t length ; |
---|
21 | uint32_t hash ; |
---|
22 | wchar_t content[] ; |
---|
23 | }; |
---|
24 | |
---|
25 | public: |
---|
26 | /// |
---|
27 | /// Constructor from a string of wide characters |
---|
28 | inline Word (wchar_t const* _wstr) ; |
---|
29 | /// |
---|
30 | /// Constructor from a locale-dependent string |
---|
31 | inline Word (char const* _str, char const* _locale = null) ; |
---|
32 | /// |
---|
33 | /// Copy constructor |
---|
34 | inline Word (Word const& _word) ; |
---|
35 | /// |
---|
36 | /// Destructor |
---|
37 | |
---|
38 | inline ~Word () ; |
---|
39 | /// |
---|
40 | /// Assignment operator |
---|
41 | inline Word& operator = (Word const& _word) ; |
---|
42 | |
---|
43 | inline size_t get_len (); |
---|
44 | |
---|
45 | inline int is_number (); |
---|
46 | |
---|
47 | static Expr create_expr (wchar_t const* _wstr) ; |
---|
48 | |
---|
49 | static Expr create_expr (char const* _str, char const* _locale = null) ; |
---|
50 | |
---|
51 | static uintptr_t ctor (uintptr_t _data) ; |
---|
52 | static void dtor (uintptr_t _data) ; |
---|
53 | static bool eq (uintptr_t _data1, uintptr_t _data2) ; |
---|
54 | static int compare (uintptr_t _data1, uintptr_t _data2) ; |
---|
55 | static uint32_t hash (uintptr_t _data) ; |
---|
56 | static pxx::WString to_string (uintptr_t _data) ; |
---|
57 | static short_type_funcs_t funcs ; |
---|
58 | static TypeRegister reg ; |
---|
59 | |
---|
60 | class NumIterator { |
---|
61 | private: |
---|
62 | const wchar_t* iter; |
---|
63 | const wchar_t* bound; |
---|
64 | public: |
---|
65 | inline NumIterator(Word const& _word) ; |
---|
66 | inline NumIterator& operator ++() ; |
---|
67 | inline NumIterator const& operator =(Word const& _word) ; |
---|
68 | inline bool in_bounds () ; |
---|
69 | inline const wchar_t operator*() ; |
---|
70 | }; |
---|
71 | |
---|
72 | |
---|
73 | |
---|
74 | }; |
---|
75 | |
---|
76 | } |
---|
77 | |
---|
78 | #endif // __rf_word_hh__ |
---|
79 | |
---|
Note: See
TracBrowser
for help on using the repository browser.