MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / put

Method put

src/Base/Writer.cpp:58–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57 template<typename Device>
58 inline bool put(Device& dev, char ch)
59 {
60 switch (state) {
61 case 0:
62 case 1:
63 if (ch == ']') {
64 ++state;
65 }
66 else {
67 state = 0;
68 }
69 break;
70 case 2:
71 if (ch == '>') {
72 static const char escape[] = "]]><![CDATA[";
73 boost::iostreams::write(dev, escape, sizeof(escape) - 1);
74 }
75 state = 0;
76 break;
77 }
78 return boost::iostreams::put(dev, ch);
79 }
80
81 int state = 0;
82};

Callers 8

SaveDocFileMethod · 0.45
SaveDocFileMethod · 0.45
RestoreDocFileMethod · 0.45
write_characterMethod · 0.45
insertAsciiFileMethod · 0.45
Stream.cppFile · 0.45
Stream.hFile · 0.45
TESTFunction · 0.45

Calls 1

writeFunction · 0.50

Tested by

no test coverage detected