|
tfel
|
A structure able to contain values extracted from a JSON-like file. More...
#include </home/runner/work/tfel/tfel/include/TFEL/Utilities/Data.hxx>
Public Types | |
| using | CallBack = std::function<void(const Data&)> |
| a simple alias | |
| Public Types inherited from tfel::utilities::GenTypeBase< DataTypes > | |
| using | variant |
| a simple alias | |
Public Member Functions | |
|
template<typename T1> requires ( tfel::meta::TLCountNbrOfT<std::decay_t<T1>, DataTypes>::value == 1) | |
| TFEL_INLINE | explicit (false) Data(T1 &&v) |
| constructor from a value | |
| Data () | |
| default constructor | |
| Data (Data &&) noexcept | |
| move constructor | |
| Data (const Data &) | |
| copy constructor | |
| Data & | operator= (Data &&) noexcept |
| move assignement | |
| Data & | operator= (const Data &) |
| assignement | |
| ~Data () | |
| destructor | |
| Public Member Functions inherited from tfel::utilities::GenTypeBase< DataTypes > | |
| GenTypeBase ()=default | |
| default constructor | |
| explicit (false) GenTypeBase(T1 &&value) | |
| constructor from a value | |
| GenTypeBase & | operator= (GenTypeBase &&)=default |
| bool | empty () const |
| bool | copy (const GenTypeBase &src) |
| copy a GenType (calls the assignement operator). | |
| TFEL_INLINE void | set (T1 &&src) |
| set the value of the GenType. | |
| TFEL_INLINE bool | is () const |
| TFEL_INLINE const T1 & | get () const |
| TFEL_INLINE unsigned short | getTypeIndex () const |
Static Public Member Functions | |
| static Data | read (CxxTokenizer::const_iterator &, const CxxTokenizer::const_iterator, const DataParsingOptions &={}) |
| read a JSON-like structure | |
| static void | parse (CxxTokenizer::const_iterator &, const CxxTokenizer::const_iterator, const std::map< std::string, CallBack > &, const DataParsingOptions &={}) |
| read a map. For each read key, a callback must available to treat the associated data. The result of the treatment is stored in the returned value. | |
| static Data | read_value (CxxTokenizer::const_iterator &, const CxxTokenizer::const_iterator, const DataParsingOptions &={}) |
| read a standard value (string,double,int) | |
| static Data | read_vector (CxxTokenizer::const_iterator &, const CxxTokenizer::const_iterator, const DataParsingOptions &={}) |
| read a map | |
| static Data | read_map (CxxTokenizer::const_iterator &, const CxxTokenizer::const_iterator, const DataParsingOptions &={}) |
| read a map | |
Additional Inherited Members | |
| Static Public Attributes inherited from tfel::utilities::GenTypeBase< DataTypes > | |
| static constexpr bool | isValidType |
| a variable checking if the given type is valid | |
| Protected Member Functions inherited from tfel::utilities::GenTypeBase< DataTypes > | |
| TFEL_INLINE void | clear () |
| clear the GenType | |
| TFEL_INLINE void | set_uninitialised () |
| set the value of the GenType. | |
A structure able to contain values extracted from a JSON-like file.
|
static |
read a map. For each read key, a callback must available to treat the associated data. The result of the treatment is stored in the returned value.
| [in,out] | p | current position in the tokens stream |
| [in] | pe | past-the-end iterator |
| [in] | callbacks | list of call-backs |
| [in] | o | parsing options |
|
static |
read a JSON-like structure
| [in,out] | p | current position in the tokens stream |
| [in] | pe | past-the-end iterator |
| [in] | o | parsing options |
|
static |
read a map
| [in,out] | p | current position in the tokens stream |
| [in] | pe | past-the-end iterator |
| [in] | o | parsing options |
|
static |
read a standard value (string,double,int)
| [in,out] | p | current position in the tokens stream |
| [in] | pe | past-the-end iterator |
| [in] | o | parsing options |
|
static |
read a map
| [in,out] | p | current position in the tokens stream |
| [in] | pe | past-the-end iterator |
| [in] | o | parsing options |