C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
exprtk::rtl::io::details::print_impl< T > Struct Template Reference

#include <exprtk.hpp>

Public Types

typedef igeneric_function< T >::generic_type generic_type
 
typedef igeneric_function< T >::parameter_list_t parameter_list_t
 
typedef generic_type::scalar_view scalar_t
 
typedef generic_type::vector_view vector_t
 
typedef generic_type::string_view string_t
 
typedef exprtk::details::numeric::details::number_type< T >::type num_type
 

Static Public Member Functions

static void process (const std::string &scalar_format, parameter_list_t parameters)
 
static void print (const std::string &scalar_format, const scalar_t &s)
 
static void print (const std::string &scalar_format, const vector_t &v)
 
static void print (const string_t &s)
 

Detailed Description

template<typename T>
struct exprtk::rtl::io::details::print_impl< T >

Definition at line 44064 of file exprtk.hpp.

Member Typedef Documentation

◆ generic_type

template<typename T >
typedef igeneric_function<T>::generic_type exprtk::rtl::io::details::print_impl< T >::generic_type

Definition at line 44066 of file exprtk.hpp.

◆ num_type

template<typename T >
typedef exprtk::details::numeric::details::number_type<T>::type exprtk::rtl::io::details::print_impl< T >::num_type

Definition at line 44071 of file exprtk.hpp.

◆ parameter_list_t

template<typename T >
typedef igeneric_function<T>::parameter_list_t exprtk::rtl::io::details::print_impl< T >::parameter_list_t

Definition at line 44067 of file exprtk.hpp.

◆ scalar_t

template<typename T >
typedef generic_type::scalar_view exprtk::rtl::io::details::print_impl< T >::scalar_t

Definition at line 44068 of file exprtk.hpp.

◆ string_t

template<typename T >
typedef generic_type::string_view exprtk::rtl::io::details::print_impl< T >::string_t

Definition at line 44070 of file exprtk.hpp.

◆ vector_t

template<typename T >
typedef generic_type::vector_view exprtk::rtl::io::details::print_impl< T >::vector_t

Definition at line 44069 of file exprtk.hpp.

Member Function Documentation

◆ print() [1/3]

template<typename T >
static void exprtk::rtl::io::details::print_impl< T >::print ( const std::string &  scalar_format,
const scalar_t s 
)
inlinestatic

Definition at line 44095 of file exprtk.hpp.

44096 {
44097 print_type(scalar_format,s(),num_type());
44098 }
void print_type(const std::string &fmt, const T v, exprtk::details::numeric::details::real_type_tag)
Definition exprtk.hpp:44040
exprtk::details::numeric::details::number_type< T >::type num_type
Definition exprtk.hpp:44071

References exprtk::rtl::io::details::print_type().

Here is the call graph for this function:

◆ print() [2/3]

template<typename T >
static void exprtk::rtl::io::details::print_impl< T >::print ( const std::string &  scalar_format,
const vector_t v 
)
inlinestatic

Definition at line 44100 of file exprtk.hpp.

44101 {
44102 for (std::size_t i = 0; i < v.size(); ++i)
44103 {
44104 print_type(scalar_format,v[i],num_type());
44105
44106 if ((i + 1) < v.size())
44107 printf(" ");
44108 }
44109 }

References exprtk::rtl::io::details::print_type(), and exprtk::type_store< T >::type_view< ViewType >::size().

Here is the call graph for this function:

◆ print() [3/3]

template<typename T >
static void exprtk::rtl::io::details::print_impl< T >::print ( const string_t s)
inlinestatic

Definition at line 44111 of file exprtk.hpp.

44112 {
44113 printf("%s",to_str(s).c_str());
44114 }
std::string to_str(const StringView &view)
Definition exprtk.hpp:4996

References exprtk::to_str().

Here is the call graph for this function:

◆ process()

template<typename T >
static void exprtk::rtl::io::details::print_impl< T >::process ( const std::string &  scalar_format,
parameter_list_t  parameters 
)
inlinestatic

Definition at line 44073 of file exprtk.hpp.

44074 {
44075 for (std::size_t i = 0; i < parameters.size(); ++i)
44076 {
44077 generic_type& gt = parameters[i];
44078
44079 switch (gt.type)
44080 {
44081 case generic_type::e_scalar : print(scalar_format,scalar_t(gt));
44082 break;
44083
44084 case generic_type::e_vector : print(scalar_format,vector_t(gt));
44085 break;
44086
44088 break;
44089
44090 default : continue;
44091 }
44092 }
44093 }
generic_type::string_view string_t
Definition exprtk.hpp:44070
igeneric_function< T >::generic_type generic_type
Definition exprtk.hpp:44066
static void print(const std::string &scalar_format, const scalar_t &s)
Definition exprtk.hpp:44095
generic_type::scalar_view scalar_t
Definition exprtk.hpp:44068
generic_type::vector_view vector_t
Definition exprtk.hpp:44069

References exprtk::type_store< T >::e_scalar, exprtk::type_store< T >::e_string, exprtk::type_store< T >::e_vector, exprtk::type_store< T >::parameter_list::size(), and exprtk::type_store< T >::type.

Referenced by exprtk::rtl::io::print< T >::operator()(), and exprtk::rtl::io::println< T >::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

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