CMakeWriter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <sstream>
5 #include <memory>
6 
7 namespace armarx
8 {
9  class CMakeWriter;
10  using CmakeWriterPtr = std::shared_ptr<CMakeWriter>;
11 
13  {
14  public:
16 
17  CMakeWriter();
18 
19  // void startBlock();
20  void startBlock(const std::string& line);
21  // void endBlock();
22  void endBlock(const std::string& line);
23  void endBlockComment(std::string comment);
24  void line();
25  void line(const std::string& line);
26  void line(const std::string& line, int indentDelta);
27 
28  std::string getString();
30 
31  private:
32  void lineInternal(const std::string& line, int indent);
33 
34  private:
35  std::stringstream ss;
36  int indent;
37  std::string indentChars;
38  LineType lastLineType;
39  };
40 
41 } // namespace armarx
42 
armarx::CMakeWriter::CMakeWriter
CMakeWriter()
Definition: CMakeWriter.cpp:5
armarx::CMakeWriter::getString
std::string getString()
Definition: CMakeWriter.cpp:52
armarx::CMakeWriter
Definition: CMakeWriter.h:12
armarx::CmakeWriterPtr
std::shared_ptr< CMakeWriter > CmakeWriterPtr
Definition: CMakeWriter.h:10
armarx::CMakeWriter::LineType
LineType
Definition: CMakeWriter.h:15
armarx::CMakeWriter::line
void line()
Definition: CMakeWriter.cpp:37
armarx::CMakeWriter::endBlock
void endBlock(const std::string &line)
Definition: CMakeWriter.cpp:23
armarx::CMakeWriter::Empty
@ Empty
Definition: CMakeWriter.h:15
armarx::CMakeWriter::Normal
@ Normal
Definition: CMakeWriter.h:15
armarx::CMakeWriter::endBlockComment
void endBlockComment(std::string comment)
Definition: CMakeWriter.cpp:30
armarx::CMakeWriter::EndBlock
@ EndBlock
Definition: CMakeWriter.h:15
armarx::CMakeWriter::getLastLineType
LineType getLastLineType()
Definition: CMakeWriter.cpp:57
armarx::CMakeWriter::StartBlock
@ StartBlock
Definition: CMakeWriter.h:15
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::CMakeWriter::startBlock
void startBlock(const std::string &line)
Definition: CMakeWriter.cpp:14