|
a/src/rcldb/rcldoc.cpp |
|
b/src/rcldb/rcldoc.cpp |
|
... |
|
... |
12 |
* You should have received a copy of the GNU General Public License
|
12 |
* You should have received a copy of the GNU General Public License
|
13 |
* along with this program; if not, write to the
|
13 |
* along with this program; if not, write to the
|
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
|
|
17 |
#include "autoconfig.h"
|
17 |
|
18 |
|
18 |
#include "rcldoc.h"
|
19 |
#include "rcldoc.h"
|
19 |
#include "debuglog.h"
|
20 |
#include "debuglog.h"
|
|
|
21 |
#include "rclutil.h"
|
20 |
|
22 |
|
21 |
namespace Rcl {
|
23 |
namespace Rcl {
|
22 |
const string Doc::keyabs("abstract");
|
24 |
const string Doc::keyabs("abstract");
|
23 |
const string Doc::keyapptg("rclaptg");
|
25 |
const string Doc::keyapptg("rclaptg");
|
24 |
const string Doc::keyau("author");
|
26 |
const string Doc::keyau("author");
|
|
... |
|
... |
68 |
(*it).first.c_str(), (*it).second.c_str()));
|
70 |
(*it).first.c_str(), (*it).second.c_str()));
|
69 |
}
|
71 |
}
|
70 |
if (dotext)
|
72 |
if (dotext)
|
71 |
LOGDEB(("Rcl::Doc::dump: text: \n[%s]\n", text.c_str()));
|
73 |
LOGDEB(("Rcl::Doc::dump: text: \n[%s]\n", text.c_str()));
|
72 |
}
|
74 |
}
|
|
|
75 |
|
|
|
76 |
// Copy ensuring no shared string data, for threading issues.
|
|
|
77 |
void Doc::copyto(Doc *d) const
|
|
|
78 |
{
|
|
|
79 |
d->url.assign(url.begin(), url.end());
|
|
|
80 |
d->idxurl.assign(idxurl.begin(), idxurl.end());
|
|
|
81 |
d->idxi = idxi;
|
|
|
82 |
d->ipath.assign(ipath.begin(), ipath.end());
|
|
|
83 |
d->mimetype.assign(mimetype.begin(), mimetype.end());
|
|
|
84 |
d->fmtime.assign(fmtime.begin(), fmtime.end());
|
|
|
85 |
d->dmtime.assign(dmtime.begin(), dmtime.end());
|
|
|
86 |
d->origcharset.assign(origcharset.begin(), origcharset.end());
|
|
|
87 |
map_ss_cp_noshr(meta, &d->meta);
|
|
|
88 |
d->syntabs = syntabs;
|
|
|
89 |
d->pcbytes.assign(pcbytes.begin(), pcbytes.end());
|
|
|
90 |
d->fbytes.assign(fbytes.begin(), fbytes.end());
|
|
|
91 |
d->dbytes.assign(dbytes.begin(), dbytes.end());
|
|
|
92 |
d->sig.assign(sig.begin(), sig.end());
|
|
|
93 |
d->text.assign(text.begin(), text.end());
|
|
|
94 |
d->pc = pc;
|
|
|
95 |
d->xdocid = xdocid;
|
|
|
96 |
d->idxi = idxi;
|
|
|
97 |
d->haspages = haspages;
|
|
|
98 |
d->haschildren = haschildren;
|
|
|
99 |
d->onlyxattr = onlyxattr;
|
|
|
100 |
}
|
73 |
}
|
101 |
}
|
74 |
|
102 |
|