diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-13 05:54:40 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-13 05:54:40 +0000 |
| commit | ef02a0c8ae65f169157c90064a335303e964a4c1 (patch) | |
| tree | f1a1bf6cfe05ee11545bfa811f5a2582e1906dce /otk | |
| parent | 5a90d2b671f01f29043ab82f909440de0abfa362 (diff) | |
almost done the ustring conversion
Diffstat (limited to 'otk')
| -rw-r--r-- | otk/otk.hh | 1 | ||||
| -rw-r--r-- | otk/otk.i | 1 | ||||
| -rw-r--r-- | otk/property.cc | 2 | ||||
| -rw-r--r-- | otk/ustring.cc | 5 | ||||
| -rw-r--r-- | otk/ustring.hh | 3 |
5 files changed, 10 insertions, 2 deletions
@@ -29,6 +29,7 @@ #include "timerqueue.hh" #include "timerqueuemanager.hh" #include "util.hh" +#include "ustring.hh" #include "widget.hh" #endif // __otk_hh @@ -12,6 +12,7 @@ %include "stl.i" //%include std_list.i +%include "ustring.i" %ignore otk::OBDisplay::display; %inline %{ diff --git a/otk/property.cc b/otk/property.cc index 232803cd..ab99cd89 100644 --- a/otk/property.cc +++ b/otk/property.cc @@ -382,7 +382,7 @@ bool Property::get(Window win, Atoms atom, StringType type, bool Property::get(Window win, Atoms atom, StringType type, - unsigned long *nelements, StringVect *strings) const + unsigned long *nelements, StringVect *strings) const { assert(atom >= 0 && atom < NUM_ATOMS); assert(type >= 0 && type < NUM_STRING_TYPE); diff --git a/otk/ustring.cc b/otk/ustring.cc index 8f3cdfc4..c15effb0 100644 --- a/otk/ustring.cc +++ b/otk/ustring.cc @@ -142,6 +142,11 @@ ustring::size_type ustring::max_size() const return _string.max_size(); } +bool ustring::empty() const +{ + return _string.empty(); +} + void ustring::clear() { _string.erase(); diff --git a/otk/ustring.hh b/otk/ustring.hh index ef94440c..647bee86 100644 --- a/otk/ustring.hh +++ b/otk/ustring.hh @@ -152,7 +152,7 @@ public: ustring(const ustring& other); ustring& operator=(const ustring& other); ustring(const std::string& src); - ustring::ustring(const char* src); + ustring(const char* src); // append to the string @@ -166,6 +166,7 @@ public: ustring::size_type bytes() const; ustring::size_type capacity() const; ustring::size_type max_size() const; + bool empty() const; // erase substrings |
