![]() |
Rosetta
3.7
|
Various helper functions. More...
#include <util.hpp>
#include <enum.hpp>
#include <type.hpp>
#include <class.hpp>
#include <clang/AST/ASTContext.h>
#include <clang/AST/ExprCXX.h>
#include <clang/AST/Comment.h>
#include <cstdlib>
#include <fstream>
Namespaces | |
binder | |
Functions | |
vector< string > | binder::split (string const &buffer, string const &separator) |
Split string using given separator. More... | |
void | binder::replace (string &r, string const &from, string const &to) |
Replace all occurrences of string. More... | |
string | binder::replace_ (string const &s, string const &from, string const &to) |
Replace all occurrences of string and return result as new string. More... | |
bool | binder::begins_with (std::string const &source, std::string const &prefix) |
check if string begins with given prefix More... | |
bool | binder::ends_with (std::string const &source, std::string const &prefix) |
check if string ends with given prefix More... | |
string | binder::indent (std::string const &code, std::string const &indentation) |
indent given code More... | |
void | binder::update_source_file (std::string const &prefix, std::string const &file_name, std::string const &code) |
Try to read exisitng file and if content does not match to code - write a new version. Also create nested dirs starting from prefix if nessesary. More... | |
string | binder::namespace_from_named_decl (NamedDecl const *decl) |
string | binder::typename_from_type_decl (TypeDecl *decl) |
generate unique string representation of type represented by given declaration More... | |
string | binder::base_namespace (string const &ns) |
Calculate base (upper) namespace for given one: core::pose::motif –> core::pose. More... | |
string | binder::last_namespace (string const &ns) |
Calculate last namespace for given one: core::pose::motif –> motif. More... | |
void | binder::fix_boolean_types (std::string &type) |
replace all _Bool types with bool More... | |
string | binder::expresion_to_string (clang::Expr *e) |
Generate string representation of given expression. More... | |
string | binder::template_argument_to_string (clang::TemplateArgument const &) |
Generate string representation of given TemplateArgument. More... | |
string | binder::line_number (NamedDecl const *decl) |
string | binder::mangle_type_name (string const &name, bool mark_template) |
string | binder::generate_comment_for_declaration (clang::NamedDecl const *decl) |
string | binder::get_text (comments::Comment const *C, SourceManager const &SM, SourceLocation previous) |
std::string | binder::generate_documentation_string_for_declaration (clang::Decl const *decl) |
Various helper functions.