Go to the documentation of this file.
26 #include <SimoxUtility/algorithm/string/string_tools.h>
29 #include <boost/format.hpp>
33 CppMethod::CppMethod(
const std::string& header,
const std::string& doc,
const bool enforceBlockGeneration) :
36 enforceBlockGeneration(enforceBlockGeneration)
44 std::string delimiters =
"\n";
46 writer->body.line(
"/**");
48 for (
auto& line : doclines)
50 writer->body.line(
" * " + line);
53 writer->body.line(
" */");
56 writer->body.line(header);
65 auto writeBlock = [
this, writer](){
68 block->writeCpp(writer);
102 block->addLine(line);
111 block->addBlock(new_block);
121 this->compact = compact;
126 this->enforceBlockGeneration = enforceBlockGeneration;
void writeCpp(const CppWriterPtr &writer)
void addBlock(const CppBlockPtr &block)
std::shared_ptr< CppBlock > CppBlockPtr
void setCompact(bool compact)
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
void setBlock(const CppBlockPtr &block)
CppMethod(const std::string &header, const std::string &doc="", const bool enforceBlockGeneration=false)
void addLine(const std::string &line)
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.
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)
void setEnforceBlockGeneration(bool enforceBlockGeneration)