LILAC
Language to language Interop LAyer Compiler
Loading...
Searching...
No Matches
lilac::shared::InterfaceVisitor< TContext > Class Template Referenceabstract

A helper class to traverse interface graph. More...

#include <interfacevisitor.h>

Inheritance diagram for lilac::shared::InterfaceVisitor< TContext >:

Public Member Functions

virtual ~InterfaceVisitor ()=default
 
virtual std::string GetName () const =0
 Gets the name of this interface visitor.
 
virtual void Begin (TContext &ctx, const frxml::dom &parent, const frxml::dom &current, int depth)=0
 
virtual void End (TContext &ctx, const frxml::dom &parent, const frxml::dom &current, int depth)=0
 

Detailed Description

template<typename TContext>
class lilac::shared::InterfaceVisitor< TContext >

A helper class to traverse interface graph.

To implement transformer of interface graph, Implement visitor derived from lilac::shared::InterfaceVisitor.

Template Parameters
TContextType of context object

Definition at line 39 of file interfacevisitor.h.

Constructor & Destructor Documentation

◆ ~InterfaceVisitor()

template<typename TContext >
virtual lilac::shared::InterfaceVisitor< TContext >::~InterfaceVisitor ( )
virtualdefault

Member Function Documentation

◆ Begin()

template<typename TContext >
virtual void lilac::shared::InterfaceVisitor< TContext >::Begin ( TContext & ctx,
const frxml::dom & parent,
const frxml::dom & current,
int depth )
pure virtual
Parameters
ctxContext object for interface visitors
parentParent DOM object
currentCurrent DOM object
depthDepth of current DOM object

Implemented in lilac::shared::AssemblyVisitor< TContext >, lilac::shared::AssemblyVisitor< VisitContext >, and lilac::shared::GenericInterfaceVisitor< TContext, TVisitor >.

◆ End()

template<typename TContext >
virtual void lilac::shared::InterfaceVisitor< TContext >::End ( TContext & ctx,
const frxml::dom & parent,
const frxml::dom & current,
int depth )
pure virtual
Parameters
ctxContext object for interface visitors
parentParent DOM object
currentCurrent DOM object
depthDepth of current DOM object

Implemented in lilac::shared::AssemblyVisitor< TContext >, lilac::shared::AssemblyVisitor< VisitContext >, and lilac::shared::GenericInterfaceVisitor< TContext, TVisitor >.

◆ GetName()

template<typename TContext >
virtual std::string lilac::shared::InterfaceVisitor< TContext >::GetName ( ) const
nodiscardpure virtual

Gets the name of this interface visitor.

To traverse interface graph and matching proper visitor for XML tag, Interface visitors should have key corresponding to XML tag.

Interface visitor is reserved for special purpose if its name starts with ‘__’.

Returns
Name of this interface visitor

Implemented in lilac::csharp::CtorVisitor, lilac::csharp::DtorVisitor, lilac::csharp::EnumConstantVisitor, lilac::csharp::EnumVisitor, lilac::csharp::FunctionVisitor, lilac::csharp::MethodVisitor, lilac::csharp::NamespaceVisitor, lilac::csharp::RecordVisitor, lilac::shared::AssemblyVisitor< TContext >, lilac::shared::AssemblyVisitor< VisitContext >, and lilac::shared::GenericInterfaceVisitor< TContext, TVisitor >.


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