clang-metatool
A framework for reusing code in clang tools
Public Member Functions | List of all members
clangmetatool::MetaToolFactory< T > Class Template Reference

#include <clangmetatool/meta_tool_factory.h>

Inheritance diagram for clangmetatool::MetaToolFactory< T >:
Inheritance graph
[legend]
Collaboration diagram for clangmetatool::MetaToolFactory< T >:
Collaboration graph
[legend]

Public Member Functions

 MetaToolFactory (std::map< std::string, clang::tooling::Replacements > &replacements, typename T::ArgTypes &args)
 
 MetaToolFactory (std::map< std::string, clang::tooling::Replacements > &replacements)
 
virtual clang::FrontendAction * create ()
 

Detailed Description

template<class T>
class clangmetatool::MetaToolFactory< T >

MetaToolFactory wraps around FrontendAction class that takes a replacementsMap as argument to the construtor. You can use it in conjunction with the MetaTool class to reduce boilerplate in the code requjired to write a clang tool.

Definition at line 19 of file meta_tool_factory.h.

Constructor & Destructor Documentation

◆ MetaToolFactory() [1/2]

template<class T >
clangmetatool::MetaToolFactory< T >::MetaToolFactory ( std::map< std::string, clang::tooling::Replacements > &  replacements,
typename T::ArgTypes &  args 
)
inline

Metatool factory takes a reference to the replacements map that will be used for this run in, along with any additional arguments that need to be passed on to the Tool

Definition at line 35 of file meta_tool_factory.h.

◆ MetaToolFactory() [2/2]

template<class T >
clangmetatool::MetaToolFactory< T >::MetaToolFactory ( std::map< std::string, clang::tooling::Replacements > &  replacements)
inline

Definition at line 40 of file meta_tool_factory.h.

Member Function Documentation

◆ create()

template<class T >
virtual clang::FrontendAction* clangmetatool::MetaToolFactory< T >::create ( )
inlinevirtual

This will create the object of your tool giving the replacemnets map as an argument.

Definition at line 48 of file meta_tool_factory.h.


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