Last change
on this file since 1019 was
1019,
checked in by luba, 18 years ago
|
- String::fill(String&, size_t, size_t, wchar_t) method is corrected
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
834 bytes
|
Line | |
---|
1 | #ifndef __rf_string_ih__ |
---|
2 | #define __rf_string_ih__ |
---|
3 | |
---|
4 | #include "rf_string.hh" |
---|
5 | #include "rf_common.ih" |
---|
6 | |
---|
7 | namespace rftype |
---|
8 | { |
---|
9 | |
---|
10 | using namespace rfrt ; |
---|
11 | |
---|
12 | inline String::String(size_t _len) : |
---|
13 | Object(), |
---|
14 | WString(_len) |
---|
15 | {} |
---|
16 | |
---|
17 | inline String::String (WString const& _s): |
---|
18 | Object(), |
---|
19 | WString(_s) |
---|
20 | {} |
---|
21 | |
---|
22 | inline String& String::operator = (String const& _s) { |
---|
23 | if (this != &_s) { |
---|
24 | this->~String(); |
---|
25 | new(this) String(_s); |
---|
26 | } |
---|
27 | return self; |
---|
28 | } |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | inline unsigned String::get_type () const |
---|
33 | { |
---|
34 | return reg.get_type(); |
---|
35 | } |
---|
36 | |
---|
37 | |
---|
38 | // |
---|
39 | // |
---|
40 | inline uint32_t String::hash () const { |
---|
41 | return 0; |
---|
42 | } |
---|
43 | |
---|
44 | inline bool String::operator == (Object const& _obj) const { |
---|
45 | try { |
---|
46 | String const& str = dynamic_cast<String const&>(_obj); |
---|
47 | return (this->get_data()) == str.get_data(); |
---|
48 | } catch (std::bad_cast&) { |
---|
49 | return false; |
---|
50 | } |
---|
51 | |
---|
52 | } |
---|
53 | |
---|
54 | |
---|
55 | |
---|
56 | } |
---|
57 | |
---|
58 | #endif // __rf_string_ih__ |
---|
Note: See
TracBrowser
for help on using the repository browser.