mirror of
https://github.com/boostorg/compose.git
synced 2026-01-19 04:02:16 +00:00
Create a development branch for the hash library.
[SVN r38869]
This commit is contained in:
459
compose.hpp.html
459
compose.hpp.html
@@ -1,459 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>compose.hpp</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF">
|
||||
|
||||
<TABLE HEIGHT=40 WIDTH="100%">
|
||||
<TR> <TD ALIGN=LEFT WIDTH="100%" BGCOLOR="#DDDDDD">
|
||||
<FONT face="Arial,Helvetica" size=+2><B>
|
||||
compose.hpp
|
||||
</B></FONT>
|
||||
</TD></TR></TABLE><BR>
|
||||
|
||||
<FONT face="Arial,Helvetica"><B>
|
||||
The following code example is taken from the book<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/" TARGET="_top">
|
||||
The C++ Standard Library - A Tutorial and Reference</A><BR>
|
||||
by Nicolai M. Josuttis, Addison-Wesley, 1999<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/copyright.html">
|
||||
© Copyright</A> Nicolai M. Josuttis 1999<BR>
|
||||
</B></FONT>
|
||||
|
||||
<BR><BR><TT>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* supplementing compose function objects</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* Son Dez 26 22:11:12 MET 1999</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
#ifndef BOOST_COMPOSE_HPP<BR>
|
||||
#define BOOST_COMPOSE_HPP<BR>
|
||||
<BR>
|
||||
#include <functional><BR>
|
||||
<BR>
|
||||
namespace boost {<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>**********************************************************</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* type nullary_function</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* - as supplement to unary_function and binary_function</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>**********************************************************/</I></FONT><BR>
|
||||
template <class Result><BR>
|
||||
struct nullary_function {<BR>
|
||||
typedef Result result_type;<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>**********************************************************</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* ptr_fun for functions with no argument</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>**********************************************************/</I></FONT><BR>
|
||||
template <class Result><BR>
|
||||
class pointer_to_nullary_function : public nullary_function<Result><BR>
|
||||
{<BR>
|
||||
protected:<BR>
|
||||
Result (*ptr)();<BR>
|
||||
public:<BR>
|
||||
pointer_to_nullary_function() {<BR>
|
||||
}<BR>
|
||||
explicit pointer_to_nullary_function(Result (*x)()) : ptr(x) {<BR>
|
||||
}<BR>
|
||||
Result operator()() const { <BR>
|
||||
return ptr();<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
template <class Result><BR>
|
||||
inline pointer_to_nullary_function<Result> ptr_fun(Result (*x)())<BR>
|
||||
{<BR>
|
||||
return pointer_to_nullary_function<Result>(x);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*********** compose_f_gx_t and compose_f_gx **********************/</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* class for the compose_f_gx adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
class compose_f_gx_t<BR>
|
||||
: public std::unary_function<typename OP2::argument_type,<BR>
|
||||
typename OP1::result_type><BR>
|
||||
{<BR>
|
||||
private:<BR>
|
||||
OP1 op1; <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// process: op1(op2(x))</I></FONT><BR>
|
||||
OP2 op2;<BR>
|
||||
public:<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// constructor</I></FONT><BR>
|
||||
compose_f_gx_t(const OP1& o1, const OP2& o2)<BR>
|
||||
: op1(o1), op2(o2) {<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// function call</I></FONT><BR>
|
||||
typename OP1::result_type<BR>
|
||||
operator()(const typename OP2::argument_type& x) const {<BR>
|
||||
return op1(op2(x));<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* convenience functions for the compose_f_gx adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
inline compose_f_gx_t<OP1,OP2><BR>
|
||||
compose_f_gx (const OP1& o1, const OP2& o2) {<BR>
|
||||
return compose_f_gx_t<OP1,OP2>(o1,o2);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*********** compose_f_gx_hx_t and compose_f_gx_hx **********************/</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* class for the compose_f_gx_hx adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2, class OP3><BR>
|
||||
class compose_f_gx_hx_t<BR>
|
||||
: public std::unary_function<typename OP2::argument_type,<BR>
|
||||
typename OP1::result_type><BR>
|
||||
{<BR>
|
||||
private:<BR>
|
||||
OP1 op1; <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// process: op1(op2(x),op3(x))</I></FONT><BR>
|
||||
OP2 op2;<BR>
|
||||
OP3 op3;<BR>
|
||||
public:<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// constructor</I></FONT><BR>
|
||||
compose_f_gx_hx_t (const OP1& o1, const OP2& o2, const OP3& o3)<BR>
|
||||
: op1(o1), op2(o2), op3(o3) {<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// function call</I></FONT><BR>
|
||||
typename OP1::result_type<BR>
|
||||
operator()(const typename OP2::argument_type& x) const {<BR>
|
||||
return op1(op2(x),op3(x));<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* convenience functions for the compose_f_gx_hx adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2, class OP3><BR>
|
||||
inline compose_f_gx_hx_t<OP1,OP2,OP3><BR>
|
||||
compose_f_gx_hx (const OP1& o1, const OP2& o2, const OP3& o3) {<BR>
|
||||
return compose_f_gx_hx_t<OP1,OP2,OP3>(o1,o2,o3);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*********** compose_f_gxy_t and compose_f_gxy **********************/</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* class for the compose_f_gxy adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
class compose_f_gxy_t<BR>
|
||||
: public std::binary_function<typename OP2::first_argument_type,<BR>
|
||||
typename OP2::second_argument_type,<BR>
|
||||
typename OP1::result_type><BR>
|
||||
{<BR>
|
||||
private:<BR>
|
||||
OP1 op1; <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// process: op1(op2(x,y))</I></FONT><BR>
|
||||
OP2 op2;<BR>
|
||||
public:<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// constructor</I></FONT><BR>
|
||||
compose_f_gxy_t (const OP1& o1, const OP2& o2)<BR>
|
||||
: op1(o1), op2(o2) {<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// function call</I></FONT><BR>
|
||||
typename OP1::result_type<BR>
|
||||
operator()(const typename OP2::first_argument_type& x,<BR>
|
||||
const typename OP2::second_argument_type& y) const {<BR>
|
||||
return op1(op2(x,y));<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* convenience function for the compose_f_gxy adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
inline compose_f_gxy_t<OP1,OP2><BR>
|
||||
compose_f_gxy (const OP1& o1, const OP2& o2) {<BR>
|
||||
return compose_f_gxy_t<OP1,OP2>(o1,o2);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*********** compose_f_gx_hy_t and compose_f_gx_hy **********************/</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* class for the compose_f_gx_hy adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2, class OP3><BR>
|
||||
class compose_f_gx_hy_t<BR>
|
||||
: public std::binary_function<typename OP2::argument_type,<BR>
|
||||
typename OP3::argument_type,<BR>
|
||||
typename OP1::result_type><BR>
|
||||
{<BR>
|
||||
private:<BR>
|
||||
OP1 op1; <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// process: op1(op2(x),op3(y))</I></FONT><BR>
|
||||
OP2 op2;<BR>
|
||||
OP3 op3;<BR>
|
||||
public:<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// constructor</I></FONT><BR>
|
||||
compose_f_gx_hy_t (const OP1& o1, const OP2& o2, const OP3& o3)<BR>
|
||||
: op1(o1), op2(o2), op3(o3) {<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// function call</I></FONT><BR>
|
||||
typename OP1::result_type<BR>
|
||||
operator()(const typename OP2::argument_type& x,<BR>
|
||||
const typename OP3::argument_type& y) const {<BR>
|
||||
return op1(op2(x),op3(y));<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* convenience function for the compose_f_gx_hy adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2, class OP3><BR>
|
||||
inline compose_f_gx_hy_t<OP1,OP2,OP3><BR>
|
||||
compose_f_gx_hy (const OP1& o1, const OP2& o2, const OP3& o3) {<BR>
|
||||
return compose_f_gx_hy_t<OP1,OP2,OP3>(o1,o2,o3);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*********** compose_f_g_t and compose_f_g **********************/</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* class for the compose_f_g adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
class compose_f_g_t<BR>
|
||||
: public boost::nullary_function<typename OP1::result_type><BR>
|
||||
{<BR>
|
||||
private:<BR>
|
||||
OP1 op1; <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// process: op1(op2())</I></FONT><BR>
|
||||
OP2 op2;<BR>
|
||||
public:<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// constructor</I></FONT><BR>
|
||||
compose_f_g_t(const OP1& o1, const OP2& o2)<BR>
|
||||
: op1(o1), op2(o2) {<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// function call</I></FONT><BR>
|
||||
typename OP1::result_type<BR>
|
||||
operator()() const {<BR>
|
||||
return op1(op2());<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* convenience functions for the compose_f_g adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
inline compose_f_g_t<OP1,OP2><BR>
|
||||
compose_f_g (const OP1& o1, const OP2& o2) {<BR>
|
||||
return compose_f_g_t<OP1,OP2>(o1,o2);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
} <I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* namespace boost */</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
#endif <I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*BOOST_COMPOSE_HPP*/</I></FONT></I></FONT><BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* supplementing compose function objects</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* Son Dez 26 22:14:55 MET 1999</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
#ifndef BOOST_COMPOSE_HPP<BR>
|
||||
#define BOOST_COMPOSE_HPP<BR>
|
||||
<BR>
|
||||
#include <functional><BR>
|
||||
<BR>
|
||||
namespace boost {<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>**********************************************************</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* type nullary_function</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* - as supplement to unary_function and binary_function</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>**********************************************************/</I></FONT><BR>
|
||||
template <class Result><BR>
|
||||
struct nullary_function {<BR>
|
||||
typedef Result result_type;<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>**********************************************************</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* ptr_fun for functions with no argument</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>**********************************************************/</I></FONT><BR>
|
||||
template <class Result><BR>
|
||||
class pointer_to_nullary_function : public nullary_function<Result><BR>
|
||||
{<BR>
|
||||
protected:<BR>
|
||||
Result (*ptr)();<BR>
|
||||
public:<BR>
|
||||
pointer_to_nullary_function() {<BR>
|
||||
}<BR>
|
||||
explicit pointer_to_nullary_function(Result (*x)()) : ptr(x) {<BR>
|
||||
}<BR>
|
||||
Result operator()() const { <BR>
|
||||
return ptr();<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
template <class Result><BR>
|
||||
inline pointer_to_nullary_function<Result> ptr_fun(Result (*x)())<BR>
|
||||
{<BR>
|
||||
return pointer_to_nullary_function<Result>(x);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*********** compose_f_gx_t and compose_f_gx **********************/</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* class for the compose_f_gx adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
class compose_f_gx_t<BR>
|
||||
: public std::unary_function<typename OP2::argument_type,<BR>
|
||||
typename OP1::result_type><BR>
|
||||
{<BR>
|
||||
private:<BR>
|
||||
OP1 op1; <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// process: op1(op2(x))</I></FONT><BR>
|
||||
OP2 op2;<BR>
|
||||
public:<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// constructor</I></FONT><BR>
|
||||
compose_f_gx_t(const OP1& o1, const OP2& o2)<BR>
|
||||
: op1(o1), op2(o2) {<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// function call</I></FONT><BR>
|
||||
typename OP1::result_type<BR>
|
||||
operator()(const typename OP2::argument_type& x) const {<BR>
|
||||
return op1(op2(x));<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* convenience functions for the compose_f_gx adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
inline compose_f_gx_t<OP1,OP2><BR>
|
||||
compose_f_gx (const OP1& o1, const OP2& o2) {<BR>
|
||||
return compose_f_gx_t<OP1,OP2>(o1,o2);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*********** compose_f_gx_hx_t and compose_f_gx_hx **********************/</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* class for the compose_f_gx_hx adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2, class OP3><BR>
|
||||
class compose_f_gx_hx_t<BR>
|
||||
: public std::unary_function<typename OP2::argument_type,<BR>
|
||||
typename OP1::result_type><BR>
|
||||
{<BR>
|
||||
private:<BR>
|
||||
OP1 op1; <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// process: op1(op2(x),op3(x))</I></FONT><BR>
|
||||
OP2 op2;<BR>
|
||||
OP3 op3;<BR>
|
||||
public:<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// constructor</I></FONT><BR>
|
||||
compose_f_gx_hx_t (const OP1& o1, const OP2& o2, const OP3& o3)<BR>
|
||||
: op1(o1), op2(o2), op3(o3) {<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// function call</I></FONT><BR>
|
||||
typename OP1::result_type<BR>
|
||||
operator()(const typename OP2::argument_type& x) const {<BR>
|
||||
return op1(op2(x),op3(x));<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* convenience functions for the compose_f_gx_hx adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2, class OP3><BR>
|
||||
inline compose_f_gx_hx_t<OP1,OP2,OP3><BR>
|
||||
compose_f_gx_hx (const OP1& o1, const OP2& o2, const OP3& o3) {<BR>
|
||||
return compose_f_gx_hx_t<OP1,OP2,OP3>(o1,o2,o3);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*********** compose_f_gxy_t and compose_f_gxy **********************/</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* class for the compose_f_gxy adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
class compose_f_gxy_t<BR>
|
||||
: public std::binary_function<typename OP2::first_argument_type,<BR>
|
||||
typename OP2::second_argument_type,<BR>
|
||||
typename OP1::result_type><BR>
|
||||
{<BR>
|
||||
private:<BR>
|
||||
OP1 op1; <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// process: op1(op2(x,y))</I></FONT><BR>
|
||||
OP2 op2;<BR>
|
||||
public:<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// constructor</I></FONT><BR>
|
||||
compose_f_gxy_t (const OP1& o1, const OP2& o2)<BR>
|
||||
: op1(o1), op2(o2) {<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// function call</I></FONT><BR>
|
||||
typename OP1::result_type<BR>
|
||||
operator()(const typename OP2::first_argument_type& x,<BR>
|
||||
const typename OP2::second_argument_type& y) const {<BR>
|
||||
return op1(op2(x,y));<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* convenience function for the compose_f_gxy adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
inline compose_f_gxy_t<OP1,OP2><BR>
|
||||
compose_f_gxy (const OP1& o1, const OP2& o2) {<BR>
|
||||
return compose_f_gxy_t<OP1,OP2>(o1,o2);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*********** compose_f_gx_hy_t and compose_f_gx_hy **********************/</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* class for the compose_f_gx_hy adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2, class OP3><BR>
|
||||
class compose_f_gx_hy_t<BR>
|
||||
: public std::binary_function<typename OP2::argument_type,<BR>
|
||||
typename OP3::argument_type,<BR>
|
||||
typename OP1::result_type><BR>
|
||||
{<BR>
|
||||
private:<BR>
|
||||
OP1 op1; <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// process: op1(op2(x),op3(y))</I></FONT><BR>
|
||||
OP2 op2;<BR>
|
||||
OP3 op3;<BR>
|
||||
public:<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// constructor</I></FONT><BR>
|
||||
compose_f_gx_hy_t (const OP1& o1, const OP2& o2, const OP3& o3)<BR>
|
||||
: op1(o1), op2(o2), op3(o3) {<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// function call</I></FONT><BR>
|
||||
typename OP1::result_type<BR>
|
||||
operator()(const typename OP2::argument_type& x,<BR>
|
||||
const typename OP3::argument_type& y) const {<BR>
|
||||
return op1(op2(x),op3(y));<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* convenience function for the compose_f_gx_hy adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2, class OP3><BR>
|
||||
inline compose_f_gx_hy_t<OP1,OP2,OP3><BR>
|
||||
compose_f_gx_hy (const OP1& o1, const OP2& o2, const OP3& o3) {<BR>
|
||||
return compose_f_gx_hy_t<OP1,OP2,OP3>(o1,o2,o3);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*********** compose_f_g_t and compose_f_g **********************/</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* class for the compose_f_g adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
class compose_f_g_t<BR>
|
||||
: public boost::nullary_function<typename OP1::result_type><BR>
|
||||
{<BR>
|
||||
private:<BR>
|
||||
OP1 op1; <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// process: op1(op2())</I></FONT><BR>
|
||||
OP2 op2;<BR>
|
||||
public:<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// constructor</I></FONT><BR>
|
||||
compose_f_g_t(const OP1& o1, const OP2& o2)<BR>
|
||||
: op1(o1), op2(o2) {<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// function call</I></FONT><BR>
|
||||
typename OP1::result_type<BR>
|
||||
operator()() const {<BR>
|
||||
return op1(op2());<BR>
|
||||
}<BR>
|
||||
};<BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* convenience functions for the compose_f_g adapter</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class OP1, class OP2><BR>
|
||||
inline compose_f_g_t<OP1,OP2><BR>
|
||||
compose_f_g (const OP1& o1, const OP2& o2) {<BR>
|
||||
return compose_f_g_t<OP1,OP2>(o1,o2);<BR>
|
||||
}<BR>
|
||||
<BR>
|
||||
} <I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* namespace boost */</I></FONT></I></FONT><BR>
|
||||
<BR>
|
||||
#endif <I><FONT face="Arial,Helvetica" color="0000FF" size=-1><Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*BOOST_COMPOSE_HPP*/</I></FONT></I></FONT><BR>
|
||||
</TT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
148
compose.html
148
compose.html
@@ -1,148 +0,0 @@
|
||||
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="keywords" content="Josuttis, C++, countedptr, counted reference, smart pointer, Code, examples, Beispiele, objektorientiert, Informatik, Nicolai Josuttis, Nicolai M. Josuttis">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
|
||||
<meta name="Keywords" content="compose1, compose2, compose_f_gx, compose_f_gxy, compose_f_gx_hx, compose_f_gx_hy, function object, adapter, adaptor, STL, C++ Standard Library">
|
||||
<title>DEPRECATED: Compose Function Object Adapters</title>
|
||||
</head>
|
||||
<body text="#000000" bgcolor="#FFFFFF">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td WIDTH="680" BGCOLOR="#DDDDDD"><b><font face="Arial,helvetica" color="#000000" size="+1">DEPRECATED: Compose
|
||||
Function Object Adapters</font></b></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p><font face="Arial,Helvetica"><font color="#FF0000"><b>This library is deprecated in favor of the Bind or Lambda libraries, and will be removed in a future release of Boost</b></font>. The C++ Standard Template Library STL as
|
||||
part of the C++ Standard Library provides several function objects. Unfortunately,
|
||||
it doesn't provide the ability to compose these function objects. For example,
|
||||
it is not possible to combine the result of two unary operations to formulate
|
||||
a criterion such as ``<i>this <b>and</b> that'</i>'. But this would be
|
||||
important for building software components out of other components, which
|
||||
leads to the concept of functional composition. So, here are some adapters
|
||||
that close this gap.</font>
|
||||
<p><font face="Arial,Helvetica">In fact, these adapters provide to compose
|
||||
function objects as follows:</font>
|
||||
<br>
|
||||
<table NOSAVE >
|
||||
<tr NOSAVE>
|
||||
<td NOSAVE><b><font face="Arial,Helvetica">Functionality</font></b></td>
|
||||
|
||||
<td><b><font face="Arial,Helvetica">Boost Name</font></b></td>
|
||||
|
||||
<td><b><font face="Arial,Helvetica">SGI STL's Name</font></b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><font face="Times New Roman,Times">f(g(<i>value</i>))</font></td>
|
||||
|
||||
<td><font face="Times New Roman,Times">compose_f_gx</font></td>
|
||||
|
||||
<td><font face="Times New Roman,Times">compose1</font></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><font face="Times New Roman,Times">f(g(<i>value</i>),h(<i>value</i>))</font></td>
|
||||
|
||||
<td><font face="Times New Roman,Times">compose_f_gx_hx</font></td>
|
||||
|
||||
<td><font face="Times New Roman,Times">compose2</font></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><font face="Times New Roman,Times">f(g(<i>value1</i>),h(<i>value2</i>))</font></td>
|
||||
|
||||
<td><font face="Times New Roman,Times">compose_f_gx_hy</font></td>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><font face="Times New Roman,Times">f(g(<i>value1</i>,<i>value2</i>))</font></td>
|
||||
|
||||
<td><font face="Times New Roman,Times">compose_f_gxy</font></td>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><font face="Times New Roman,Times">f(g())</font></td>
|
||||
|
||||
<td><font face="Times New Roman,Times">compose_f_g</font></td>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p><font face="Arial,Helvetica">As you can see, two of these adapters are
|
||||
part of the SGI STL already.
|
||||
However, we changed the names according to
|
||||
a consistent naming scheme for all adapters.</font>
|
||||
<p><font face="Arial,Helvetica">In addition, this code also defines a type </font><tt>nullary_function</tt><font face="Arial,Helvetica">
|
||||
for function objects that have no argument (as supplement to </font><tt>unary_function</tt><font face="Arial,Helvetica">
|
||||
and </font><tt>binary_function</tt><font face="Arial,Helvetica">) and overloads
|
||||
</font><tt>ptr_fun</tt><font face="Arial,Helvetica"> for functions that take
|
||||
no arguments.</font>
|
||||
<p><font face="Arial,Helvetica">The code is provided "as is" without expressed
|
||||
or implied warranty.</font>
|
||||
<p><b><font face="Arial,Helvetica">compose.hpp:</font></b>
|
||||
<li>
|
||||
<font face="Arial,Helvetica"><a href="compose.hpp.html">as HTML file</a></font></li>
|
||||
|
||||
<li> <font face="Arial,Helvetica"><a href="../../boost/compose.hpp">as plain file</a></font><br>
|
||||
<br>
|
||||
<font face="Arial,Helvetica">Example for using </font><b>compose_f_gx</b> </li>
|
||||
<li>
|
||||
<tt><a href="compose1.cpp.html">as HTML file</a></tt></li>
|
||||
|
||||
<li>
|
||||
<tt><a href="compose1.cpp">as plain file</a></tt></li>
|
||||
|
||||
<br>
|
||||
<font face="Arial,Helvetica">Example for using </font><b>compose_f_gx_hx</b>
|
||||
<li>
|
||||
<tt><a href="compose2.cpp.html">as HTML file</a></tt></li>
|
||||
|
||||
<li>
|
||||
<tt><a href="compose2.cpp">as plain file</a></tt></li>
|
||||
|
||||
<br><font face="Arial,Helvetica">Example for using
|
||||
</font><b>compose_f_gx_hy</b>
|
||||
<li>
|
||||
<tt><a href="compose3.cpp.html">as HTML file</a></tt></li>
|
||||
|
||||
<li>
|
||||
<tt><a href="compose3.cpp">as plain file</a></tt></li>
|
||||
|
||||
<br><font face="Arial,Helvetica">Example for using
|
||||
</font><b>compose_f_g</b>
|
||||
and <b><tt>ptr_fun</tt></b> for functions without arguments
|
||||
<li>
|
||||
<a href="compose4.cpp.html">as HTML file</a></li>
|
||||
|
||||
<li> <a href="compose4.cpp">as plain file<br>
|
||||
<br>
|
||||
</a>
|
||||
<font face="Arial,Helvetica">To find more details about function objects in
|
||||
general and about these compose functions, see</font> <br>
|
||||
<i><font face="Arial,Helvetica"> <a href="http://www.josuttis.com/libbook/">The
|
||||
C++ Standard Library - A Tutorial and Reference</a></font></i> <br>
|
||||
<font face="Arial,Helvetica"> by Nicolai M. Josuttis</font>
|
||||
<br>
|
||||
<font face="Arial,Helvetica"> Addison Wesley Longman,
|
||||
1999</font> <br>
|
||||
<font face="Arial,Helvetica"> ISBN 0-201-37926-0</font>
|
||||
<br>
|
||||
<font face="Arial,Helvetica">and the <a href="http://www.sgi.com/Technology/STL/">SGI
|
||||
STL documentation</a></font> </li>
|
||||
|
||||
<p><font face="Arial,Helvetica"><a href="http://www.josuttis.com/" TARGET="_top">Home
|
||||
Page</a></font>
|
||||
<br>
|
||||
</li>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
38
compose1.cpp
38
compose1.cpp
@@ -1,38 +0,0 @@
|
||||
/* The following code example is taken from the book
|
||||
* "The C++ Standard Library - A Tutorial and Reference"
|
||||
* by Nicolai M. Josuttis, Addison-Wesley, 1999
|
||||
*
|
||||
* (C) Copyright Nicolai M. Josuttis 1999.
|
||||
* Permission to copy, use, modify, sell and distribute this software
|
||||
* is granted provided this copyright notice appears in all copies.
|
||||
* This software is provided "as is" without express or implied
|
||||
* warranty, and with no claim as to its suitability for any purpose.
|
||||
*/
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include "print.hpp"
|
||||
#include <boost/compose.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
int main()
|
||||
{
|
||||
vector<int> coll;
|
||||
|
||||
// insert elements from 1 to 9
|
||||
for (int i=1; i<=9; ++i) {
|
||||
coll.push_back(i);
|
||||
}
|
||||
PRINT_ELEMENTS(coll);
|
||||
|
||||
// for each element add 10 and multiply by 5
|
||||
transform (coll.begin(),coll.end(),
|
||||
ostream_iterator<int>(cout," "),
|
||||
compose_f_gx(bind2nd(multiplies<int>(),5),
|
||||
bind2nd(plus<int>(),10)));
|
||||
cout << endl;
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>compose1.cpp</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF">
|
||||
|
||||
<TABLE HEIGHT=40 WIDTH="100%">
|
||||
<TR> <TD ALIGN=LEFT WIDTH="100%" BGCOLOR="#DDDDDD">
|
||||
<FONT face="Arial,Helvetica" size=+2><B>
|
||||
compose1.cpp
|
||||
</B></FONT>
|
||||
</TD></TR></TABLE><BR>
|
||||
|
||||
<FONT face="Arial,Helvetica"><B>
|
||||
The following code example is taken from the book<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/" TARGET="_top">
|
||||
The C++ Standard Library - A Tutorial and Reference</A><BR>
|
||||
by Nicolai M. Josuttis, Addison-Wesley, 1999<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/copyright.html">
|
||||
© Copyright</A> Nicolai M. Josuttis 1999<BR>
|
||||
</B></FONT>
|
||||
|
||||
<BR><BR><TT>
|
||||
#include <iostream><BR>
|
||||
#include <vector><BR>
|
||||
#include <algorithm><BR>
|
||||
#include <functional><BR>
|
||||
#include <iterator><BR>
|
||||
#include "<A href="print.hpp.html">print.hpp</A>"<BR>
|
||||
#include "<A href="compose.hpp.html">compose.hpp</A>"<BR>
|
||||
using namespace std;<BR>
|
||||
using namespace boost;<BR>
|
||||
<BR>
|
||||
int main()<BR>
|
||||
{<BR>
|
||||
vector<int> coll;<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// insert elements from 1 to 9</I></FONT><BR>
|
||||
for (int i=1; i<=9; ++i) {<BR>
|
||||
coll.push_back(i);<BR>
|
||||
}<BR>
|
||||
PRINT_ELEMENTS(coll);<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// for each element add 10 and multiply by 5</I></FONT><BR>
|
||||
transform (coll.begin(),coll.end(),<BR>
|
||||
ostream_iterator<int>(cout," "),<BR>
|
||||
compose_f_gx(bind2nd(multiplies<int>(),5),<BR>
|
||||
bind2nd(plus<int>(),10)));<BR>
|
||||
cout << endl;<BR>
|
||||
}<BR>
|
||||
</TT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
42
compose2.cpp
42
compose2.cpp
@@ -1,42 +0,0 @@
|
||||
/* The following code example is taken from the book
|
||||
* "The C++ Standard Library - A Tutorial and Reference"
|
||||
* by Nicolai M. Josuttis, Addison-Wesley, 1999
|
||||
*
|
||||
* (C) Copyright Nicolai M. Josuttis 1999.
|
||||
* Permission to copy, use, modify, sell and distribute this software
|
||||
* is granted provided this copyright notice appears in all copies.
|
||||
* This software is provided "as is" without express or implied
|
||||
* warranty, and with no claim as to its suitability for any purpose.
|
||||
*/
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include "print.hpp"
|
||||
#include <boost/compose.hpp>
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
int main()
|
||||
{
|
||||
vector<int> coll;
|
||||
|
||||
// insert elements from 1 to 9
|
||||
for (int i=1; i<=9; ++i) {
|
||||
coll.push_back(i);
|
||||
}
|
||||
PRINT_ELEMENTS(coll);
|
||||
|
||||
// remove all elements that are greater than four and less than seven
|
||||
// - retain new end
|
||||
vector<int>::iterator pos;
|
||||
pos = remove_if (coll.begin(),coll.end(),
|
||||
compose_f_gx_hx(logical_and<bool>(),
|
||||
bind2nd(greater<int>(),4),
|
||||
bind2nd(less<int>(),7)));
|
||||
|
||||
// remove ``removed'' elements in coll
|
||||
coll.erase(pos,coll.end());
|
||||
|
||||
PRINT_ELEMENTS(coll);
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>compose2.cpp</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF">
|
||||
|
||||
<TABLE HEIGHT=40 WIDTH="100%">
|
||||
<TR> <TD ALIGN=LEFT WIDTH="100%" BGCOLOR="#DDDDDD">
|
||||
<FONT face="Arial,Helvetica" size=+2><B>
|
||||
compose2.cpp
|
||||
</B></FONT>
|
||||
</TD></TR></TABLE><BR>
|
||||
|
||||
<FONT face="Arial,Helvetica"><B>
|
||||
The following code example is taken from the book<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/" TARGET="_top">
|
||||
The C++ Standard Library - A Tutorial and Reference</A><BR>
|
||||
by Nicolai M. Josuttis, Addison-Wesley, 1999<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/copyright.html">
|
||||
© Copyright</A> Nicolai M. Josuttis 1999<BR>
|
||||
</B></FONT>
|
||||
|
||||
<BR><BR><TT>
|
||||
#include <iostream><BR>
|
||||
#include <vector><BR>
|
||||
#include <algorithm><BR>
|
||||
#include <functional><BR>
|
||||
#include "<A href="print.hpp.html">print.hpp</A>"<BR>
|
||||
#include "<A href="compose.hpp.html">compose.hpp</A>"<BR>
|
||||
using namespace std;<BR>
|
||||
using namespace boost;<BR>
|
||||
<BR>
|
||||
int main()<BR>
|
||||
{<BR>
|
||||
vector<int> coll;<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// insert elements from 1 to 9</I></FONT><BR>
|
||||
for (int i=1; i<=9; ++i) {<BR>
|
||||
coll.push_back(i);<BR>
|
||||
}<BR>
|
||||
PRINT_ELEMENTS(coll);<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// remove all elements that are greater than four and less than seven</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// - retain new end</I></FONT><BR>
|
||||
vector<int>::iterator pos;<BR>
|
||||
pos = remove_if (coll.begin(),coll.end(),<BR>
|
||||
compose_f_gx_hx(logical_and<bool>(),<BR>
|
||||
bind2nd(greater<int>(),4),<BR>
|
||||
bind2nd(less<int>(),7)));<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// remove ``removed'' elements in coll</I></FONT><BR>
|
||||
coll.erase(pos,coll.end());<BR>
|
||||
<BR>
|
||||
PRINT_ELEMENTS(coll);<BR>
|
||||
}<BR>
|
||||
</TT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
37
compose3.cpp
37
compose3.cpp
@@ -1,37 +0,0 @@
|
||||
/* The following code example is taken from the book
|
||||
* "The C++ Standard Library - A Tutorial and Reference"
|
||||
* by Nicolai M. Josuttis, Addison-Wesley, 1999
|
||||
*
|
||||
* (C) Copyright Nicolai M. Josuttis 1999.
|
||||
* Permission to copy, use, modify, sell and distribute this software
|
||||
* is granted provided this copyright notice appears in all copies.
|
||||
* This software is provided "as is" without express or implied
|
||||
* warranty, and with no claim as to its suitability for any purpose.
|
||||
*/
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <cctype>
|
||||
#include <boost/compose.hpp>
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
int main()
|
||||
{
|
||||
string s("Internationalization");
|
||||
string sub("Nation");
|
||||
|
||||
// search substring case insensitive
|
||||
string::iterator pos;
|
||||
pos = search (s.begin(),s.end(), // string to search in
|
||||
sub.begin(),sub.end(), // substring to search
|
||||
compose_f_gx_hy(equal_to<int>(), // compar. criterion
|
||||
ptr_fun(::toupper),
|
||||
ptr_fun(::toupper)));
|
||||
|
||||
if (pos != s.end()) {
|
||||
cout << "\"" << sub << "\" is part of \"" << s << "\""
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>compose3.cpp</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF">
|
||||
|
||||
<TABLE HEIGHT=40 WIDTH="100%">
|
||||
<TR> <TD ALIGN=LEFT WIDTH="100%" BGCOLOR="#DDDDDD">
|
||||
<FONT face="Arial,Helvetica" size=+2><B>
|
||||
compose3.cpp
|
||||
</B></FONT>
|
||||
</TD></TR></TABLE><BR>
|
||||
|
||||
<FONT face="Arial,Helvetica"><B>
|
||||
The following code example is taken from the book<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/" TARGET="_top">
|
||||
The C++ Standard Library - A Tutorial and Reference</A><BR>
|
||||
by Nicolai M. Josuttis, Addison-Wesley, 1999<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/copyright.html">
|
||||
© Copyright</A> Nicolai M. Josuttis 1999<BR>
|
||||
</B></FONT>
|
||||
|
||||
<BR><BR><TT>
|
||||
#include <iostream><BR>
|
||||
#include <algorithm><BR>
|
||||
#include <functional><BR>
|
||||
#include <string><BR>
|
||||
#include <cctype><BR>
|
||||
#include "<A href="compose.hpp.html">compose.hpp</A>"<BR>
|
||||
using namespace std;<BR>
|
||||
using namespace boost;<BR>
|
||||
<BR>
|
||||
int main()<BR>
|
||||
{<BR>
|
||||
string s("Internationalization");<BR>
|
||||
string sub("Nation");<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// search substring case insensitive</I></FONT><BR>
|
||||
string::iterator pos;<BR>
|
||||
pos = search (s.begin(),s.end(), <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// string to search in</I></FONT><BR>
|
||||
sub.begin(),sub.end(), <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// substring to search</I></FONT><BR>
|
||||
compose_f_gx_hy(equal_to<int>(), <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// compar. criterion</I></FONT><BR>
|
||||
ptr_fun(::toupper),<BR>
|
||||
ptr_fun(::toupper)));<BR>
|
||||
<BR>
|
||||
if (pos != s.end()) {<BR>
|
||||
cout << "\"" << sub << "\" is part of \"" << s << "\""<BR>
|
||||
<< endl;<BR>
|
||||
}<BR>
|
||||
}<BR>
|
||||
</TT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
37
compose4.cpp
37
compose4.cpp
@@ -1,37 +0,0 @@
|
||||
/* The following code example is taken from the book
|
||||
* "The C++ Standard Library - A Tutorial and Reference"
|
||||
* by Nicolai M. Josuttis, Addison-Wesley, 1999
|
||||
*
|
||||
* (C) Copyright Nicolai M. Josuttis 1999.
|
||||
* Permission to copy, use, modify, sell and distribute this software
|
||||
* is granted provided this copyright notice appears in all copies.
|
||||
* This software is provided "as is" without express or implied
|
||||
* warranty, and with no claim as to its suitability for any purpose.
|
||||
*/
|
||||
#include <list>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cstdlib>
|
||||
#include "print.hpp"
|
||||
#include <boost/compose.hpp>
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
list<int> coll;
|
||||
|
||||
// insert five random numbers
|
||||
generate_n (back_inserter(coll), // beginning of destination range
|
||||
5, // count
|
||||
rand); // new value generator
|
||||
PRINT_ELEMENTS(coll);
|
||||
|
||||
// overwrite with five new random numbers
|
||||
// in the range between 0 (including) and 10 (excluding)
|
||||
generate (coll.begin(), coll.end(), // destination range
|
||||
compose_f_g(bind2nd(modulus<int>(),10),
|
||||
ptr_fun(rand)));
|
||||
PRINT_ELEMENTS(coll);
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>compose4.cpp</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF">
|
||||
|
||||
<TABLE HEIGHT=40 WIDTH="100%">
|
||||
<TR> <TD ALIGN=LEFT WIDTH="100%" BGCOLOR="#DDDDDD">
|
||||
<FONT face="Arial,Helvetica" size=+2><B>
|
||||
compose4.cpp
|
||||
</B></FONT>
|
||||
</TD></TR></TABLE><BR>
|
||||
|
||||
<FONT face="Arial,Helvetica"><B>
|
||||
The following code example is taken from the book<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/" TARGET="_top">
|
||||
The C++ Standard Library - A Tutorial and Reference</A><BR>
|
||||
by Nicolai M. Josuttis, Addison-Wesley, 1999<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/copyright.html">
|
||||
© Copyright</A> Nicolai M. Josuttis 1999<BR>
|
||||
</B></FONT>
|
||||
|
||||
<BR><BR><TT>
|
||||
#include <list><BR>
|
||||
#include <algorithm><BR>
|
||||
#include <functional><BR>
|
||||
#include <cstdlib><BR>
|
||||
#include "<A href="print.hpp.html">print.hpp</A>"<BR>
|
||||
#include "<A href="compose.hpp.html">compose.hpp</A>"<BR>
|
||||
using namespace std;<BR>
|
||||
using namespace boost;<BR>
|
||||
<BR>
|
||||
<BR>
|
||||
int main()<BR>
|
||||
{<BR>
|
||||
list<int> coll;<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// insert five random numbers</I></FONT><BR>
|
||||
generate_n (back_inserter(coll), <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// beginning of destination range</I></FONT><BR>
|
||||
5, <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// count</I></FONT><BR>
|
||||
rand); <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// new value generator</I></FONT><BR>
|
||||
PRINT_ELEMENTS(coll);<BR>
|
||||
<BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// overwrite with five new random numbers</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// in the range between 0 (including) and 10 (excluding)</I></FONT><BR>
|
||||
generate (coll.begin(), coll.end(), <I><FONT face="Arial,Helvetica" color="0000FF" size=-1>// destination range</I></FONT><BR>
|
||||
compose_f_g(bind2nd(modulus<int>(),10),<BR>
|
||||
ptr_fun(rand)));<BR>
|
||||
PRINT_ELEMENTS(coll);<BR>
|
||||
}<BR>
|
||||
</TT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,233 +0,0 @@
|
||||
/* supplementing compose function objects
|
||||
* Fri Jul 16 21:01:58 MEST 1999
|
||||
*/
|
||||
/* The following code example is taken from the book
|
||||
* "The C++ Standard Library - A Tutorial and Reference"
|
||||
* by Nicolai M. Josuttis, Addison-Wesley, 1999
|
||||
*
|
||||
* (C) Copyright Nicolai M. Josuttis 1999.
|
||||
* Permission to copy, use, modify, sell and distribute this software
|
||||
* is granted provided this copyright notice appears in all copies.
|
||||
* This software is provided "as is" without express or implied
|
||||
* warranty, and with no claim as to its suitability for any purpose.
|
||||
*/
|
||||
|
||||
// See http://www.boost.org/libs/compose for Documentation.
|
||||
|
||||
#ifndef BOOST_DEPRECATED
|
||||
# error Boost.Compose has been deprecated in favor of Boost.Bind or Boost.Lambda, and will be removed in a future release. You may define the macro BOOST_DEPRECATED to suppress this warning.
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_COMPOSE_HPP
|
||||
#define BOOST_COMPOSE_HPP
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace boost {
|
||||
|
||||
/**********************************************************
|
||||
* type nullary_function
|
||||
* - as supplement to unary_function and binary_function
|
||||
**********************************************************/
|
||||
template <class Result>
|
||||
struct nullary_function {
|
||||
typedef Result result_type;
|
||||
};
|
||||
|
||||
/**********************************************************
|
||||
* ptr_fun for functions with no argument
|
||||
**********************************************************/
|
||||
template <class Result>
|
||||
class pointer_to_nullary_function : public nullary_function<Result>
|
||||
{
|
||||
protected:
|
||||
Result (*ptr)();
|
||||
public:
|
||||
pointer_to_nullary_function() {
|
||||
}
|
||||
explicit pointer_to_nullary_function(Result (*x)()) : ptr(x) {
|
||||
}
|
||||
Result operator()() const {
|
||||
return ptr();
|
||||
}
|
||||
};
|
||||
|
||||
template <class Result>
|
||||
inline pointer_to_nullary_function<Result> ptr_fun(Result (*x)())
|
||||
{
|
||||
return pointer_to_nullary_function<Result>(x);
|
||||
}
|
||||
|
||||
/*********** compose_f_gx_t and compose_f_gx **********************/
|
||||
|
||||
/* class for the compose_f_gx adapter
|
||||
*/
|
||||
template <class OP1, class OP2>
|
||||
class compose_f_gx_t
|
||||
: public std::unary_function<typename OP2::argument_type,
|
||||
typename OP1::result_type>
|
||||
{
|
||||
private:
|
||||
OP1 op1; // process: op1(op2(x))
|
||||
OP2 op2;
|
||||
public:
|
||||
// constructor
|
||||
compose_f_gx_t(const OP1& o1, const OP2& o2)
|
||||
: op1(o1), op2(o2) {
|
||||
}
|
||||
|
||||
// function call
|
||||
typename OP1::result_type
|
||||
operator()(const typename OP2::argument_type& x) const {
|
||||
return op1(op2(x));
|
||||
}
|
||||
};
|
||||
|
||||
/* convenience functions for the compose_f_gx adapter
|
||||
*/
|
||||
template <class OP1, class OP2>
|
||||
inline compose_f_gx_t<OP1,OP2>
|
||||
compose_f_gx (const OP1& o1, const OP2& o2) {
|
||||
return compose_f_gx_t<OP1,OP2>(o1,o2);
|
||||
}
|
||||
|
||||
/*********** compose_f_gx_hx_t and compose_f_gx_hx **********************/
|
||||
|
||||
/* class for the compose_f_gx_hx adapter
|
||||
*/
|
||||
template <class OP1, class OP2, class OP3>
|
||||
class compose_f_gx_hx_t
|
||||
: public std::unary_function<typename OP2::argument_type,
|
||||
typename OP1::result_type>
|
||||
{
|
||||
private:
|
||||
OP1 op1; // process: op1(op2(x),op3(x))
|
||||
OP2 op2;
|
||||
OP3 op3;
|
||||
public:
|
||||
// constructor
|
||||
compose_f_gx_hx_t (const OP1& o1, const OP2& o2, const OP3& o3)
|
||||
: op1(o1), op2(o2), op3(o3) {
|
||||
}
|
||||
|
||||
// function call
|
||||
typename OP1::result_type
|
||||
operator()(const typename OP2::argument_type& x) const {
|
||||
return op1(op2(x),op3(x));
|
||||
}
|
||||
};
|
||||
|
||||
/* convenience functions for the compose_f_gx_hx adapter
|
||||
*/
|
||||
template <class OP1, class OP2, class OP3>
|
||||
inline compose_f_gx_hx_t<OP1,OP2,OP3>
|
||||
compose_f_gx_hx (const OP1& o1, const OP2& o2, const OP3& o3) {
|
||||
return compose_f_gx_hx_t<OP1,OP2,OP3>(o1,o2,o3);
|
||||
}
|
||||
|
||||
/*********** compose_f_gxy_t and compose_f_gxy **********************/
|
||||
|
||||
/* class for the compose_f_gxy adapter
|
||||
*/
|
||||
template <class OP1, class OP2>
|
||||
class compose_f_gxy_t
|
||||
: public std::binary_function<typename OP2::first_argument_type,
|
||||
typename OP2::second_argument_type,
|
||||
typename OP1::result_type>
|
||||
{
|
||||
private:
|
||||
OP1 op1; // process: op1(op2(x,y))
|
||||
OP2 op2;
|
||||
public:
|
||||
// constructor
|
||||
compose_f_gxy_t (const OP1& o1, const OP2& o2)
|
||||
: op1(o1), op2(o2) {
|
||||
}
|
||||
|
||||
// function call
|
||||
typename OP1::result_type
|
||||
operator()(const typename OP2::first_argument_type& x,
|
||||
const typename OP2::second_argument_type& y) const {
|
||||
return op1(op2(x,y));
|
||||
}
|
||||
};
|
||||
|
||||
/* convenience function for the compose_f_gxy adapter
|
||||
*/
|
||||
template <class OP1, class OP2>
|
||||
inline compose_f_gxy_t<OP1,OP2>
|
||||
compose_f_gxy (const OP1& o1, const OP2& o2) {
|
||||
return compose_f_gxy_t<OP1,OP2>(o1,o2);
|
||||
}
|
||||
|
||||
/*********** compose_f_gx_hy_t and compose_f_gx_hy **********************/
|
||||
|
||||
/* class for the compose_f_gx_hy adapter
|
||||
*/
|
||||
template <class OP1, class OP2, class OP3>
|
||||
class compose_f_gx_hy_t
|
||||
: public std::binary_function<typename OP2::argument_type,
|
||||
typename OP3::argument_type,
|
||||
typename OP1::result_type>
|
||||
{
|
||||
private:
|
||||
OP1 op1; // process: op1(op2(x),op3(y))
|
||||
OP2 op2;
|
||||
OP3 op3;
|
||||
public:
|
||||
// constructor
|
||||
compose_f_gx_hy_t (const OP1& o1, const OP2& o2, const OP3& o3)
|
||||
: op1(o1), op2(o2), op3(o3) {
|
||||
}
|
||||
|
||||
// function call
|
||||
typename OP1::result_type
|
||||
operator()(const typename OP2::argument_type& x,
|
||||
const typename OP3::argument_type& y) const {
|
||||
return op1(op2(x),op3(y));
|
||||
}
|
||||
};
|
||||
|
||||
/* convenience function for the compose_f_gx_hy adapter
|
||||
*/
|
||||
template <class OP1, class OP2, class OP3>
|
||||
inline compose_f_gx_hy_t<OP1,OP2,OP3>
|
||||
compose_f_gx_hy (const OP1& o1, const OP2& o2, const OP3& o3) {
|
||||
return compose_f_gx_hy_t<OP1,OP2,OP3>(o1,o2,o3);
|
||||
}
|
||||
|
||||
/*********** compose_f_g_t and compose_f_g **********************/
|
||||
|
||||
/* class for the compose_f_g adapter
|
||||
*/
|
||||
template <class OP1, class OP2>
|
||||
class compose_f_g_t
|
||||
: public boost::nullary_function<typename OP1::result_type>
|
||||
{
|
||||
private:
|
||||
OP1 op1; // process: op1(op2())
|
||||
OP2 op2;
|
||||
public:
|
||||
// constructor
|
||||
compose_f_g_t(const OP1& o1, const OP2& o2)
|
||||
: op1(o1), op2(o2) {
|
||||
}
|
||||
|
||||
// function call
|
||||
typename OP1::result_type
|
||||
operator()() const {
|
||||
return op1(op2());
|
||||
}
|
||||
};
|
||||
|
||||
/* convenience functions for the compose_f_g adapter
|
||||
*/
|
||||
template <class OP1, class OP2>
|
||||
inline compose_f_g_t<OP1,OP2>
|
||||
compose_f_g (const OP1& o1, const OP2& o2) {
|
||||
return compose_f_g_t<OP1,OP2>(o1,o2);
|
||||
}
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
#endif /*BOOST_COMPOSE_HPP*/
|
||||
@@ -1,9 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0; URL=index.htm">
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="index.htm">index.htm</a>
|
||||
</body>
|
||||
</html>
|
||||
28
print.hpp
28
print.hpp
@@ -1,28 +0,0 @@
|
||||
/* The following code example is taken from the book
|
||||
* "The C++ Standard Library - A Tutorial and Reference"
|
||||
* by Nicolai M. Josuttis, Addison-Wesley, 1999
|
||||
*
|
||||
* (C) Copyright Nicolai M. Josuttis 1999.
|
||||
* Permission to copy, use, modify, sell and distribute this software
|
||||
* is granted provided this copyright notice appears in all copies.
|
||||
* This software is provided "as is" without express or implied
|
||||
* warranty, and with no claim as to its suitability for any purpose.
|
||||
*/
|
||||
#include <iostream>
|
||||
|
||||
/* PRINT_ELEMENTS()
|
||||
* - prints optional C-string optcstr followed by
|
||||
* - all elements of the collection coll
|
||||
* - separated by spaces
|
||||
*/
|
||||
template <class T>
|
||||
inline void PRINT_ELEMENTS (const T& coll, const char* optcstr="")
|
||||
{
|
||||
typename T::const_iterator pos;
|
||||
|
||||
std::cout << optcstr;
|
||||
for (pos=coll.begin(); pos!=coll.end(); ++pos) {
|
||||
std::cout << *pos << ' ';
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>PRINT_ELEMENTS()</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF">
|
||||
|
||||
<TABLE HEIGHT=40 WIDTH="100%">
|
||||
<TR> <TD ALIGN=LEFT WIDTH="100%" BGCOLOR="#DDDDDD">
|
||||
<FONT face="Arial,Helvetica" size=+2><B>
|
||||
PRINT_ELEMENTS()
|
||||
</B></FONT>
|
||||
</TD></TR></TABLE><BR>
|
||||
|
||||
<FONT face="Arial,Helvetica"><B>
|
||||
The following code example is taken from the book<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/" TARGET="_top">
|
||||
The C++ Standard Library - A Tutorial and Reference</A><BR>
|
||||
by Nicolai M. Josuttis, Addison-Wesley, 1999<BR>
|
||||
<A HREF="http://www.josuttis.com/libbook/copyright.html">
|
||||
© Copyright</A> Nicolai M. Josuttis 1999<BR>
|
||||
</B></FONT>
|
||||
|
||||
<BR><BR><TT>
|
||||
#include <iostream><BR>
|
||||
<BR>
|
||||
<Font color="0000FF" >/</FONT><I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* PRINT_ELEMENTS()</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* - prints optional C-string optcstr followed by</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* - all elements of the collection coll</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>* - separated by spaces</I></FONT><BR>
|
||||
<I><FONT face="Arial,Helvetica" color="0000FF" size=-1>*/</I></FONT><BR>
|
||||
template <class T><BR>
|
||||
inline void PRINT_ELEMENTS (const T& coll, const char* optcstr="")<BR>
|
||||
{<BR>
|
||||
typename T::const_iterator pos;<BR>
|
||||
<BR>
|
||||
std::cout << optcstr;<BR>
|
||||
for (pos=coll.begin(); pos!=coll.end(); ++pos) {<BR>
|
||||
std::cout << *pos << ' ';<BR>
|
||||
}<BR>
|
||||
std::cout << std::endl;<BR>
|
||||
}<BR>
|
||||
</TT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Reference in New Issue
Block a user