summaryrefslogtreecommitdiff
path: root/otk
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-13 05:54:40 +0000
committerDana Jansens <danakj@orodu.net>2003-01-13 05:54:40 +0000
commitef02a0c8ae65f169157c90064a335303e964a4c1 (patch)
treef1a1bf6cfe05ee11545bfa811f5a2582e1906dce /otk
parent5a90d2b671f01f29043ab82f909440de0abfa362 (diff)
almost done the ustring conversion
Diffstat (limited to 'otk')
-rw-r--r--otk/otk.hh1
-rw-r--r--otk/otk.i1
-rw-r--r--otk/property.cc2
-rw-r--r--otk/ustring.cc5
-rw-r--r--otk/ustring.hh3
5 files changed, 10 insertions, 2 deletions
diff --git a/otk/otk.hh b/otk/otk.hh
index b6e24a75..b06afcbf 100644
--- a/otk/otk.hh
+++ b/otk/otk.hh
@@ -29,6 +29,7 @@
#include "timerqueue.hh"
#include "timerqueuemanager.hh"
#include "util.hh"
+#include "ustring.hh"
#include "widget.hh"
#endif // __otk_hh
diff --git a/otk/otk.i b/otk/otk.i
index 148ff0c2..d0e4331d 100644
--- a/otk/otk.i
+++ b/otk/otk.i
@@ -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