KSeExpr 6.0.0.0
Functions
KSeExpr::Utils Namespace Reference

Functions

KSeExpr_DEFAULT double_t round (double_t val)
 
KSeExpr_DEFAULT double_t floor (double_t val)
 
double_t atof (const char *num)
 
double_t atof (const std::string &num)
 
int32_t strtol (const char *num)
 
int32_t strtol (const std::string &num)
 
bool parseRangeComment (const std::string &comment, double &from, double &to)
 
bool parseRangeComment (const std::string &comment, float &from, float &to)
 
bool parseRangeComment (const std::string &comment, int32_t &from, int32_t &to)
 
bool parseTypeNameComment (const std::string &comment, std::string &type, std::string &name)
 
bool parseLabelComment (const std::string &comment, std::string &label)
 
std::string trim (const std::string &s)
 

Function Documentation

◆ atof() [1/2]

double_t KSeExpr::Utils::atof ( const char num)

Locale-independent atof() - amyspark Prevents SeExpr missing mantissas if LC_ALL is not "C" (like Qt)

Definition at line 51 of file Utils.cpp.

Referenced by ExprControlCollection::addControlDialog(), parseRangeComment(), and parseRangeComment().

◆ atof() [2/2]

double_t KSeExpr::Utils::atof ( const std::string &  num)

Definition at line 134 of file Utils.cpp.

◆ floor()

KSeExpr_DEFAULT double_t KSeExpr::Utils::floor ( double_t  val)

Definition at line 168 of file Utils.cpp.

Referenced by KSeExpr::CellNoise(), and KSeExpr::noiseHelper().

◆ parseLabelComment()

bool KSeExpr::Utils::parseLabelComment ( const std::string &  comment,
std::string &  label 
)

Definition at line 124 of file Utils.cpp.

References trim().

Referenced by ColorSwatchEditable::parseComment().

◆ parseRangeComment() [1/3]

bool KSeExpr::Utils::parseRangeComment ( const std::string &  comment,
double from,
double to 
)

◆ parseRangeComment() [2/3]

bool KSeExpr::Utils::parseRangeComment ( const std::string &  comment,
float from,
float to 
)

Definition at line 37 of file Utils.cpp.

References atof(), and trim().

◆ parseRangeComment() [3/3]

bool KSeExpr::Utils::parseRangeComment ( const std::string &  comment,
int32_t from,
int32_t to 
)

Definition at line 67 of file Utils.cpp.

References strtol(), and trim().

◆ parseTypeNameComment()

bool KSeExpr::Utils::parseTypeNameComment ( const std::string &  comment,
std::string &  type,
std::string &  name 
)

Definition at line 99 of file Utils.cpp.

References trim().

Referenced by KSeExpr::ExprStrSpec::match(), and StringEditable::parseComment().

◆ round()

KSeExpr_DEFAULT double_t KSeExpr::Utils::round ( double_t  val)

Definition at line 163 of file Utils.cpp.

◆ strtol() [1/2]

int32_t KSeExpr::Utils::strtol ( const char num)

Referenced by parseRangeComment().

◆ strtol() [2/2]

int32_t KSeExpr::Utils::strtol ( const std::string &  num)

Definition at line 139 of file Utils.cpp.

◆ trim()

std::string KSeExpr::Utils::trim ( const std::string &  s)
inline