cartobase 6.0.6
carto::SyntaxReader Class Reference

Read a SyntaxSet from a file. More...

#include <cartobase/object/sreader.h>

Public Member Functions

Constructors, destructor
 SyntaxReader (const std::string &filename)
 
virtual ~SyntaxReader ()
 
Read
void read (SyntaxSet &rules)
 read the referenced attributes from a stream
 

Helpers

std::string readUntil (const std::string &s)
 read characters not in s
 
void skipWhile (const std::string &s)
 skip characters in s
 

Detailed Description

Read a SyntaxSet from a file.

Definition at line 57 of file sreader.h.

Constructor & Destructor Documentation

◆ SyntaxReader()

carto::SyntaxReader::SyntaxReader ( const std::string & filename)

Referenced by skipWhile().

◆ ~SyntaxReader()

virtual carto::SyntaxReader::~SyntaxReader ( )
virtual

Member Function Documentation

◆ read()

void carto::SyntaxReader::read ( SyntaxSet & rules)

read the referenced attributes from a stream

Returns
syntactic attribute / associated rule pairs

Referenced by skipWhile().

◆ readUntil()

std::string carto::SyntaxReader::readUntil ( const std::string & s)
protected

read characters not in s

Parameters
scontinue while characters outside s
Returns
accepted characters

◆ skipWhile()

void carto::SyntaxReader::skipWhile ( const std::string & s)
protected

skip characters in s

Parameters
scontinue while characters in s

References read(), and SyntaxReader().


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