NAGASH 0.9.8
Next Generation Analysis System
Loading...
Searching...
No Matches
Functions | Variables
CodeGenerator.cxx File Reference
#include "NAGASH/Global.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 
void nestedforloop (size_t layer, std::string newcode, std::ofstream &out)
 
std::size_t replace_all (std::string &inout, std::string_view what, std::string_view with)
 
void trim_back (std::string &s)
 

Variables

std::string Code {""}
 
std::string line
 
std::vector< std::vector< std::string > > Token
 
std::vector< std::vector< std::vector< std::string > > > TokenReplacement
 

Detailed Description

This allow you to fast generate some code use substitution, see following example:

Author
Chen Wang, Wenhao Ma

Definition in file CodeGenerator.cxx.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 58 of file CodeGenerator.cxx.

◆ nestedforloop()

void nestedforloop ( size_t  layer,
std::string  newcode,
std::ofstream &  out 
)

Definition at line 35 of file CodeGenerator.cxx.

◆ replace_all()

std::size_t replace_all ( std::string &  inout,
std::string_view  what,
std::string_view  with 
)

Definition at line 23 of file CodeGenerator.cxx.

◆ trim_back()

void trim_back ( std::string &  s)

Definition at line 15 of file CodeGenerator.cxx.

Variable Documentation

◆ Code

std::string Code {""}

Definition at line 13 of file CodeGenerator.cxx.

◆ line

std::string line

Definition at line 12 of file CodeGenerator.cxx.

◆ Token

std::vector<std::vector<std::string> > Token

Definition at line 10 of file CodeGenerator.cxx.

◆ TokenReplacement

std::vector<std::vector<std::vector<std::string> > > TokenReplacement

Definition at line 11 of file CodeGenerator.cxx.