Classes | |
struct | stapl::container_traits< Container > |
Metafunction to retrieve associated types for containers. This class is similar in spirit to the STL's iterator_traits. More... | |
struct | stapl::member_referencer< Accessor, bool > |
Functor creates a reference either as a proxy or a view for a member of another proxy, based on is_container metafunction. More... | |
Namespaces | |
stapl | |
Macros | |
#define | STAPL_PROXY_HEADER(TYPE) |
Boilerplate for writing proxies. When writing a simple proxy for some type T, the skeleton would be of the form: More... | |
#define | STAPL_PROXY_HEADER_TEMPLATE(...) |
#define | STAPL_PROXY_HEADER_TEMPLATE_1(TYPE, A0) |
#define | STAPL_PROXY_HEADER_TEMPLATE_2(TYPE, A0, A1) |
#define | STAPL_PROXY_HEADER_TEMPLATE_3(TYPE, A0, A1, A2) |
#define | STAPL_PROXY_DEFINES(TYPE) |
#define | STAPL_PROXY_TYPES(TYPE, ACC) |
If customization of the boilerplate proxy is needed, the following macros are defined. For example, if a custom constructor is needed, one would need to write: More... | |
#define | STAPL_PROXY_CONSTRUCTOR(TYPE, ACC) |
#define | STAPL_PROXY_METHODS(TYPE, ACC) |
#define | STAPL_PROXY_CONCAT(...) __VA_ARGS__ |
Concat complex typenames. For example, when writing a proxy for pair<T, U>, the type will be interpreted as two arguments. In order to pass it to the following macros, one would have to do: More... | |
#define | STAPL_PROXY_IMPORT_TYPES(...) |
Helper to import nested types from the proxy's target type. More... | |
#define | STAPL_PROXY_METHOD_RETURN(...) |
Helper to create methods for proxies. More... | |
#define | STAPL_PROXY_METHOD(...) |
#define | STAPL_PROXY_MEMBER(NAME, TYPE) |
Helper to create member references for proxies. More... | |
#define | STAPL_PROXY_REFLECT_TYPE(T) typedef typename target_t::T T; |
Define the nested type T from the target. | |
#define | STAPL_PROXY_SELECTOR_MEMBER(NAME) |
Selector generator for creating selectors for nested proxies. Generates selectors in which the selection scheme is retrieving a member of the outer proxy. More... | |
#define | STAPL_PROXY_REFERENCE_METHOD(NAME, TYPE) STAPL_PROXY_REFERENCE_METHOD_0 |
#define | STAPL_PROXY_REFERENCE_METHOD_0(NAME, TYPE) |
#define | STAPL_PROXY_REFERENCE_METHOD_1(NAME, FN, TYPE, A0) |
#define | STAPL_PROXY_REFERENCE_METHOD_VARIADIC_ONLY(NAME, FN, TYPE) |
Create a method in an outer proxy that returns proxy to the element in the inner (multidimensional) container wrapped by that outer proxy. More... | |
#define | STAPL_PROXY_REFERENCE_METHOD_VARIADIC_AND_SINGLE(NAME, FNV, FN1, TYPE) |
Create methods in an outer proxy that return proxy to the element in the inner (multidimensional) container wrapped by that outer proxy. Creates two methods allowing access to the inner element using either variadic index pack or index tuple. More... | |
#define | GET_MACRO(_1, _2, _3, _4, NAME, ...) NAME |
#define | STAPL_PROXY_REFERENCE_METHOD_VARIADIC(...) |
#define | STAPL_PROXY_VARIADIC_SIZE(...) |
#define | STAPL_PROXY_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size |
#define | STAPL_PROXY_METHOD_RETURN_0(NAME, RTN) |
#define | STAPL_PROXY_METHOD_RETURN_1(NAME, RTN, A0) |
#define | STAPL_PROXY_METHOD_RETURN_2(NAME, RTN, A0, A1) |
#define | STAPL_PROXY_METHOD_RETURN_3(NAME, RTN, A0, A1, A2) |
#define | STAPL_PROXY_METHOD_0(NAME) |
#define | STAPL_PROXY_METHOD_1(NAME, A0) |
#define | STAPL_PROXY_METHOD_2(NAME, A0, A1) |
#define | STAPL_PROXY_METHOD_3(NAME, A0, A1, A2) |
Nested proxy selectors | |
Generators for creating selectors for nested proxies. Generate selectors in which the selection scheme is invoking a method on the outer proxy. | |
#define | STAPL_PROXY_SELECTOR_METHOD(NAME) |
#define | STAPL_PROXY_SELECTOR_METHOD_ARGS_1(NAME, FN, A0) |
#define STAPL_PROXY_HEADER | ( | TYPE | ) |
Boilerplate for writing proxies. When writing a simple proxy for some type T, the skeleton would be of the form:
#define STAPL_PROXY_HEADER_TEMPLATE | ( | ... | ) |
#define STAPL_PROXY_HEADER_TEMPLATE_1 | ( | TYPE, | |
A0 | |||
) |
#define STAPL_PROXY_HEADER_TEMPLATE_2 | ( | TYPE, | |
A0, | |||
A1 | |||
) |
#define STAPL_PROXY_HEADER_TEMPLATE_3 | ( | TYPE, | |
A0, | |||
A1, | |||
A2 | |||
) |
#define STAPL_PROXY_DEFINES | ( | TYPE | ) |
#define STAPL_PROXY_TYPES | ( | TYPE, | |
ACC | |||
) |
If customization of the boilerplate proxy is needed, the following macros are defined. For example, if a custom constructor is needed, one would need to write:
#define STAPL_PROXY_CONSTRUCTOR | ( | TYPE, | |
ACC | |||
) |
#define STAPL_PROXY_METHODS | ( | TYPE, | |
ACC | |||
) |
#define STAPL_PROXY_CONCAT | ( | ... | ) | __VA_ARGS__ |
Concat complex typenames. For example, when writing a proxy for pair<T, U>, the type will be interpreted as two arguments. In order to pass it to the following macros, one would have to do:
#define STAPL_PROXY_IMPORT_TYPES | ( | ... | ) |
Helper to import nested types from the proxy's target type.
If there are nested types in a class of the form:
the following would automatically import the types:
#define STAPL_PROXY_METHOD_RETURN | ( | ... | ) |
Helper to create methods for proxies.
If there is a method in a class with the signature
the following would automatically generate the method in the proxy:
If the function has a return, such as
the following would automatically generate the method in the proxy:
#define STAPL_PROXY_METHOD | ( | ... | ) |
#define STAPL_PROXY_MEMBER | ( | NAME, | |
TYPE | |||
) |
Helper to create member references for proxies.
If there is a member in a class named foo with the type T, the following would automatically create the nested proxy:
#define STAPL_PROXY_SELECTOR_MEMBER | ( | NAME | ) |
Selector generator for creating selectors for nested proxies. Generates selectors in which the selection scheme is retrieving a member of the outer proxy.
#define STAPL_PROXY_SELECTOR_METHOD | ( | NAME | ) |
#define STAPL_PROXY_REFERENCE_METHOD_0 | ( | NAME, | |
TYPE | |||
) |
#define STAPL_PROXY_REFERENCE_METHOD_1 | ( | NAME, | |
FN, | |||
TYPE, | |||
A0 | |||
) |
#define STAPL_PROXY_REFERENCE_METHOD_VARIADIC_ONLY | ( | NAME, | |
FN, | |||
TYPE | |||
) |
Create a method in an outer proxy that returns proxy to the element in the inner (multidimensional) container wrapped by that outer proxy.
NAME | Basis for the names of the datatypes introduced into the outer proxy by this macro. |
FN | Name of the variadic method added to the proxy. Method with the same name must be present in the wrapped container class as it is used for the actual data access. |
TYPE | Type of the element proxy of which is being created. |
#define STAPL_PROXY_REFERENCE_METHOD_VARIADIC_AND_SINGLE | ( | NAME, | |
FNV, | |||
FN1, | |||
TYPE | |||
) |
Create methods in an outer proxy that return proxy to the element in the inner (multidimensional) container wrapped by that outer proxy. Creates two methods allowing access to the inner element using either variadic index pack or index tuple.
NAME | Basis for the names of the datatypes introduced into the outer proxy by this macro. |
FNV | Name of the method accepting variadic indices. Method with the same name must be present in the wrapped container class as it is used for the actual data access. |
FN1 | Name of the method accepting index tuple. The tuple is unpacked to actually access the data using the variadic method of the underlying container. |
TYPE | Type of the element proxy of which is being created. |
#define STAPL_PROXY_REFERENCE_METHOD_VARIADIC | ( | ... | ) |
#define STAPL_PROXY_VARIADIC_SIZE | ( | ... | ) |
#define STAPL_PROXY_METHOD_RETURN_0 | ( | NAME, | |
RTN | |||
) |
#define STAPL_PROXY_METHOD_RETURN_1 | ( | NAME, | |
RTN, | |||
A0 | |||
) |
#define STAPL_PROXY_METHOD_RETURN_2 | ( | NAME, | |
RTN, | |||
A0, | |||
A1 | |||
) |
#define STAPL_PROXY_METHOD_RETURN_3 | ( | NAME, | |
RTN, | |||
A0, | |||
A1, | |||
A2 | |||
) |
#define STAPL_PROXY_METHOD_0 | ( | NAME | ) |
#define STAPL_PROXY_METHOD_1 | ( | NAME, | |
A0 | |||
) |
#define STAPL_PROXY_METHOD_2 | ( | NAME, | |
A0, | |||
A1 | |||
) |
#define STAPL_PROXY_METHOD_3 | ( | NAME, | |
A0, | |||
A1, | |||
A2 | |||
) |