filters
anchor.cc00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <stdlib.h>
00024 #include <kdebug.h>
00025 #include "anchor.h"
00026 #include "element.h"
00027 #include "document.h"
00028
00029 Anchor::Anchor(Para* para): Format(para)
00030 {
00031 }
00032
00033 Anchor::~Anchor()
00034 {
00035 kdDebug(30522) << "Destruction of an anchor." << endl;
00036 }
00037
00038 void Anchor::analyse(const QDomNode balise)
00039 {
00040
00041 Format::analyse(balise);
00042
00043
00044 kdDebug(30522) << "ANALYSE AN ANCHOR" << endl;
00045
00046
00047 _type = getAttr(getChild(balise, "ANCHOR"), "type");
00048 _instance = getAttr(getChild(balise, "ANCHOR"), "instance");
00049 kdDebug(30522) << "type = " << _type << " instance = " << _instance << endl;
00050
00051 kdDebug(30522) << "END OF AN ANCHOR" << endl;
00052 }
00053
00054 void Anchor::generate(QTextStream &out)
00055 {
00056 Element *elt = 0;
00057
00058 kdDebug(30522) << " GENERATION ANCHOR" << endl;
00059
00060
00061
00062 kdDebug(30522) << "anchor : " << _instance << endl;
00063 if((elt = getRoot()->searchAnchor(_instance)) != 0)
00064 elt->generate(out);
00065 kdDebug(30522) << "ANCHOR GENERATED" << endl;
00066 }
00067
00068
|