ScummVM API documentation
Functions

Description

API for managing functions.

Classes

struct  Common::UnaryFunction< Arg, Result >
 
struct  Common::BinaryFunction< Arg1, Arg2, Result >
 
struct  Common::EqualTo< T >
 
struct  Common::Less< T >
 
struct  Common::Greater< T >
 
class  Common::Binder1st< Op >
 
class  Common::Binder2nd< Op >
 
class  Common::PointerToUnaryFunc< Arg, Result >
 
class  Common::PointerToBinaryFunc< Arg1, Arg2, Result >
 
class  Common::MemFunc0< Result, T >
 
class  Common::ConstMemFunc0< Result, T >
 
class  Common::MemFunc1< Result, Arg, T >
 
class  Common::ConstMemFunc1< Result, Arg, T >
 
class  Common::MemFuncRef0< Result, T >
 
class  Common::ConstMemFuncRef0< Result, T >
 
class  Common::MemFuncRef1< Result, Arg, T >
 
class  Common::ConstMemFuncRef1< Result, Arg, T >
 
struct  Common::Functor0< Res >
 
class  Common::Functor0Mem< Res, T >
 
struct  Common::Functor1< Arg, Res >
 
class  Common::Functor1Mem< Arg, Res, T >
 
struct  Common::Functor2< Arg1, Arg2, Res >
 
class  Common::Functor2Fun< Arg1, Arg2, Res >
 
class  Common::Functor2Mem< Arg1, Arg2, Res, T >
 
struct  Common::Hash< T >
 
struct  Common::Hash< bool >
 
struct  Common::Hash< char >
 
struct  Common::Hash< signed char >
 
struct  Common::Hash< unsigned char >
 
struct  Common::Hash< short >
 
struct  Common::Hash< int >
 
struct  Common::Hash< long >
 
struct  Common::Hash< unsigned short >
 
struct  Common::Hash< unsigned int >
 
struct  Common::Hash< unsigned long >
 

Macros

#define GENERATE_TRIVIAL_HASH_FUNCTOR(T)
 

Functions

template<class Op >
Binder1st< Op > Common::bind1st (const Op &op, typename Op::FirstArgumentType t)
 
template<class Op >
Binder2nd< Op > Common::bind2nd (const Op &op, typename Op::SecondArgumentType t)
 
template<class Arg , class Result >
PointerToUnaryFunc< Arg, Result > Common::ptr_fun (Result(*func)(Arg))
 
template<class Arg1 , class Arg2 , class Result >
PointerToBinaryFunc< Arg1, Arg2, Result > Common::ptr_fun (Result(*func)(Arg1, Arg2))
 
template<class Result , class T >
MemFunc0< Result, T > Common::mem_fun (Result(T::*f)())
 
template<class Result , class Arg , class T >
MemFunc1< Result, Arg, T > Common::mem_fun (Result(T::*f)(Arg))
 
template<class Result , class T >
MemFuncRef0< Result, T > Common::mem_fun_ref (Result(T::*f)())
 
template<class Result , class T >
ConstMemFuncRef0< Result, T > Common::mem_fun_Ref (Result(T::*f)() const)
 
template<class Result , class Arg , class T >
MemFuncRef1< Result, Arg, T > Common::mem_fun_ref (Result(T::*f)(Arg))
 

Macro Definition Documentation

◆ GENERATE_TRIVIAL_HASH_FUNCTOR

#define GENERATE_TRIVIAL_HASH_FUNCTOR (   T)
Value:
template<> struct Hash<T> : public UnaryFunction<T, uint> { \
uint operator()(T val) const { return (uint)val; } \
}

Function Documentation

◆ bind1st()

template<class Op >
Binder1st<Op> Common::bind1st ( const Op &  op,
typename Op::FirstArgumentType  t 
)
inline

Transforms a binary function object into an unary function object. To achieve that the first parameter is bound to the passed value t.

◆ bind2nd()

template<class Op >
Binder2nd<Op> Common::bind2nd ( const Op &  op,
typename Op::SecondArgumentType  t 
)
inline

Transforms a binary function object into an unary function object. To achieve that the first parameter is bound to the passed value t.

◆ ptr_fun() [1/2]

template<class Arg , class Result >
PointerToUnaryFunc<Arg, Result> Common::ptr_fun ( Result(*)(Arg)  func)
inline

Creates an unary function object from a function pointer.

◆ ptr_fun() [2/2]

template<class Arg1 , class Arg2 , class Result >
PointerToBinaryFunc<Arg1, Arg2, Result> Common::ptr_fun ( Result(*)(Arg1, Arg2)  func)
inline

Creates a binary function object from a function pointer.

◆ mem_fun() [1/2]

template<class Result , class T >
MemFunc0<Result, T> Common::mem_fun ( Result(T::*)()  f)
inline

Creates a unary function object from a class member function pointer. The parameter passed to the function object is the 'this' pointer to be used for the function call.

◆ mem_fun() [2/2]

template<class Result , class Arg , class T >
MemFunc1<Result, Arg, T> Common::mem_fun ( Result(T::*)(Arg)  f)
inline

Creates a binary function object from a class member function pointer. The first parameter passed to the function object is the 'this' pointer to be used for the function call. The second one is the parameter passed to the member function.

◆ mem_fun_ref() [1/2]

template<class Result , class T >
MemFuncRef0<Result, T> Common::mem_fun_ref ( Result(T::*)()  f)
inline

Creates a unary function object from a class member function pointer. The parameter passed to the function object is the object instance to be used for the function call. Note unlike mem_fun, it takes a reference as parameter. Note unlike mem_fun, it takes a reference as parameter.

◆ mem_fun_Ref()

template<class Result , class T >
ConstMemFuncRef0<Result, T> Common::mem_fun_Ref ( Result(T::*)() const  f)
inline

Creates a unary function object from a class member function pointer. The parameter passed to the function object is the object instance to be used for the function call. Note unlike mem_fun, it takes a reference as parameter.

◆ mem_fun_ref() [2/2]

template<class Result , class Arg , class T >
MemFuncRef1<Result, Arg, T> Common::mem_fun_ref ( Result(T::*)(Arg)  f)
inline

Creates a binary function object from a class member function pointer. The first parameter passed to the function object is the object instance to be used for the function call. Note unlike mem_fun, it takes a reference as parameter. The second one is the parameter passed to the member function.