Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::tlp::Token Struct Reference

#include <ogdf/fileformats/TlpLexer.h>

Public Types

enum  Type { Type::leftParen, Type::rightParen, Type::identifier, Type::string }
 

Public Member Functions

 Token (const Type &type, size_t line, size_t column)
 
bool identifier () const
 
bool identifier (const char *str) const
 
bool leftParen () const
 
bool rightParen () const
 
bool string () const
 
bool string (const char *str) const
 

Public Attributes

size_t column
 
size_t line
 
enum ogdf::tlp::Token::Type type
 
std::string * value
 

Friends

std::ostream & operator<< (std::istream &os, const Token &token)
 

Detailed Description

Definition at line 43 of file TlpLexer.h.

Member Enumeration Documentation

◆ Type

Enumerator
leftParen 
rightParen 
identifier 
string 

Definition at line 44 of file TlpLexer.h.

Constructor & Destructor Documentation

◆ Token()

ogdf::tlp::Token::Token ( const Type type,
size_t  line,
size_t  column 
)

Member Function Documentation

◆ identifier() [1/2]

bool ogdf::tlp::Token::identifier ( ) const
inline

Definition at line 56 of file TlpLexer.h.

◆ identifier() [2/2]

bool ogdf::tlp::Token::identifier ( const char *  str) const
inline

Definition at line 58 of file TlpLexer.h.

◆ leftParen()

bool ogdf::tlp::Token::leftParen ( ) const
inline

Definition at line 52 of file TlpLexer.h.

◆ rightParen()

bool ogdf::tlp::Token::rightParen ( ) const
inline

Definition at line 54 of file TlpLexer.h.

◆ string() [1/2]

bool ogdf::tlp::Token::string ( ) const
inline

Definition at line 62 of file TlpLexer.h.

◆ string() [2/2]

bool ogdf::tlp::Token::string ( const char *  str) const
inline

Definition at line 64 of file TlpLexer.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::istream &  os,
const Token token 
)
friend

Member Data Documentation

◆ column

size_t ogdf::tlp::Token::column

Definition at line 47 of file TlpLexer.h.

◆ line

size_t ogdf::tlp::Token::line

Definition at line 47 of file TlpLexer.h.

◆ type

enum ogdf::tlp::Token::Type ogdf::tlp::Token::type

◆ value

std::string* ogdf::tlp::Token::value

Definition at line 46 of file TlpLexer.h.


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