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 43571 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 43573 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 43578 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 43574 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 43575 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 43577 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 43576 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 43602 of file exprtk.hpp.

43603 {
43604 print_type(scalar_format,s(),num_type());
43605 }
void print_type(const std::string &fmt, const T v, exprtk::details::numeric::details::real_type_tag)
Definition exprtk.hpp:43547
exprtk::details::numeric::details::number_type< T >::type num_type
Definition exprtk.hpp:43578

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 43607 of file exprtk.hpp.

43608 {
43609 for (std::size_t i = 0; i < v.size(); ++i)
43610 {
43611 print_type(scalar_format,v[i],num_type());
43612
43613 if ((i + 1) < v.size())
43614 printf(" ");
43615 }
43616 }

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 43618 of file exprtk.hpp.

43619 {
43620 printf("%s",to_str(s).c_str());
43621 }
std::string to_str(const StringView &view)
Definition exprtk.hpp:4869

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 43580 of file exprtk.hpp.

43581 {
43582 for (std::size_t i = 0; i < parameters.size(); ++i)
43583 {
43584 generic_type& gt = parameters[i];
43585
43586 switch (gt.type)
43587 {
43588 case generic_type::e_scalar : print(scalar_format,scalar_t(gt));
43589 break;
43590
43591 case generic_type::e_vector : print(scalar_format,vector_t(gt));
43592 break;
43593
43595 break;
43596
43597 default : continue;
43598 }
43599 }
43600 }
generic_type::string_view string_t
Definition exprtk.hpp:43577
igeneric_function< T >::generic_type generic_type
Definition exprtk.hpp:43573
static void print(const std::string &scalar_format, const scalar_t &s)
Definition exprtk.hpp:43602
generic_type::scalar_view scalar_t
Definition exprtk.hpp:43575
generic_type::vector_view vector_t
Definition exprtk.hpp:43576

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: