from Visitor -> XMLVisitor

This commit is contained in:
granzuglia 2009-09-01 09:08:07 +00:00
parent 37c11749f7
commit 6ff4909253
2 changed files with 8 additions and 8 deletions

View File

@ -44,7 +44,7 @@ XMLLeafNode::~XMLLeafNode()
} }
void XMLLeafNode::applyProcedure(Visitor& v) void XMLLeafNode::applyProcedure(XMLVisitor& v)
{ {
v(*this); v(*this);
} }
@ -71,7 +71,7 @@ XMLInteriorNode::~XMLInteriorNode()
delete (*it); delete (*it);
} }
void XMLInteriorNode::applyProcedure(Visitor& v) void XMLInteriorNode::applyProcedure(XMLVisitor& v)
{ {
v(*this); v(*this);
} }

View File

@ -66,7 +66,7 @@ public:
class XMLDocumentWriter; class XMLDocumentWriter;
class Visitor; class XMLVisitor;
class XMLNode class XMLNode
{ {
@ -74,7 +74,7 @@ public:
XMLNode(XMLTag* tag); XMLNode(XMLTag* tag);
virtual ~XMLNode(); virtual ~XMLNode();
virtual void applyProcedure(Visitor& v) = 0; virtual void applyProcedure(XMLVisitor& v) = 0;
XMLTag* _tag; XMLTag* _tag;
}; };
@ -88,7 +88,7 @@ public:
QVector< XMLNode* > sons(); QVector< XMLNode* > sons();
void applyProcedure(Visitor& v); void applyProcedure(XMLVisitor& v);
~XMLInteriorNode(); ~XMLInteriorNode();
@ -100,7 +100,7 @@ class XMLLeafNode : public XMLNode
public: public:
XMLLeafNode(XMLLeafTag* leaftag); XMLLeafNode(XMLLeafTag* leaftag);
void applyProcedure(Visitor& v); void applyProcedure(XMLVisitor& v);
virtual ~XMLLeafNode(); virtual ~XMLLeafNode();
}; };
@ -121,7 +121,7 @@ public:
}; };
class Visitor class XMLVisitor
{ {
public: public:
virtual void operator()(XMLLeafNode& leaf) = 0; virtual void operator()(XMLLeafNode& leaf) = 0;
@ -129,7 +129,7 @@ public:
}; };
class XMLDocumentWriter : public Visitor class XMLDocumentWriter : public XMLVisitor
{ {
private: private:
QXmlStreamWriter _stream; QXmlStreamWriter _stream;