mail[Wesnoth-commits] r43790 - in /trunk/src/whiteboard: mapbuilder_visitor.cpp mapbuilder_visitor.hpp validate_visitor.cpp validate_visitor.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by gabrielmorin on June 30, 2010 - 09:52:
Author: gabba
Date: Wed Jun 30 09:52:11 2010
New Revision: 43790

URL: http://svn.gna.org/viewcvs/wesnoth?rev=43790&view=rev
Log:
Whiteboard: made validate_visitor inherit from mapbuilder_visitor

Modified:
    trunk/src/whiteboard/mapbuilder_visitor.cpp
    trunk/src/whiteboard/mapbuilder_visitor.hpp
    trunk/src/whiteboard/validate_visitor.cpp
    trunk/src/whiteboard/validate_visitor.hpp

Modified: trunk/src/whiteboard/mapbuilder_visitor.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/mapbuilder_visitor.cpp?rev=43790&r1=43789&r2=43790&view=diff
==============================================================================
--- trunk/src/whiteboard/mapbuilder_visitor.cpp (original)
+++ trunk/src/whiteboard/mapbuilder_visitor.cpp Wed Jun 30 09:52:11 2010
@@ -27,8 +27,8 @@
 
 mapbuilder_visitor::mapbuilder_visitor(unit_map& unit_map)
        : unit_map_(unit_map)
+    , excluded_units_()
        , modifiers_()
-    , excluded_units_()
 {
 }
 

Modified: trunk/src/whiteboard/mapbuilder_visitor.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/mapbuilder_visitor.hpp?rev=43790&r1=43789&r2=43790&view=diff
==============================================================================
--- trunk/src/whiteboard/mapbuilder_visitor.hpp (original)
+++ trunk/src/whiteboard/mapbuilder_visitor.hpp Wed Jun 30 09:52:11 2010
@@ -49,12 +49,13 @@
        // Any actions associated with this unit will be ignored when 
modifying the unit map
        virtual void exclude(const unit& unit) { 
excluded_units_.insert(&unit); }
 
-private:
+protected:
        unit_map& unit_map_;
 
+       std::set<unit const*> excluded_units_;
+
+private:
        std::stack<modifier_ptr> modifiers_;
-
-       std::set<unit const*> excluded_units_;
 };
 
 }

Modified: trunk/src/whiteboard/validate_visitor.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/validate_visitor.cpp?rev=43790&r1=43789&r2=43790&view=diff
==============================================================================
--- trunk/src/whiteboard/validate_visitor.cpp (original)
+++ trunk/src/whiteboard/validate_visitor.cpp Wed Jun 30 09:52:11 2010
@@ -21,7 +21,8 @@
 namespace wb
 {
 
-validate_visitor::validate_visitor()
+validate_visitor::validate_visitor(unit_map& unit_map)
+       : mapbuilder_visitor(unit_map)
 {
 }
 
@@ -29,8 +30,9 @@
 {
 }
 
-void validate_visitor::visit_move(move&)
+void validate_visitor::visit_move(boost::shared_ptr<move> move)
 {
+       mapbuilder_visitor::visit_move(move);
 
 }
 

Modified: trunk/src/whiteboard/validate_visitor.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/validate_visitor.hpp?rev=43790&r1=43789&r2=43790&view=diff
==============================================================================
--- trunk/src/whiteboard/validate_visitor.hpp (original)
+++ trunk/src/whiteboard/validate_visitor.hpp Wed Jun 30 09:52:11 2010
@@ -19,18 +19,18 @@
 #ifndef WB_VALIDATE_VISITOR_HPP_
 #define WB_VALIDATE_VISITOR_HPP_
 
-#include "visitor.hpp"
+#include "mapbuilder_visitor.hpp"
 
 namespace wb
 {
 
-class validate_visitor: public visitor
+class validate_visitor: public mapbuilder_visitor
 {
 public:
-       validate_visitor();
+       validate_visitor(unit_map& unit_map);
        virtual ~validate_visitor();
 
-       virtual void visit_move(move& p_move);
+       virtual void visit_move(boost::shared_ptr<move> move);
 };
 
 }




Related Messages


Powered by MHonArc, Updated Wed Jun 30 10:00:18 2010