Go to the documentation of this file.
26 #include <SimoxUtility/algorithm/string/string_tools.h>
34 const std::string& name,
35 const std::string& default_value,
36 const std::string& doc) :
37 type(type), name(name), default_value(default_value), doc(doc)
41 throw armarx::LocalException(
"Type of a CppField must not be empty!");
69 for (
const auto& line : lines)
71 writer->body.line(
"/// " + line);
76 (name !=
"" ?
" " + name + (default_value !=
"" ?
" = " + default_value :
"") :
""));
84 writer->body.line(decl);
void setDoc(const std::string &documentation)
CppField(const std::string &type, const std::string &name, const std::string &default_value="", const std::string &doc="")
std::string getType() const
std::string getName() const
bool ends_with(const std::string &haystack, const std::string &needle)
std::shared_ptr< CppWriter > CppWriterPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
void writeCpp(const CppWriterPtr &writer)
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)