File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,12 @@ namespace bin2cpp
6363 return mVariableLookup ;
6464 }
6565
66+ void TemplateProcessor::writeStream (std::ostream& stream)
67+ {
68+ std::set<std::string> recursion_history;
69+ processTemplate (stream, *mTemplateText , recursion_history);
70+ }
71+
6672 void TemplateProcessor::writeString (std::string& output)
6773 {
6874 std::ostringstream output_stream;
@@ -120,12 +126,14 @@ namespace bin2cpp
120126 }
121127 else
122128 {
123- output_stream.put (value[pos++]);
129+ output_stream.put (value[pos]);
130+ pos++;
124131 }
125132 }
126133 else
127134 {
128- output_stream.put (value[pos++]);
135+ output_stream.put (value[pos]);
136+ pos++;
129137 }
130138 }
131139 }
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ namespace bin2cpp
4949 void setTemplateVariableLookup (ITemplateVariableLookup* lookup);
5050 ITemplateVariableLookup* getTemplateVariableLookup () const ;
5151
52+ virtual void TemplateProcessor::writeStream (std::ostream& stream);
5253 virtual void writeString (std::string& output);
5354 virtual bool writeFile (const std::string& file_path);
5455
You can’t perform that action at this time.
0 commit comments