Update of /cvsroot/boost/boost/boost/xpressive/detail/core
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23603/boost/xpressive/detail/core
Modified Files:
access.hpp regex_impl.hpp state.hpp
Log Message:
named captures for dynamic regexes, doxygen comments
Index: access.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/core/access.hpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- access.hpp 17 Apr 2007 05:02:33 -0000 1.9
+++ access.hpp 7 May 2007 04:41:25 -0000 1.10
@@ -13,6 +13,7 @@
# pragma once
#endif
+#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/xpressive/detail/detail_fwd.hpp>
#include <boost/xpressive/detail/dynamic/matchable.hpp>
@@ -77,9 +78,10 @@
, intrusive_ptr<traits<char_type> const> const &traits
, sub_match_impl<BidiIter> *sub_matches
, std::size_t size
+ , std::vector<named_mark<char_type> > const &named_marks
)
{
- what.init_(regex_id, traits, sub_matches, size);
+ what.init_(regex_id, traits, sub_matches, size, named_marks);
}
static sub_match_vector<BidiIter>
&get_sub_match_vector(match_results<BidiIter> &what)
Index: regex_impl.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/core/regex_impl.hpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- regex_impl.hpp 17 Apr 2007 05:02:33 -0000 1.10
+++ regex_impl.hpp 7 May 2007 04:41:25 -0000 1.11
@@ -13,6 +13,7 @@
# pragma once
#endif
+#include <vector>
#include <boost/intrusive_ptr.hpp>
#include <boost/xpressive/regex_traits.hpp>
#include <boost/xpressive/detail/detail_fwd.hpp>
@@ -47,6 +48,20 @@
};
///////////////////////////////////////////////////////////////////////////////
+// named_mark
+template<typename Char>
+struct named_mark
+{
+ named_mark(std::basic_string<Char> name, std::size_t mark_nbr)
+ : name_(name)
+ , mark_nbr_(mark_nbr)
+ {}
+
+ std::basic_string<Char> name_;
+ std::size_t mark_nbr_;
+};
+
+///////////////////////////////////////////////////////////////////////////////
// traits_holder
template<typename Traits>
struct traits_holder
@@ -122,6 +137,7 @@
, xpr_()
, traits_()
, finder_()
+ , named_marks_()
, mark_count_(0)
, hidden_mark_count_(0)
{
@@ -135,6 +151,7 @@
, xpr_(that.xpr_)
, traits_(that.traits_)
, finder_(that.finder_)
+ , named_marks_(that.named_marks_)
, mark_count_(that.mark_count_)
, hidden_mark_count_(that.hidden_mark_count_)
{
@@ -156,6 +173,7 @@
this->xpr_.swap(that.xpr_);
this->traits_.swap(that.traits_);
this->finder_.swap(that.finder_);
+ this->named_marks_.swap(that.named_marks_);
std::swap(this->mark_count_, that.mark_count_);
std::swap(this->hidden_mark_count_, that.hidden_mark_count_);
}
@@ -163,6 +181,7 @@
intrusive_ptr<matchable_ex<BidiIter> const> xpr_;
intrusive_ptr<traits<char_type> const> traits_;
intrusive_ptr<finder<BidiIter> > finder_;
+ std::vector<named_mark<char_type> > named_marks_;
std::size_t mark_count_;
std::size_t hidden_mark_count_;
Index: state.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/core/state.hpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- state.hpp 28 Apr 2007 01:42:16 -0000 1.14
+++ state.hpp 7 May 2007 04:41:25 -0000 1.15
@@ -273,7 +273,7 @@
this->sub_matches_ += impl.hidden_mark_count_;
// initialize the match_results struct
- access::init_match_results(what, id, impl.traits_, this->sub_matches_,
this->mark_count_);
+ access::init_match_results(what, id, impl.traits_, this->sub_matches_,
this->mark_count_, impl.named_marks_);
}
void uninit_(regex_impl const &impl, match_results &)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs