A statically-typed closure captured from a function of type FunctionType
.
More...
Public Member Functions | |
closure () | |
Default constructor. Creates an empty closure. | |
closure (const closure &other) | |
Copy constructor. | |
closure (const auto_closure &other) | |
Converts other from an arbb::auto_closure to a statically typed arbb::closure. | |
void | operator() (FunctionParams...arguments) const |
Executes the closure with the provided arguments . | |
bool | empty () const |
Returns true if the closure is empty. | |
closure & | operator= (const closure &other) |
Assignment operator. | |
closure & | operator= (const auto_closure &other) |
Converts other from an arbb::auto_closure to a statically typed arbb::closure and assigns it. | |
bool | operator== (const auto_closure &other) |
Returns true if the closure is the same as other . | |
bool | operator!= (const auto_closure &other) |
Returns true if the closure is not the same as other . | |
bool | operator== (const closure &other) |
Returns true if the closure is the same as other . | |
bool | operator!= (const closure &other) |
Returns true if the closure is not the same as other . | |
operator auto_closure () const | |
Converts the closure to an arbb::auto_closure. |
A statically-typed closure captured from a function of type FunctionType
.
Definition at line 39 of file closure.hpp.
arbb::closure< FunctionType >::closure | ( | ) |
Default constructor. Creates an empty closure.
arbb::closure< FunctionType >::closure | ( | const closure< FunctionType > & | other | ) |
Copy constructor.
arbb::closure< FunctionType >::closure | ( | const auto_closure< FunctionType > & | other | ) |
Converts other
from an arbb::auto_closure to a statically typed arbb::closure.
arbb::exception | If the type of other does not match the closure type being constructed. |
void arbb::closure< FunctionType >::operator() | ( | FunctionParams... | arguments | ) | const |
Executes the closure with the provided arguments
.
If the types of the arguments provided do not match those accepted by the function from which this closure was captured, a compilation error occurs.
arbb::out_of_bounds | If the closure attempted an out-of-bounds access. | |
arbb::arithmetic_error | If the closure caused an arithmetic error, such as a divison by zero. | |
arbb::bad_alloc | If the closure failed to allocate memory for a variable. | |
arbb::uninitialized_access | If the closure attempted to access an uninitialized variable. |
bool arbb::closure< FunctionType >::empty | ( | ) | const |
Returns true
if the closure is empty.
closure& arbb::closure< FunctionType >::operator= | ( | const closure< FunctionType > & | other | ) |
Assignment operator.
closure& arbb::closure< FunctionType >::operator= | ( | const auto_closure< FunctionType > & | other | ) |
Converts other
from an arbb::auto_closure to a statically typed arbb::closure and assigns it.
arbb::exception | If the type of other does not match the destination closure type. |
bool arbb::closure< FunctionType >::operator== | ( | const auto_closure< FunctionType > & | other | ) |
Returns true
if the closure is the same as other
.
bool arbb::closure< FunctionType >::operator!= | ( | const auto_closure< FunctionType > & | other | ) |
Returns true
if the closure is not the same as other
.
bool arbb::closure< FunctionType >::operator== | ( | const closure< FunctionType > & | other | ) |
Returns true
if the closure is the same as other
.
bool arbb::closure< FunctionType >::operator!= | ( | const closure< FunctionType > & | other | ) |
Returns true
if the closure is not the same as other
.
arbb::closure< FunctionType >::operator auto_closure | ( | ) | const [inline] |
Converts the closure to an arbb::auto_closure.
Definition at line 96 of file closure.hpp.
Copyright © 2010, Intel Corporation. All rights reserved.