OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Public Member Functions | Private Attributes | List of all members
SDDS::parser::ValueParser Class Reference

#include <value_parser.hpp>

Public Member Functions

 ValueParser (std::string_view input, std::size_t start_pos=0)
 
void skipWSAndComments ()
 
template<typename T >
bool parseNumeric (T &value)
 
bool parseInteger (long &value)
 
bool parseFloat (float &value)
 
bool parseDouble (double &value)
 
bool parseShort (short &value)
 
bool parseLong (long &value)
 
bool parseChar (char &value)
 
bool parseQuotedString (std::string &value)
 
bool parseString (std::string &value)
 
bool parseStringToEol (std::string &value)
 
std::size_t getPosition () const
 
void setPosition (std::size_t pos)
 

Private Attributes

std::string_view input_
 
std::size_t pos_
 

Detailed Description

Definition at line 31 of file value_parser.hpp.

Constructor & Destructor Documentation

◆ ValueParser()

SDDS::parser::ValueParser::ValueParser ( std::string_view  input,
std::size_t  start_pos = 0 
)
inline

Definition at line 33 of file value_parser.hpp.

Member Function Documentation

◆ getPosition()

std::size_t SDDS::parser::ValueParser::getPosition ( ) const
inline

Definition at line 206 of file value_parser.hpp.

References pos_.

Referenced by SDDS::column::parse(), and SDDS::parameter::parse().

◆ parseChar()

bool SDDS::parser::ValueParser::parseChar ( char &  value)
inline

Definition at line 123 of file value_parser.hpp.

References input_, pos_, and skipWSAndComments().

Referenced by SDDS::column::parse(), and SDDS::parameter::parse().

Here is the call graph for this function:

◆ parseDouble()

bool SDDS::parser::ValueParser::parseDouble ( double &  value)
inline

Definition at line 112 of file value_parser.hpp.

References parseNumeric().

Referenced by SDDS::column::parse(), and SDDS::parameter::parse().

Here is the call graph for this function:

◆ parseFloat()

bool SDDS::parser::ValueParser::parseFloat ( float &  value)
inline

Definition at line 111 of file value_parser.hpp.

References parseNumeric().

Referenced by SDDS::column::parse(), and SDDS::parameter::parse().

Here is the call graph for this function:

◆ parseInteger()

bool SDDS::parser::ValueParser::parseInteger ( long &  value)
inline

Definition at line 86 of file value_parser.hpp.

References input_, pos_, and skipWSAndComments().

Referenced by parseLong(), and parseShort().

Here is the call graph for this function:

◆ parseLong()

bool SDDS::parser::ValueParser::parseLong ( long &  value)
inline

Definition at line 121 of file value_parser.hpp.

References parseInteger().

Referenced by SDDS::column::parse(), and SDDS::parameter::parse().

Here is the call graph for this function:

◆ parseNumeric()

template<typename T >
bool SDDS::parser::ValueParser::parseNumeric ( T &  value)
inline

Definition at line 42 of file value_parser.hpp.

References input_, pos_, and skipWSAndComments().

Referenced by parseDouble(), and parseFloat().

Here is the call graph for this function:

◆ parseQuotedString()

bool SDDS::parser::ValueParser::parseQuotedString ( std::string &  value)
inline

Definition at line 133 of file value_parser.hpp.

References input_, pos_, and skipWSAndComments().

Referenced by parseString(), and parseStringToEol().

Here is the call graph for this function:

◆ parseShort()

bool SDDS::parser::ValueParser::parseShort ( short &  value)
inline

Definition at line 114 of file value_parser.hpp.

References parseInteger().

Referenced by SDDS::column::parse(), and SDDS::parameter::parse().

Here is the call graph for this function:

◆ parseString()

bool SDDS::parser::ValueParser::parseString ( std::string &  value)
inline

Definition at line 156 of file value_parser.hpp.

References input_, parseQuotedString(), pos_, and skipWSAndComments().

Referenced by SDDS::column::parse().

Here is the call graph for this function:

◆ parseStringToEol()

bool SDDS::parser::ValueParser::parseStringToEol ( std::string &  value)
inline

Definition at line 181 of file value_parser.hpp.

References end(), input_, parseQuotedString(), pos_, and skipWSAndComments().

Referenced by SDDS::parameter::parse().

Here is the call graph for this function:

◆ setPosition()

void SDDS::parser::ValueParser::setPosition ( std::size_t  pos)
inline

Definition at line 207 of file value_parser.hpp.

References pos_.

◆ skipWSAndComments()

void SDDS::parser::ValueParser::skipWSAndComments ( )
inline

Definition at line 36 of file value_parser.hpp.

References input_, pos_, and SDDS::parser::skipper::skipWhitespaceAndComments().

Referenced by parseChar(), parseInteger(), parseNumeric(), parseQuotedString(), parseString(), and parseStringToEol().

Here is the call graph for this function:

Member Data Documentation

◆ input_

std::string_view SDDS::parser::ValueParser::input_
private

◆ pos_

std::size_t SDDS::parser::ValueParser::pos_
private

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