QuickFunctor

QuickFunctor project is a library that consists of a collection of template classes and global functions.
Download

QuickFunctor Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Ciobi
  • Publisher web site:

QuickFunctor Tags


QuickFunctor Description

QuickFunctor project is a library that consists of a collection of template classes and global functions. QuickFunctor project is a library that consists of a collection of template classes and global functions to facilitate creation of and working with "functors", or "function objects", i.e. classes implementing an operator().The functors in QuickFunctor are a substantial improvement (IMHO) over what the standard provides, with things like composition, expressions, "transform" operations, and even the naming convention.Obviously, the work in the functor area didn't stop after the release of the last standard; there are related things in Boost, TR1, Loki and perhaps other places, but I think QuickFunctor is worth a look.Here are some key features of "QuickFunctor":· Functors can be combined in expressions (arithmetic, boolean, string, ...), using most C++ operators. Expressions of numerical and string types are handled directly, and user types can easily be accommodated, if needed, including numeric user types (like Fraction) that can be combined in expressions with standard types (like int). · Constructors for functors take a more diverse set of parameters. Besides being able to create a functor from a member or a global function, a functor can be created from a value or from a local, static or member variable. · It can create functors from function members that have parameters. · It can deal with functors with 3 or more parameters. · A more consistent naming scheme. If you want to create a functor from a function, it doesn't matter if the function takes a parameter, two, or none, if it's a member function or a global one, if it takes references or pointers. There is one (highly) overloaded function called mkF (for "make functor"), which detects what parameter is passed and generates the appropriate functor. (But when constructing a functor from a variable there are more options, described below.) · An extensive set of operations that can be applied to existing functors to create new functors. These include: · mathematical composition, including an extension that works with functors with more than 1 parameter · result and parameter conversion between references and pointers binding of parameters (like STL's bind1st and bind2nd) · removal / substitution of parameters · permutations · casting · Regardless of how are they built, functors can be stored in variables with simple types (which are called "named functors"), if there's a need. However, using such a functor takes more memory (including heap memory, while unnamed functors usually just use the stack) and involves virtual function calls. (Actually this is the only place where virtual functions are used.)What's New in This Release:· Basically the same as 0.8.1.0, but with a change in the HTML formatting that should allow more browsers to display the documentation properly.


QuickFunctor Related Software