CIRCT  20.0.0git
Static Public Member Functions | Protected Types | Protected Member Functions | List of all members
circt::pretty::TokenBase< DerivedT, DerivedKind > Struct Template Reference

Helper class to CRTP-derive common functions. More...

#include <PrettyPrinter.h>

Inheritance diagram for circt::pretty::TokenBase< DerivedT, DerivedKind >:
Inheritance graph
[legend]
Collaboration diagram for circt::pretty::TokenBase< DerivedT, DerivedKind >:
Collaboration graph
[legend]

Static Public Member Functions

static bool classof (const Token *t)
 

Protected Types

using InfoType = std::remove_reference_t< std::invoke_result_t< decltype(Token::getInfoImpl< DerivedKind, Token & >), Token & > >
 

Protected Member Functions

 TokenBase ()
 
InfoTypegetInfoMut ()
 
const InfoTypegetInfo () const
 
template<typename... Args>
void initialize (Args &&...args)
 
- Protected Member Functions inherited from circt::pretty::Token
 Token (Kind k)
 

Additional Inherited Members

- Public Types inherited from circt::pretty::Token
enum class  Kind {
  String , Break , Begin , End ,
  Callback
}
 
- Public Member Functions inherited from circt::pretty::Token
Kind getKind () const
 
- Static Protected Member Functions inherited from circt::pretty::Token
template<Kind k, typename T >
static auto & getInfoImpl (T &t)
 

Detailed Description

template<class DerivedT, Token::Kind DerivedKind>
struct circt::pretty::TokenBase< DerivedT, DerivedKind >

Helper class to CRTP-derive common functions.

Definition at line 115 of file PrettyPrinter.h.

Member Typedef Documentation

◆ InfoType

template<class DerivedT , Token::Kind DerivedKind>
using circt::pretty::TokenBase< DerivedT, DerivedKind >::InfoType = std::remove_reference_t<std::invoke_result_t< decltype(Token::getInfoImpl<DerivedKind, Token &>), Token &> >
protected

Definition at line 121 of file PrettyPrinter.h.

Constructor & Destructor Documentation

◆ TokenBase()

template<class DerivedT , Token::Kind DerivedKind>
circt::pretty::TokenBase< DerivedT, DerivedKind >::TokenBase ( )
inlineprotected

Definition at line 119 of file PrettyPrinter.h.

Member Function Documentation

◆ classof()

template<class DerivedT , Token::Kind DerivedKind>
static bool circt::pretty::TokenBase< DerivedT, DerivedKind >::classof ( const Token t)
inlinestatic

Definition at line 116 of file PrettyPrinter.h.

References circt::pretty::Token::getKind().

◆ getInfo()

template<class DerivedT , Token::Kind DerivedKind>
const InfoType& circt::pretty::TokenBase< DerivedT, DerivedKind >::getInfo ( ) const
inlineprotected

Definition at line 126 of file PrettyPrinter.h.

◆ getInfoMut()

template<class DerivedT , Token::Kind DerivedKind>
InfoType& circt::pretty::TokenBase< DerivedT, DerivedKind >::getInfoMut ( )
inlineprotected

◆ initialize()

template<class DerivedT , Token::Kind DerivedKind>
template<typename... Args>
void circt::pretty::TokenBase< DerivedT, DerivedKind >::initialize ( Args &&...  args)
inlineprotected

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