eRPC Generator (erpcgen)  Rev. 1.12.0
NXP Semiconductors
OptIstreamIter Class Reference

#include <options.hpp>

Inheritance diagram for OptIstreamIter:
OptIter

Public Member Functions

 OptIstreamIter (std::istream &input)
 
virtual const char * curr (void) override
 
virtual void next (void) override
 next() advances to the next item.
 
virtual const char * operator() (void) override
 

Static Public Attributes

static const unsigned MAX_LINE_LEN
 

Detailed Description

OptIstreamIter is a class for iterating over arguments that come from an input stream. Each line of the input stream is considered to be a set of white-space separated tokens. If the the first non-white character on a line is '#' ('!' for VMS systems) then the line is considered a comment and is ignored.

Note
If a line is more than 1022 characters in length then we treat it as if it were several lines of length 1022 or less.
The string tokens returned by this iterator are pointers to temporary buffers which may not necessarily stick around for too long after the call to curr() or operator(), hence if you need the string value to persist - you will need to make a copy.

Member Function Documentation

const char * OptIstreamIter::curr ( void  )
overridevirtual

curr() returns the current item in the iterator without advancing on to the next item. If we are at the end of items then NULL is returned.

Implements OptIter.

const char * OptIstreamIter::operator() ( void  )
overridevirtual

operator() returns the current item in the iterator and then advances on to the next item. If we are at the end of items then NULL is returned.

Reimplemented from OptIter.


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