PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pineforge::StrFormatValue Struct Reference

#include <str_utils.hpp>

Public Types

enum class  Kind {
  Number ,
  Text
}
 

Public Member Functions

template<class T, std::enable_if_t< std::is_arithmetic_v< T > &&!std::is_same_v< T, bool >, int > = 0>
 StrFormatValue (T value)
 
 StrFormatValue (bool value)
 
 StrFormatValue (const std::string &value)
 
 StrFormatValue (const char *value)
 

Data Fields

Kind kind
 
double number = 0.0
 
std::string text
 

Detailed Description

Definition at line 14 of file str_utils.hpp.

Member Enumeration Documentation

◆ Kind

Enumerator
Number 
Text 

Definition at line 15 of file str_utils.hpp.

Constructor & Destructor Documentation

◆ StrFormatValue() [1/4]

template<class T, std::enable_if_t< std::is_arithmetic_v< T > &&!std::is_same_v< T, bool >, int > = 0>
pineforge::StrFormatValue::StrFormatValue ( T value)
inline

Definition at line 22 of file str_utils.hpp.

References kind, pineforge::na< double >(), Number, and number.

◆ StrFormatValue() [2/4]

pineforge::StrFormatValue::StrFormatValue ( bool value)
inline

Definition at line 27 of file str_utils.hpp.

References kind, Text, and text.

◆ StrFormatValue() [3/4]

pineforge::StrFormatValue::StrFormatValue ( const std::string & value)
inline

Definition at line 28 of file str_utils.hpp.

References kind, Text, and text.

◆ StrFormatValue() [4/4]

pineforge::StrFormatValue::StrFormatValue ( const char * value)
inline

Definition at line 29 of file str_utils.hpp.

References kind, Text, and text.

Field Documentation

◆ kind

Kind pineforge::StrFormatValue::kind

Definition at line 16 of file str_utils.hpp.

Referenced by StrFormatValue(), StrFormatValue(), StrFormatValue(), and StrFormatValue().

◆ number

double pineforge::StrFormatValue::number = 0.0

Definition at line 17 of file str_utils.hpp.

Referenced by StrFormatValue().

◆ text

std::string pineforge::StrFormatValue::text

Definition at line 18 of file str_utils.hpp.

Referenced by StrFormatValue(), StrFormatValue(), and StrFormatValue().


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