summaryrefslogtreecommitdiff
path: root/glib/src/regex.hg
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2007-06-22 14:43:53 +0000
committerMurray Cumming <murrayc@src.gnome.org>2007-06-22 14:43:53 +0000
commitc72439e0d5963fd6200283a906b32300f2ab65b6 (patch)
tree3e3282e4d1b8ddc6384ff43e1b8f124584090a01 /glib/src/regex.hg
parentfdba92ddd4221df38d48677063af8d1de5939e5a (diff)
downloadglibmm-c72439e0d5963fd6200283a906b32300f2ab65b6.tar.gz
Added a create() method, and added some more default parameter values to
2007-06-22 Murray Cumming <murrayc@murrayc.com> * glib/src/regex.ccg: * glib/src/regex.hg: Added a create() method, and added some more default parameter values to the methods. * configure.in: * examples/Makefile.am: * examples/regex/main.cc: Added a very simple example. * glib/glibmm/value_custom.h: Put header guards around this, though this should never be included directly anyway. svn path=/trunk/; revision=419
Diffstat (limited to 'glib/src/regex.hg')
-rw-r--r--glib/src/regex.hg11
1 files changed, 9 insertions, 2 deletions
diff --git a/glib/src/regex.hg b/glib/src/regex.hg
index eafe8cb8..9a87957d 100644
--- a/glib/src/regex.hg
+++ b/glib/src/regex.hg
@@ -50,6 +50,13 @@ class Regex
_IGNORE(g_regex_ref, g_regex_unref)
public:
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ static Glib::RefPtr<Glib::Regex> create(const Glib::ustring& pattern, RegexCompileFlags compile_options = (RegexCompileFlags)0, RegexMatchFlags match_options = (RegexMatchFlags)0);
+#else
+ static Glib::RefPtr<Glib::Regex> create(const Glib::ustring& pattern, RegexCompileFlags compile_options = (RegexCompileFlags)0, RegexMatchFlags match_options = (RegexMatchFlags)0, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+
_WRAP_METHOD(Glib::ustring get_pattern() const, g_regex_get_pattern)
_WRAP_METHOD(int get_max_backref() const, g_regex_get_max_backref)
_WRAP_METHOD(int get_capture_count() const, g_regex_get_capture_count)
@@ -58,7 +65,7 @@ public:
//TODO: _WRAP_METHOD(static Glib::ustring escape_string(const Glib::ustring& string, gint length) const, g_regex_escape_string)
/* Matching. */
- _WRAP_METHOD(static bool match_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options, RegexMatchFlags match_options = (RegexMatchFlags)0), g_regex_match_simple)
+ _WRAP_METHOD(static bool match_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options = (RegexCompileFlags)0, RegexMatchFlags match_options = (RegexMatchFlags)0), g_regex_match_simple)
//TODO: _WRAP_METHOD(bool match(const Glib::ustring& string, RegexMatchFlags match_options = (RegexMatchFlags)0, GMatchInfo **match_info = 0), g_regex_match)
bool match(const Glib::ustring& string, RegexMatchFlags match_options = (RegexMatchFlags)0);
@@ -98,7 +105,7 @@ public:
#m4 _CONVERSION(`gchar**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
- _WRAP_METHOD(static Glib::StringArrayHandle split_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options, RegexMatchFlags match_options = (RegexMatchFlags)0), g_regex_split_simple)
+ _WRAP_METHOD(static Glib::StringArrayHandle split_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options = (RegexCompileFlags)0, RegexMatchFlags match_options = (RegexMatchFlags)0), g_regex_split_simple)
_WRAP_METHOD(Glib::StringArrayHandle split(const Glib::ustring& string, RegexMatchFlags match_options = (RegexMatchFlags)0), g_regex_split)
_WRAP_METHOD(Glib::StringArrayHandle split_full(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options = (RegexMatchFlags)0, int max_tokens = 0) const, g_regex_split_full, errthrow)