ICG 2
Electric Boogaloo
Functions
ICGUtils Namespace Reference

Functions

std::string makeVarname (const std::string &typename_to_modify)
 Take a given typename and modify it so that it can be used in a variable name. More...
 
std::string makeIOHeaderName (std::string header_name)
 Make the name of the output header file. For now, this is just io_<header_name> More...
 
bool isStlContainer (std::string some_typename)
 Is the typename an STL container? More...
 
void ReplaceAll_inplace (std::string &str, const std::string &from, const std::string &to)
 

Function Documentation

◆ isStlContainer()

bool ICGUtils::isStlContainer ( std::string  some_typename)

Is the typename an STL container?

Parameters
some_typenamename of a type
Returns
true if it is, false otherwise

◆ makeIOHeaderName()

std::string ICGUtils::makeIOHeaderName ( std::string  header_name)

Make the name of the output header file. For now, this is just io_<header_name>

Parameters
header_nameinput header name
Returns
std::string output header name

◆ makeVarname()

std::string ICGUtils::makeVarname ( const std::string &  typename_to_modify)

Take a given typename and modify it so that it can be used in a variable name.

Note
Types are often used as variable names in the code generated by ICG, so we need to create a version that follow variable name character rules and also won't collide with anything. Since these are in generated code, they don't have to be pretty, but they should be readable As a kindness to myself and future Trick developers
Parameters
typename_to_modify
Returns
std::string version of the type that can be used in a varname

◆ ReplaceAll_inplace()

void ICGUtils::ReplaceAll_inplace ( std::string &  str,
const std::string &  from,
const std::string &  to 
)