PLYwoot
Header-only C++17 library for parsing and writing PLY files
Loading...
Searching...
No Matches
plywoot::UnexpectedToken Struct Reference

Exception thrown in case the input contains an unexpected token. More...

#include <header_parser.hpp>

Inheritance diagram for plywoot::UnexpectedToken:
plywoot::HeaderParserException plywoot::Exception

Public Member Functions

 UnexpectedToken (detail::HeaderScanner::Token expected, detail::HeaderScanner::Token found, const std::string &tokenString)
 
 UnexpectedToken (std::vector< detail::HeaderScanner::Token > expected, detail::HeaderScanner::Token found, const std::string &tokenString)
 
const std::vector< detail::HeaderScanner::Token > & expected () const
 
detail::HeaderScanner::Token found () const
 
- Public Member Functions inherited from plywoot::HeaderParserException
 HeaderParserException (const std::string &message)
 
- Public Member Functions inherited from plywoot::Exception
 Exception (const std::string &message)
 

Detailed Description

Exception thrown in case the input contains an unexpected token.

Definition at line 62 of file header_parser.hpp.

Constructor & Destructor Documentation

◆ UnexpectedToken() [1/2]

plywoot::UnexpectedToken::UnexpectedToken ( detail::HeaderScanner::Token  expected,
detail::HeaderScanner::Token  found,
const std::string &  tokenString 
)
inline

Constructs an unexpected token header parser exception.

Parameters
expectedtoken that was expected
foundtoken that was found
tokenStringtextual representation of the token that was found

Definition at line 69 of file header_parser.hpp.

◆ UnexpectedToken() [2/2]

plywoot::UnexpectedToken::UnexpectedToken ( std::vector< detail::HeaderScanner::Token >  expected,
detail::HeaderScanner::Token  found,
const std::string &  tokenString 
)
inline

Constructs an unexpected token header parser exception for cases where the expected token is not clearly defined.

Parameters
expectedlist of tokens that were expected
foundtoken that was found
tokenStringtextual representation of the token that was found

Definition at line 83 of file header_parser.hpp.

Member Function Documentation

◆ expected()

const std::vector< detail::HeaderScanner::Token > & plywoot::UnexpectedToken::expected ( ) const
inline

Returns the list of expected tokens.

Returns
the list of expected tokens

Definition at line 105 of file header_parser.hpp.

◆ found()

detail::HeaderScanner::Token plywoot::UnexpectedToken::found ( ) const
inline

Returns the token that was found instead of the expected token.

Returns
the token that was found instead of the expected token

Definition at line 109 of file header_parser.hpp.


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