MeteoIODoc 20241222.207bde49
smet::SMETCommon Class Reference

Detailed Description

A static class to provide basic operations and variables for the libsmet library.

Author
Thomas Egger

#include <libsmet.h>

Static Public Member Functions

static bool validFileAndPath (const std::string &filename)
 
static void copy_file (const std::string &src, const std::string &dest)
 
static bool fileExists (const std::string &filename)
 
static std::string strToLower (std::string str)
 
static double convert_to_double (const std::string &in_string)
 
static int convert_to_int (const std::string &in_string)
 
static char convert_to_char (const std::string &in_string)
 
static void stripComments (std::string &str)
 
static char getEoln (std::istream &fin)
 
static void trim (std::string &str)
 
static void toUpper (std::string &str)
 
static bool readKeyValuePair (const std::string &in_line, const std::string &delimiter, std::map< std::string, std::string > &out_map)
 
static size_t readLineToVec (const std::string &line_in, std::vector< std::string > &vecString)
 
static size_t readLineToVec (const std::string &line_in, std::vector< std::string > &vecString, const char &delim)
 
static bool is_decimal (const std::string &value)
 

Static Public Attributes

static std::set< std::string > all_optional_header_keys = set<std::string>()
 
static std::set< std::string > all_decimal_header_values = set<std::string>()
 
static std::set< std::string > all_mandatory_header_keys = set<std::string>()
 
static const char * smet_version = "1.1"
 

Member Function Documentation

◆ convert_to_char()

char smet::SMETCommon::convert_to_char ( const std::string &  in_string)
static

◆ convert_to_double()

double smet::SMETCommon::convert_to_double ( const std::string &  in_string)
static

◆ convert_to_int()

int smet::SMETCommon::convert_to_int ( const std::string &  in_string)
static

◆ copy_file()

void smet::SMETCommon::copy_file ( const std::string &  src,
const std::string &  dest 
)
static

◆ fileExists()

bool smet::SMETCommon::fileExists ( const std::string &  filename)
static

◆ getEoln()

char smet::SMETCommon::getEoln ( std::istream &  fin)
static

◆ is_decimal()

bool smet::SMETCommon::is_decimal ( const std::string &  value)
static

◆ readKeyValuePair()

bool smet::SMETCommon::readKeyValuePair ( const std::string &  in_line,
const std::string &  delimiter,
std::map< std::string, std::string > &  out_map 
)
static

◆ readLineToVec() [1/2]

size_t smet::SMETCommon::readLineToVec ( const std::string &  line_in,
std::vector< std::string > &  vecString 
)
static

◆ readLineToVec() [2/2]

size_t smet::SMETCommon::readLineToVec ( const std::string &  line_in,
std::vector< std::string > &  vecString,
const char &  delim 
)
static

◆ stripComments()

void smet::SMETCommon::stripComments ( std::string &  str)
static

◆ strToLower()

std::string smet::SMETCommon::strToLower ( std::string  str)
static

◆ toUpper()

void smet::SMETCommon::toUpper ( std::string &  str)
static

◆ trim()

void smet::SMETCommon::trim ( std::string &  str)
static

◆ validFileAndPath()

bool smet::SMETCommon::validFileAndPath ( const std::string &  filename)
static

Member Data Documentation

◆ all_decimal_header_values

set< string > smet::SMETCommon::all_decimal_header_values = set<std::string>()
static

◆ all_mandatory_header_keys

set< string > smet::SMETCommon::all_mandatory_header_keys = set<std::string>()
static

◆ all_optional_header_keys

set< string > smet::SMETCommon::all_optional_header_keys = set<std::string>()
static

◆ smet_version

const char * smet::SMETCommon::smet_version = "1.1"
static

The documentation for this class was generated from the following files: