MeteoIODoc 2.11.0
mio::CsvParameters Class Reference

#include <CsvParams.h>

Public Member Functions

 CsvParameters (const double &tz_in)
 
void setHeaderRepeatMk (const std::string &marker)
 
void setDelimiter (const std::string &delim)
 
void setHeaderDelimiter (const std::string &delim)
 
void setSkipFields (const std::string &skipFieldSpecs, const bool &negate)
 
void setUnits (const std::string &csv_units, const char &delim=' ')
 
void setLinesExclusions (const std::vector< LinesRange > &linesSpecs)
 
void setNodata (const std::string &nodata_markers)
 
void setPurgeChars (const std::string &chars_to_purge)
 
void setFile (const std::string &i_file_and_path, const std::vector< std::string > &vecMetaSpec, const std::string &filename_spec, const std::string &station_idx="")
 
void setLocation (const Coords i_location, const std::string &i_name, const std::string &i_id)
 
void setSlope (const double &i_slope, const double &i_azimuth)
 
void setDateTimeSpecs (const std::string &datetime_spec, const std::string &date_spec, const std::string &time_spec, const std::string &decimaldate_type)
 
void setFixedYear (const int &i_year, const bool &i_auto_wrap)
 
void setFixedHour (const int &i_hour)
 
std::string toString () const
 
std::string getFilename () const
 
StationData getStation () const
 
Date getDate (const std::vector< std::string > &vecFields)
 
bool excludeLine (const size_t &linenr, bool &hasExclusions)
 
bool skipField (const size_t &fieldnr) const
 
bool hasPurgeChars () const
 
void purgeChars (std::string &line)
 
bool isNodata (const std::string &value) const
 

Public Attributes

std::vector< std::string > csv_fields
 the user provided list of field names More...
 
std::vector< double > units_offset
 
std::vector< double > units_multiplier
 offsets and multipliers to convert the data to SI More...
 
std::vector< double > field_offset
 
std::vector< double > field_multiplier
 offsets and multipliers to apply to each field More...
 
std::string header_repeat_mk
 
std::string filter_ID
 
std::string fields_postfix
 
size_t ID_col
 
size_t header_lines
 
size_t columns_headers
 
size_t units_headers
 
char csv_delim
 
char header_delim
 
char eoln
 
char comments_mk
 
bool header_repeat_at_start
 
bool asc_order
 
bool number_fields
 include a column number in the field names as well as an optional field_postfix (this helps when debugging invalid/changing column order) More...
 

Constructor & Destructor Documentation

◆ CsvParameters()

mio::CsvParameters::CsvParameters ( const double &  tz_in)

Member Function Documentation

◆ excludeLine()

bool mio::CsvParameters::excludeLine ( const size_t &  linenr,
bool &  hasExclusions 
)

◆ getDate()

Date mio::CsvParameters::getDate ( const std::vector< std::string > &  vecFields)
inline

◆ getFilename()

std::string mio::CsvParameters::getFilename ( ) const
inline

◆ getStation()

StationData mio::CsvParameters::getStation ( ) const

◆ hasPurgeChars()

bool mio::CsvParameters::hasPurgeChars ( ) const
inline

◆ isNodata()

bool mio::CsvParameters::isNodata ( const std::string &  value) const

◆ purgeChars()

void mio::CsvParameters::purgeChars ( std::string &  line)
inline

◆ setDateTimeSpecs()

void mio::CsvParameters::setDateTimeSpecs ( const std::string &  datetime_spec,
const std::string &  date_spec,
const std::string &  time_spec,
const std::string &  decimaldate_type 
)

◆ setDelimiter()

void mio::CsvParameters::setDelimiter ( const std::string &  delim)

◆ setFile()

void mio::CsvParameters::setFile ( const std::string &  i_file_and_path,
const std::vector< std::string > &  vecMetaSpec,
const std::string &  filename_spec,
const std::string &  station_idx = "" 
)

◆ setFixedHour()

void mio::CsvParameters::setFixedHour ( const int &  i_hour)
inline

◆ setFixedYear()

void mio::CsvParameters::setFixedYear ( const int &  i_year,
const bool &  i_auto_wrap 
)
inline

◆ setHeaderDelimiter()

void mio::CsvParameters::setHeaderDelimiter ( const std::string &  delim)

◆ setHeaderRepeatMk()

void mio::CsvParameters::setHeaderRepeatMk ( const std::string &  marker)
inline

◆ setLinesExclusions()

void mio::CsvParameters::setLinesExclusions ( const std::vector< LinesRange > &  linesSpecs)
inline

◆ setLocation()

void mio::CsvParameters::setLocation ( const Coords  i_location,
const std::string &  i_name,
const std::string &  i_id 
)
inline

◆ setNodata()

void mio::CsvParameters::setNodata ( const std::string &  nodata_markers)

◆ setPurgeChars()

void mio::CsvParameters::setPurgeChars ( const std::string &  chars_to_purge)

◆ setSkipFields()

void mio::CsvParameters::setSkipFields ( const std::string &  skipFieldSpecs,
const bool &  negate 
)

◆ setSlope()

void mio::CsvParameters::setSlope ( const double &  i_slope,
const double &  i_azimuth 
)
inline

◆ setUnits()

void mio::CsvParameters::setUnits ( const std::string &  csv_units,
const char &  delim = ' ' 
)

◆ skipField()

bool mio::CsvParameters::skipField ( const size_t &  fieldnr) const

◆ toString()

std::string mio::CsvParameters::toString ( ) const

Member Data Documentation

◆ asc_order

bool mio::CsvParameters::asc_order

◆ columns_headers

size_t mio::CsvParameters::columns_headers

◆ comments_mk

char mio::CsvParameters::comments_mk

◆ csv_delim

char mio::CsvParameters::csv_delim

◆ csv_fields

std::vector<std::string> mio::CsvParameters::csv_fields

the user provided list of field names

◆ eoln

char mio::CsvParameters::eoln

◆ field_multiplier

std::vector<double> mio::CsvParameters::field_multiplier

offsets and multipliers to apply to each field

◆ field_offset

std::vector<double> mio::CsvParameters::field_offset

◆ fields_postfix

std::string mio::CsvParameters::fields_postfix

◆ filter_ID

std::string mio::CsvParameters::filter_ID

◆ header_delim

char mio::CsvParameters::header_delim

◆ header_lines

size_t mio::CsvParameters::header_lines

◆ header_repeat_at_start

bool mio::CsvParameters::header_repeat_at_start

◆ header_repeat_mk

std::string mio::CsvParameters::header_repeat_mk

◆ ID_col

size_t mio::CsvParameters::ID_col

◆ number_fields

bool mio::CsvParameters::number_fields

include a column number in the field names as well as an optional field_postfix (this helps when debugging invalid/changing column order)

◆ units_headers

size_t mio::CsvParameters::units_headers

◆ units_multiplier

std::vector<double> mio::CsvParameters::units_multiplier

offsets and multipliers to convert the data to SI

◆ units_offset

std::vector<double> mio::CsvParameters::units_offset

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