PLaSK library
Loading...
Searching...
No Matches
plask::XMLReader::CheckTagDuplication Class Reference

Util class that allow to check of duplication of tags. More...

#include <plask/utils/xml/reader.hpp>

Public Member Functions

void operator() (const std::string &scope, std::string name)
 Throw exception if tag with name name has been already seen and so is not allowed again.
 
void operator() (const XMLReader &scope, std::string name)
 Throw exception if tag with name name has been already seen and so is not allowed again.
 
void operator() (const XMLReader &reader)
 

Detailed Description

Util class that allow to check of duplication of tags.

Example usage: XMLReader::CheckTagDuplication dub_check; dub_checke(reader); reader.require_next(); dub_checke(reader); //throw if tag has the same name as previous one

Definition at line 278 of file reader.hpp.

Member Function Documentation

◆ operator()() [1/3]

void plask::XMLReader::CheckTagDuplication::operator() ( const std::string &  scope,
std::string  name 
)
inline

Throw exception if tag with name name has been already seen and so is not allowed again.

Parameters
scopescope, where tag duplication is not allowed (used in formatting of error message)
namename of tag

Definition at line 289 of file reader.hpp.

◆ operator()() [2/3]

void plask::XMLReader::CheckTagDuplication::operator() ( const XMLReader reader)
inline

Definition at line 304 of file reader.hpp.

◆ operator()() [3/3]

void plask::XMLReader::CheckTagDuplication::operator() ( const XMLReader scope,
std::string  name 
)
inline

Throw exception if tag with name name has been already seen and so is not allowed again.

Parameters
scopescope, where tag duplication is not allowed (used in formatting of error message)
namename of tag

Definition at line 299 of file reader.hpp.


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