+Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir)
+ const
+{
+ string result_file;
+ return doExport(target, put_in_tempdir, result_file);
+}
+
+Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir,
+ string & result_file) const
+{
+ bool const update_unincluded =
+ params().maintain_unincluded_children
+ && !params().getIncludedChildren().empty();
+
+ // (1) export with all included children (omit \includeonly)
+ if (update_unincluded) {
+ ExportStatus const status =
+ doExport(target, put_in_tempdir, true, result_file);
+ if (status != ExportSuccess)
+ return status;
+ }
+ // (2) export with included children only
+ return doExport(target, put_in_tempdir, false, result_file);
+}
+
+
+Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir,