20#ifndef SCH_IO_KICAD_LEGACY_HELPERS_H_ 
   21#define SCH_IO_KICAD_LEGACY_HELPERS_H_ 
   26#define SCH_PARSE_ERROR( text, reader, pos )                         \ 
   27    THROW_PARSE_ERROR( text, reader.GetSource(), reader.Line(),      \ 
   28                       reader.LineNumber(), pos - reader.Line() ) 
 
   35extern bool is_eol( 
char c );
 
   46extern bool strCompare( 
const char* aString, 
const char* aLine, 
const char** aOutput = 
nullptr );
 
   61extern int parseInt( 
LINE_READER& aReader, 
const char* aLine, 
const char** aOutput = 
nullptr );
 
   76extern uint32_t 
parseHex( 
LINE_READER& aReader, 
const char* aLine, 
const char** aOutput = 
nullptr );
 
   92                           const char** aOutput = 
nullptr );
 
  106                       const char** aNextToken = 
nullptr );
 
  123                                 const char** aNextToken = 
nullptr, 
bool aCanBeEmpty = 
false );
 
  141                               const char** aNextToken = 
nullptr, 
bool aCanBeEmpty = 
false );
 
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
 
uint32_t parseHex(LINE_READER &aReader, const char *aLine, const char **aOutput=nullptr)
Parse an ASCII hex integer string with possible leading whitespace into a long integer and updates th...
 
void parseQuotedString(wxString &aString, LINE_READER &aReader, const char *aCurrentToken, const char **aNextToken=nullptr, bool aCanBeEmpty=false)
Parse an quoted ASCII utf8 and updates the pointer at aOutput if it is not NULL.
 
void parseUnquotedString(wxString &aString, LINE_READER &aReader, const char *aCurrentToken, const char **aNextToken=nullptr, bool aCanBeEmpty=false)
Parse an unquoted utf8 string and updates the pointer at aOutput if it is not NULL.
 
bool strCompare(const char *aString, const char *aLine, const char **aOutput=nullptr)
Compare aString to the string starting at aLine and advances the character point to the end of String...
 
char parseChar(LINE_READER &aReader, const char *aCurrentToken, const char **aNextToken=nullptr)
Parse a single ASCII character and updates the pointer at aOutput if it is not NULL.
 
double parseDouble(LINE_READER &aReader, const char *aLine, const char **aOutput=nullptr)
Parses an ASCII point string with possible leading whitespace into a double precision floating point ...
 
int parseInt(LINE_READER &aReader, const char *aLine, const char **aOutput=nullptr)
Parse an ASCII integer string with possible leading whitespace into an integer and updates the pointe...