NEST main@caf0ae8
 
Loading...
Searching...
No Matches
DictionarySchemaBuilder< Scalars > Struct Template Reference

Add a set of standard datatypes to any_type variant. More...

#include <dictionary.h>

Public Types

template<typename... Extras>
using VariantType = std::variant< std::monostate, Scalars..., std::vector< Scalars >..., Extras... >
 

Detailed Description

template<typename... Scalars>
struct DictionarySchemaBuilder< Scalars >

Add a set of standard datatypes to any_type variant.

The main purpose of this type is to automatically generate variants representing the basic scalar types, strings, and dictionaries and one-dimensional std::vector<> of these. More specific types are added later in the actual declaration of any_type.

The first entry in the std::variant<> must be std::monostate , so that default-initialized any_value instances will have this type. This is needed to fill the entries corresponding to non-local nodes when status information for a NodeCollection is returned.

Note
Conversion from Dictionary elements to and from Python datatypes is done by nestkernel_api.pyx:any_to_pyobj and nestkernel_api.pyx:pydict_to_Dictionary, respectively. If you add a type to the variant, you most likely need to add corresponding conversions to those functions.

Member Typedef Documentation

◆ VariantType

template<typename... Scalars>
template<typename... Extras>
using DictionarySchemaBuilder< Scalars >::VariantType = std::variant< std::monostate, Scalars..., std::vector< Scalars >..., Extras... >

The documentation for this struct was generated from the following file: