libzypp 17.31.23
Function.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_BASE_FUNCTION_H
13#define ZYPP_BASE_FUNCTION_H
14
15#include <functional>
16#include <boost/function.hpp>
17
19namespace zypp
20{
21
22 /* http://www.boost.org/doc/html/function.html
23
24 The Boost.Function library contains a family of class templates
25 that are function object wrappers. The notion is similar to a
26 generalized callback. It shares features with function pointers
27 in that both define a call interface (e.g., a function taking
28 two integer arguments and returning a floating-point value)
29 through which some implementation can be called, and the
30 implementation that is invoked may change throughout the
31 course of the program.
32
33 Generally, any place in which a function pointer would be used
34 to defer a call or make a callback, Boost.Function can be used
35 instead to allow the user greater flexibility in the implementation
36 of the target. Targets can be any 'compatible' function object
37 (or function pointer), meaning that the arguments to the interface
38 designated by Boost.Function can be converted to the arguments of
39 the target function object.
40 */
41 using boost::function;
42
43 using std::bind;
44 using std::placeholders::_1;
45 using std::placeholders::_2;
46 using std::placeholders::_3;
47
49} // namespace zypp
51#endif // ZYPP_BASE_FUNCTION_H
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2