Files
sdbus-cpp/tools/xml2cpp-codegen/generator_utils.h
ChristianS99 fb0a70a831 Fix #101: sanitize names of namespaces/methods/signals/properties/arguments (#102)
- add a list of c++ keywords and common defines
- sanitize names so that there are no functions/args with names that are reserved in c++

Co-authored-by: Christian Schneider <cschneider@radiodata.biz>
2020-05-16 22:57:37 +02:00

25 lines
667 B
C++

/**
* Inspired by: http://dbus-cplusplus.sourceforge.net/
*/
#ifndef __SDBUSCPP_TOOLS_GENERATOR_UTILS_H
#define __SDBUSCPP_TOOLS_GENERATOR_UTILS_H
#include <string>
#include <sstream>
#include <iomanip>
const char *atomic_type_to_string(char t);
std::string stub_name(const std::string& name);
std::string signature_to_type(const std::string& signature);
std::string underscorize(const std::string& str);
constexpr const char* getHeaderComment() noexcept { return "\n/*\n * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!\n */\n\n"; }
std::string mangle_name (const std::string& name);
#endif //__SDBUSCPP_TOOLS_GENERATOR_UTILS_H