Kaspersky Neuromorphic Platform  1.0.0
API Reference
Loading...
Searching...
No Matches
stringify.h File Reference

Introspection routines. More...

#include <string>
#include <tuple>
#include <vector>
#include <boost/mp11.hpp>
#include <boost/preprocessor.hpp>
+ Include dependency graph for stringify.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  knp
 General framework namespace.
 
namespace  knp::meta
 Metaprogramming library namespace.
 

Macros

#define KNP_MAKE_TUPLE_INTERNAL(n, tuple_type, tuple_elem)
 Internal macro.
 
#define KNP_MAKE_TUPLE(tuple_elems)
 Make tuple from the passed elements.
 

Typedefs

template<class T1 , class T2 >
using knp::meta::mp_neq = boost::mp11::mp_bool<T1::value != T2::value>
 Template used to determine if two arbitrary types are not the same at the compile stage.
 
template<class AllList , class L >
using knp::meta::mp_flt = boost::mp11::mp_filter_q<boost::mp11::mp_bind_front<mp_neq, boost::mp11::mp_size<AllList>>, L>
 List of types from the global type list that are used in the local type list.
 
template<class AllList , class L >
using knp::meta::mp_supported_indexes
 Index array for types from the global type list that are used in the local type list.
 

Functions

template<typename AllTypes , typename SupportedTypes >
std::vector< size_t > knp::meta::get_supported_type_indexes ()
 Get supported type indexes.
 
template<typename AllTypes , typename SupportedTypes , typename NamesType >
std::vector< std::string > knp::meta::get_supported_type_names (const NamesType &type_names)
 Get names of supported object types.
 

Detailed Description

Introspection routines.

Developers: Artiom N.
Date
10.05.2023
License: Apache 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file stringify.h.

Macro Definition Documentation

◆ KNP_MAKE_TUPLE

#define KNP_MAKE_TUPLE ( tuple_elems)
Value:
::std::make_tuple( \
BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_FOR_EACH(KNP_MAKE_TUPLE_INTERNAL, "", BOOST_PP_VARIADIC_TO_SEQ(tuple_elems))));
#define KNP_MAKE_TUPLE_INTERNAL(n, tuple_type, tuple_elem)
Internal macro.
Definition stringify.h:68

Make tuple from the passed elements.

Definition at line 73 of file stringify.h.

◆ KNP_MAKE_TUPLE_INTERNAL

#define KNP_MAKE_TUPLE_INTERNAL ( n,
tuple_type,
tuple_elem )
Value:
(BOOST_PP_STRINGIZE(tuple_elem))

Internal macro.

Definition at line 68 of file stringify.h.