+ // load document generation strings from file stringbits.txt from template dir
+ void DocumentTree::load_doc_strings (std::string templatedir) {
+ // load the template file
+ std::ifstream stringsfile (templatedir + "/stringbits.txt");
+
+ std::string line;
+ // read line by line and append it to doc_strings
+ int i = 0;
+ while (! stringsfile.eof () && i < this->doc_strings.size ()) {
+ std::getline (stringsfile, line);
+ this->doc_strings[i] = line;
+ i ++;
+ }
+ stringsfile.close ();
+ }
+