LILAC
Language to language Interop LAyer Compiler
Loading...
Searching...
No Matches
lilac::shared::FrontendAction Class Referenceabstract

An action that generates interface representation from codes. More...

#include <frontend.h>

Inheritance diagram for lilac::shared::FrontendAction:

Public Member Functions

 FrontendAction (FrontendKind kind, std::string name, std::string desc)
 
virtual ~FrontendAction ()=default
 
const std::string & Name () const
 Gets the name of this action.
 
const std::string & Desc () const
 Gets the description of this action.
 
FrontendKind Kind () const
 Gets the kind of this action.
 
virtual int Run (std::string output, std::vector< std::string > argv) const =0
 

Static Public Member Functions

static const std::vector< FrontendAction * > & GetRegistered ()
 Gets all registered actions.
 

Detailed Description

An action that generates interface representation from codes.

Definition at line 35 of file frontend.h.

Constructor & Destructor Documentation

◆ FrontendAction()

lilac::shared::FrontendAction::FrontendAction ( FrontendKind kind,
std::string name,
std::string desc )

Definition at line 25 of file frontend.cxx.

◆ ~FrontendAction()

virtual lilac::shared::FrontendAction::~FrontendAction ( )
virtualdefault

Member Function Documentation

◆ Desc()

const std::string & lilac::shared::FrontendAction::Desc ( ) const
nodiscard

Gets the description of this action.

Returns
The description of this action

Definition at line 36 of file frontend.cxx.

◆ GetRegistered()

const std::vector< lilac::shared::FrontendAction * > & lilac::shared::FrontendAction::GetRegistered ( )
static

Gets all registered actions.

Returns
All registered actions

Definition at line 46 of file frontend.cxx.

◆ Kind()

lilac::shared::FrontendKind lilac::shared::FrontendAction::Kind ( ) const
nodiscard

Gets the kind of this action.

Returns
The kind of this action

Definition at line 41 of file frontend.cxx.

◆ Name()

const std::string & lilac::shared::FrontendAction::Name ( ) const
nodiscard

Gets the name of this action.

Returns
The name of this action

Definition at line 31 of file frontend.cxx.

◆ Run()

virtual int lilac::shared::FrontendAction::Run ( std::string output,
std::vector< std::string > argv ) const
nodiscardpure virtual
Parameters
outputA path to place output
argvAdditional language-specific arguments
Returns
Zero if action completed successfully; otherwise, non-zero returned

Implemented in CXXFrontendAction.


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