00001 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 #ifndef MOCKPP_VISITABLEMOCKOBJECT_H
00031 #define MOCKPP_VISITABLEMOCKOBJECT_H
00032 
00033 #include <mockpp/mockpp.h> 
00034 
00035 #include MOCKPP_VECTOR_H
00036 
00037 #include <mockpp/MockObject.h>
00038 #include <mockpp/Throwable.h>
00039 #include <mockpp/ThrowableList.h>
00040 #include <mockpp/ExpectationList.h>
00041 #include <mockpp/ExpectationCounter.h>
00042 #include <mockpp/ReturnObjectList.h>
00043 
00044 #include <mockpp/constraint/ConstraintList.h>
00045 
00046 #include <mockpp/visiting/VisitableMockObject_macro.h>
00047 #include <mockpp/visiting/VisitableMockObject_template.h>
00048 
00049 
00050 MOCKPP_NS_START
00051 
00052 
00057 class MOCKPP_API_DECL0 VisitableMockObjectBase
00058 {
00059   public:
00060 
00065     VisitableMockObjectBase(const String &name, VerifiableList *parent);
00066 
00069     virtual ~VisitableMockObjectBase();
00070 
00073     void activate();
00074 
00078     void unsetThrowablesInline();
00079 
00080     class Controller;
00081     friend class Controller;
00082 
00086     void addExpectedMethod(const MOCKPP_STL::string &name) const;
00087 
00091     void addActualMethod(const MOCKPP_STL::string &name) const;
00092 
00097     bool isActivated() const;
00098 
00102     void addController(Controller *pc);
00103 
00107     void removeController(Controller *pc);
00108 
00112     unsigned numController() const;
00113 
00114    protected:
00115 
00119     void visitableVerify();
00120 
00123     void visitableReset();
00124 
00125   private:
00126 
00127     VisitableMockObjectBase (const VisitableMockObjectBase &);    
00128     VisitableMockObjectBase& operator=(VisitableMockObjectBase&);
00129 
00130     mutable ExpectationList<MOCKPP_STL::string> methodList;
00131     mutable bool                         activated;
00132     MOCKPP_STL::vector<Controller*>             controllers;
00133 };
00134 
00135 
00140 class MOCKPP_API_DECL0 VisitableMockObject : public MockObject
00141                                            , public VisitableMockObjectBase
00142 {
00143   public:
00144 
00150     VisitableMockObject(const String &name, VerifiableList *parent = 0);
00151 
00154     virtual ~VisitableMockObject();
00155 
00160     virtual void verify();
00161 
00165     virtual void reset();
00166 };
00167 
00168 
00169 
00180 class MOCKPP_API_DECL0 VisitableMockObjectBase::Controller
00181 {
00182   public:
00183 
00188     virtual ~Controller() = 0;
00189 
00192     virtual void reset() = 0;
00193 
00201     virtual void unsetThrowablesInline() = 0;
00202 
00209     virtual void verify() = 0;
00210 
00211 #ifdef DOXYGEN_SHOULD_SKIP_THIS // just for documentation purposes
00212 
00218     Controller (Your_VisitableMockObject *cls);
00219 
00225     void addThrowable (Throwable * t);
00226 
00232     void setDefaultThrowable (Throwable * t);
00233 
00240     void addReturnValue (const your_type &rv, unsigned count = 1);
00241 
00247     void setDefaultReturnValue (const your_type &rv);
00248 
00254     void setDefaultReturnValue (const your_type &rv);
00255 
00263     void addResponseValue (const your_type &rv,
00264                            const your_type1 &p1,
00265                            unsigned count = MOCKPP_UNLIMITED);
00266 
00274     void addResponseThrowable (Throwable *t,
00275                                const your_type1 &p1,
00276                                unsigned count = MOCKPP_UNLIMITED);
00277 
00285     void addResponseValue(const ret_type &rv,
00286                           const MOCKPP_NS::ConstraintHolder<type1> &p1,
00287                           unsigned count = MOCKPP_UNLIMITED);
00288 
00296     void addResponseThrowable(MOCKPP_NS::Throwable *t,
00297                               const MOCKPP_NS::ConstraintHolder<type1> &p1,
00298                               unsigned count = MOCKPP_UNLIMITED);
00299 
00308     void addResponseValue (const your_type &rv,
00309                            const your_type1 &p1, const your_type2 &p2,
00310                            unsigned count = MOCKPP_UNLIMITED);
00311 
00320     void addResponseThrowable (Throwable *t,
00321                                const your_type1 &p1, const your_type2 &p2,
00322                                unsigned count = MOCKPP_UNLIMITED);
00323 
00332     void addResponseValue(const ret_type &rv,
00333                           const MOCKPP_NS::ConstraintHolder<type1> &p1,
00334                           const MOCKPP_NS::ConstraintHolder<type2> &p2,
00335                           unsigned count = MOCKPP_UNLIMITED);
00336 
00345     void addResponseThrowable(MOCKPP_NS::Throwable *t,
00346                               const MOCKPP_NS::ConstraintHolder<type1> &p1,
00347                               const MOCKPP_NS::ConstraintHolder<type2> &p2,
00348                               unsigned count = MOCKPP_UNLIMITED);
00349 
00359     void addResponseValue (const your_type &rv,
00360                            const your_type1 &p1, const your_type2 &p2, const your_type3 &p3,
00361                            unsigned count = MOCKPP_UNLIMITED);
00362 
00372     void addResponseThrowable (Throwable *t,
00373                                const your_type1 &p1, const your_type2 &p2, const your_type3 &p3,
00374                                unsigned count = MOCKPP_UNLIMITED);
00375 
00385     void addResponseValue(const ret_type &rv,
00386                           const MOCKPP_NS::ConstraintHolder<type1> &p1,
00387                           const MOCKPP_NS::ConstraintHolder<type2> &p2,
00388                           const MOCKPP_NS::ConstraintHolder<type3> &p3,
00389                           unsigned count = MOCKPP_UNLIMITED);
00390 
00400     void addResponseThrowable(MOCKPP_NS::Throwable *t,
00401                               const MOCKPP_NS::ConstraintHolder<type1> &p1,
00402                               const MOCKPP_NS::ConstraintHolder<type2> &p2,
00403                               const MOCKPP_NS::ConstraintHolder<type3> &p3,
00404                               unsigned count = MOCKPP_UNLIMITED);
00405 
00416     void addResponseValue (const your_type &rv,
00417                            const your_type1 &p1, const your_type2 &p2, const your_type3 &p3,
00418                            const your_type4 &p4,
00419                            unsigned count = MOCKPP_UNLIMITED);
00420 
00431     void addResponseThrowable (Throwable *t,
00432                                const your_type1 &p1, const your_type2 &p2, const your_type3 &p3,
00433                                const your_type4 &p4,
00434                                unsigned count = MOCKPP_UNLIMITED);
00435 
00446     void addResponseValue(const ret_type &rv,
00447                           const MOCKPP_NS::ConstraintHolder<type1> &p1,
00448                           const MOCKPP_NS::ConstraintHolder<type2> &p2,
00449                           const MOCKPP_NS::ConstraintHolder<type3> &p3,
00450                           const MOCKPP_NS::ConstraintHolder<type4> &p4,
00451                           unsigned count = MOCKPP_UNLIMITED);
00452 
00463     void addResponseThrowable(MOCKPP_NS::Throwable *t,
00464                               const MOCKPP_NS::ConstraintHolder<type1> &p1,
00465                               const MOCKPP_NS::ConstraintHolder<type2> &p2,
00466                               const MOCKPP_NS::ConstraintHolder<type3> &p3,
00467                               const MOCKPP_NS::ConstraintHolder<type4> &p4,
00468                               unsigned count = MOCKPP_UNLIMITED);
00469 
00481     void addResponseValue (const your_type &rv,
00482                            const your_type1 &p1, const your_type2 &p2, const your_type3 &p3,
00483                            const your_type4 &p4, const your_type5 &p5,
00484                            unsigned count = MOCKPP_UNLIMITED);
00485 
00497     void addResponseThrowable (Throwable *t,
00498                                const your_type1 &p1, const your_type2 &p2, const your_type3 &p3,
00499                                const your_type4 &p4, const your_type5 &p5,
00500                                unsigned count = MOCKPP_UNLIMITED);
00501 
00513     void addResponseValue(const ret_type &rv,
00514                           const MOCKPP_NS::ConstraintHolder<type1> &p1,
00515                           const MOCKPP_NS::ConstraintHolder<type2> &p2,
00516                           const MOCKPP_NS::ConstraintHolder<type3> &p3,
00517                           const MOCKPP_NS::ConstraintHolder<type4> &p4,
00518                           const MOCKPP_NS::ConstraintHolder<type5> &p5,
00519                           unsigned count = MOCKPP_UNLIMITED);
00520 
00532     void addResponseThrowable(MOCKPP_NS::Throwable *t,
00533                               const MOCKPP_NS::ConstraintHolder<type1> &p1,
00534                               const MOCKPP_NS::ConstraintHolder<type2> &p2,
00535                               const MOCKPP_NS::ConstraintHolder<type3> &p3,
00536                               const MOCKPP_NS::ConstraintHolder<type4> &p4,
00537                               const MOCKPP_NS::ConstraintHolder<type5> &p5,
00538                               unsigned count = MOCKPP_UNLIMITED);
00539 
00540 #endif // DOXYGEN_SHOULD_SKIP_THIS
00541 
00542 } ;
00543 
00544 
00545 MOCKPP_NS_END
00546 
00547 
00549 
00550 
00558 #define MOCKPP_CONTROLLER_FOR(clsname, methname) \
00559     clsname::ControllerFor ## methname
00560 
00568 #define MOCKPP_CONTROLLER_FOR_EXT(clsname, m_methname, x_methname) \
00569   MOCKPP_CONTROLLER_FOR(clsname, m_methname ## x_methname)
00570 
00572 
00573 
00579 #define MOCKPP_VOID_VISITABLE0(classname, name) \
00580   public: \
00581     void name() \
00582   MOCKPP_VOID_VISITABLE0_IMPL(classname, name)
00583 
00588 #define MOCKPP_VOID_CONST_VISITABLE0(classname, name) \
00589   public: \
00590     void name() const \
00591   MOCKPP_VOID_VISITABLE0_IMPL(classname, name)
00592 
00593 
00601 #define MOCKPP_VOID_VISITABLE_EXT0(classname, m_name, \
00602                                               x_name) \
00603   public: \
00604     void m_name() \
00605   MOCKPP_VOID_VISITABLE0_IMPL(classname, m_name ## x_name)
00606 
00614 #define MOCKPP_VOID_CONST_VISITABLE_EXT0(classname, m_name, \
00615                                                     x_name) \
00616   public: \
00617     void m_name() const \
00618   MOCKPP_VOID_VISITABLE0_IMPL(classname, m_name ## x_name)
00619 
00621 
00628 #define MOCKPP_VOID_VISITABLE1(classname, name, type1) \
00629   public: \
00630     void name(const type1 ¶m1) \
00631   MOCKPP_VOID_VISITABLE1_IMPL(classname, name, const type1 &, \
00632                                          name, type1)
00633 
00639 #define MOCKPP_VOID_CONST_VISITABLE1(classname, name, type1) \
00640   public: \
00641     void name(const type1 ¶m1) const \
00642   MOCKPP_VOID_VISITABLE1_IMPL(classname, name, const type1 &, \
00643                                          name, type1)
00644 
00654 #define MOCKPP_VOID_VISITABLE_EXT1(classname, m_name, m_type1, \
00655                                               x_name, v_type1) \
00656   public: \
00657     void m_name(m_type1 param1) \
00658   MOCKPP_VOID_VISITABLE1_IMPL(classname, m_name ## x_name, m_type1, \
00659                                          m_name,           v_type1)
00660 
00670 #define MOCKPP_VOID_CONST_VISITABLE_EXT1(classname, m_name, m_type1, \
00671                                                     x_name, v_type1) \
00672   public: \
00673     void m_name(m_type1 param1) const \
00674   MOCKPP_VOID_VISITABLE1_IMPL(classname, m_name ## x_name, m_type1, \
00675                                          m_name,           v_type1)
00676 
00678 
00686 #define MOCKPP_VOID_VISITABLE2(classname, name, type1, type2) \
00687   public: \
00688     void name(const type1 ¶m1, const type2 ¶m2) \
00689   MOCKPP_VOID_VISITABLE2_IMPL(classname, name, const type1 &, const type2 &,  \
00690                                          name, type1,         type2)
00691 
00699 #define MOCKPP_VOID_CONST_VISITABLE2(classname, name, type1, type2) \
00700   public: \
00701     void name(const type1 ¶m1, const type2 ¶m2) const \
00702   MOCKPP_VOID_VISITABLE2_IMPL(classname, name, const type1 &, const type2 &,  \
00703                                          name, type1,         type2)
00704 
00716 #define MOCKPP_VOID_VISITABLE_EXT2(classname, m_name, m_type1, m_type2,  \
00717                                               x_name, v_type1, v_type2) \
00718   public: \
00719     void m_name(m_type1 param1, m_type2 param2) \
00720   MOCKPP_VOID_VISITABLE2_IMPL(classname, m_name ## x_name, m_type1, m_type2,  \
00721                                          m_name,           v_type1, v_type2)
00722 
00734 #define MOCKPP_VOID_CONST_VISITABLE_EXT2(classname, m_name, m_type1, m_type2, \
00735                                                     x_name, v_type1, v_type2) \
00736   public: \
00737     void m_name(m_type1 param1, m_type2 param2) const \
00738   MOCKPP_VOID_VISITABLE2_IMPL(classname, m_name ## x_name, m_type1, m_type2,  \
00739                                          m_name,           v_type1, v_type2)
00740 
00742 
00751 #define MOCKPP_VOID_VISITABLE3(classname, name, type1, type2, type3) \
00752   public: \
00753     void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) \
00754   MOCKPP_VOID_VISITABLE3_IMPL(classname, name, const type1 &, const type2 &, const type3 &, \
00755                                          name, type1,         type2,         type3)
00756 
00765 #define MOCKPP_VOID_CONST_VISITABLE3(classname, name, type1, type2, type3) \
00766   public: \
00767     void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) const \
00768   MOCKPP_VOID_VISITABLE3_IMPL(classname, name, const type1 &, const type2 &, const type3 &, \
00769                                          name, type1,         type2,         type3)
00770 
00784 #define MOCKPP_VOID_VISITABLE_EXT3(classname, m_name, m_type1, m_type2, m_type3,  \
00785                                               x_name, v_type1, v_type2, v_type3) \
00786   public: \
00787     void m_name(m_type1 param1, m_type2 param2, m_type3 param3) \
00788   MOCKPP_VOID_VISITABLE3_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, \
00789                                          m_name,           v_type1, v_type2, v_type3)
00790 
00804 #define MOCKPP_VOID_CONST_VISITABLE_EXT3(classname, m_name, m_type1, m_type2, m_type3,  \
00805                                                     x_name, v_type1, v_type2, v_type3) \
00806   public: \
00807     void m_name(m_type1 param1, m_type2 param2, m_type3 param3) const \
00808   MOCKPP_VOID_VISITABLE3_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, \
00809                                          m_name,           v_type1, v_type2, v_type3)
00810 
00812 
00822 #define MOCKPP_VOID_VISITABLE4(classname, name, type1, type2, type3, type4) \
00823   public: \
00824     void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) \
00825   MOCKPP_VOID_VISITABLE4_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, \
00826                                          name, type1,         type2,         type3,         type4)
00827 
00837 #define MOCKPP_VOID_CONST_VISITABLE4(classname, name, type1, type2, type3, type4) \
00838   public: \
00839     void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) const\
00840   MOCKPP_VOID_VISITABLE4_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, \
00841                                          name, type1,         type2,         type3,         type4)
00842 
00858 #define MOCKPP_VOID_VISITABLE_EXT4(classname, m_name, m_type1, m_type2, m_type3, m_type4, \
00859                                               x_name, v_type1, v_type2, v_type3, v_type4) \
00860   public: \
00861     void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) \
00862   MOCKPP_VOID_VISITABLE4_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \
00863                                          m_name,           v_type1, v_type2, v_type3, v_type4)
00864 
00880 #define MOCKPP_VOID_CONST_VISITABLE_EXT4(classname, m_name, m_type1, m_type2, m_type3, m_type4, \
00881                                                     x_name, v_type1, v_type2, v_type3, v_type4) \
00882   public: \
00883     void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) const\
00884   MOCKPP_VOID_VISITABLE4_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \
00885                                          m_name,           v_type1, v_type2, v_type3, v_type4)
00886 
00888 
00899 #define MOCKPP_VOID_VISITABLE5(classname, name, type1, type2, type3, type4, type5) \
00900   public: \
00901     void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) \
00902   MOCKPP_VOID_VISITABLE5_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \
00903                                          name, type1,         type2,         type3,         type4,         type5)
00904 
00915 #define MOCKPP_VOID_CONST_VISITABLE5(classname, name, type1, type2, type3, type4, type5) \
00916   public: \
00917     void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) const \
00918   MOCKPP_VOID_VISITABLE5_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \
00919                                          name, type1,         type2,         type3,         type4,         type5)
00920 
00938 #define MOCKPP_VOID_VISITABLE_EXT5(classname, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \
00939                                               x_name, v_type1, v_type2, v_type3, v_type4, v_type5) \
00940   public: \
00941     void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) \
00942   MOCKPP_VOID_VISITABLE5_IMPL(classname, m_name ##x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \
00943                                          m_name,          v_type1, v_type2, v_type3, v_type4, v_type5)
00944 
00962 #define MOCKPP_VOID_CONST_VISITABLE_EXT5(classname, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \
00963                                                     x_name, v_type1, v_type2, v_type3, v_type4, v_type5) \
00964   public: \
00965     void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) const \
00966   MOCKPP_VOID_VISITABLE5_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \
00967                                          m_name,           v_type1, v_type2, v_type3, v_type4, v_type5)
00968 
00970 
00977 #define MOCKPP_VISITABLE0(classname, ret_type, name) \
00978   public: \
00979     ret_type name() \
00980   MOCKPP_VISITABLE0_IMPL(classname, ret_type, name, \
00981                                     ret_type)
00982 
00988 #define MOCKPP_CONST_VISITABLE0(classname, ret_type, name) \
00989   public: \
00990     ret_type name() const \
00991   MOCKPP_VISITABLE0_IMPL(classname, ret_type, name, \
00992                                     ret_type)
00993 
01003 #define MOCKPP_VISITABLE_EXT0(classname, m_ret_type, m_name, \
01004                                          v_ret_type, x_name) \
01005   public: \
01006     m_ret_type m_name() \
01007   MOCKPP_VISITABLE0_IMPL(classname, m_ret_type, m_name ## x_name, \
01008                                     v_ret_type)
01009 
01019 #define MOCKPP_CONST_VISITABLE_EXT0(classname, m_ret_type, m_name, \
01020                                                v_ret_type, x_name) \
01021   public: \
01022     m_ret_type m_name() const \
01023   MOCKPP_VISITABLE0_IMPL(classname, m_ret_type, m_name ## x_name, \
01024                                     v_ret_type)
01025 
01026 
01028 
01036 #define MOCKPP_VISITABLE1(classname, ret_type, name, type1) \
01037   public: \
01038     ret_type name(const type1 ¶m1) \
01039   MOCKPP_VISITABLE1_IMPL(classname, ret_type, name, const type1 &, \
01040                                     ret_type, name, type1)
01041 
01049 #define MOCKPP_CONST_VISITABLE1(classname, ret_type, name, type1) \
01050   public: \
01051     ret_type name(const type1 ¶m1) const \
01052   MOCKPP_VISITABLE1_IMPL(classname, ret_type, name, const type1 &, \
01053                                     ret_type, name, type1)
01054 
01066 #define MOCKPP_VISITABLE_EXT1(classname, m_ret_type, m_name, m_type1, \
01067                                          v_ret_type, x_name, v_type1) \
01068   public: \
01069     m_ret_type m_name(m_type1 param1) \
01070   MOCKPP_VISITABLE1_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, \
01071                                     v_ret_type, m_name,           v_type1)
01072 
01084 #define MOCKPP_CONST_VISITABLE_EXT1(classname, m_ret_type, m_name, m_type1, \
01085                                                v_ret_type, x_name, v_type1) \
01086   public: \
01087     m_ret_type m_name(m_type1 param1) const \
01088   MOCKPP_VISITABLE1_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, \
01089                                     v_ret_type, m_name,           v_type1)
01090 
01092 
01101 #define MOCKPP_VISITABLE2(classname, ret_type, name, type1, type2) \
01102   public: \
01103     ret_type name(const type1 ¶m1, const type2 ¶m2) \
01104   MOCKPP_VISITABLE2_IMPL(classname, ret_type, name, const type1 &, const type2 &, \
01105                                     ret_type, name, type1,         type2)
01106 
01115 #define MOCKPP_CONST_VISITABLE2(classname, ret_type, name, type1, type2) \
01116   public: \
01117     ret_type name(const type1 ¶m1, const type2 ¶m2) const \
01118   MOCKPP_VISITABLE2_IMPL(classname, ret_type, name, const type1 &, const type2 &, \
01119                                     ret_type, name, type1,         type2)
01120 
01134 #define MOCKPP_VISITABLE_EXT2(classname, m_ret_type, m_name, m_type1, m_type2, \
01135                                          v_ret_type, x_name, v_type1, v_type2) \
01136   public: \
01137     m_ret_type m_name(m_type1 param1, m_type2 param2) \
01138   MOCKPP_VISITABLE2_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, \
01139                                     v_ret_type, m_name,           v_type1, v_type2)
01140 
01154 #define MOCKPP_CONST_VISITABLE_EXT2(classname, m_ret_type, m_name, m_type1, m_type2, \
01155                                                v_ret_type, x_name, v_type1, v_type2) \
01156   public: \
01157     m_ret_type m_name(m_type1 param1, m_type2 param2) const \
01158   MOCKPP_VISITABLE2_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, \
01159                                     v_ret_type, m_name,           v_type1, v_type2)
01160 
01161 
01163 
01173 #define MOCKPP_VISITABLE3(classname, ret_type, name, type1, type2, type3) \
01174   public: \
01175     ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) \
01176   MOCKPP_VISITABLE3_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3, \
01177                                     ret_type, name, type1,         type2,         type3)
01178 
01188 #define MOCKPP_CONST_VISITABLE3(classname, ret_type, name, type1, type2, type3) \
01189   public: \
01190     ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) const \
01191   MOCKPP_VISITABLE3_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3, \
01192                                     ret_type, name, type1,         type2,         type3)
01193 
01209 #define MOCKPP_VISITABLE_EXT3(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, \
01210                                          v_ret_type, x_name, v_type1, v_type2, v_type3) \
01211   public: \
01212     m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3) \
01213   MOCKPP_VISITABLE3_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, \
01214                                     v_ret_type, m_name,           v_type1, v_type2, v_type3)
01215 
01231 #define MOCKPP_CONST_VISITABLE_EXT3(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, \
01232                                                v_ret_type, x_name, v_type1, v_type2, v_type3) \
01233   public: \
01234     m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3) const \
01235   MOCKPP_VISITABLE3_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, \
01236                                     v_ret_type, m_name,           v_type1, v_type2, v_type3)
01237 
01238 
01240 
01251 #define MOCKPP_VISITABLE4(classname, ret_type, name, type1, type2, type3, type4) \
01252   public: \
01253     ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) \
01254   MOCKPP_VISITABLE4_IMPL(classname, ret_type, name, const m_type1 &, const type2 &, const type3 &, const type4 &, \
01255                                     ret_type, name, type1,           type2,         type3,         type4)
01256 
01267 #define MOCKPP_CONST_VISITABLE4(classname, ret_type, name, type1, type2, type3, type4) \
01268   public: \
01269     ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) const \
01270   MOCKPP_VISITABLE4_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3 &, const type4 &, \
01271                                     ret_type, name, type1,         type2,         type3,         type4)
01272 
01290 #define MOCKPP_VISITABLE_EXT4(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, \
01291                                          v_ret_type, x_name, v_type1, v_type2, v_type3, v_type4) \
01292   public: \
01293     m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) \
01294   MOCKPP_VISITABLE4_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \
01295                                     v_ret_type, m_name,           v_type1, v_type2, v_type3, v_type4)
01296 
01314 #define MOCKPP_CONST_VISITABLE_EXT4(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, \
01315                                                v_ret_type, x_name, v_type1, v_type2, v_type3, v_type4) \
01316   public: \
01317     m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) const \
01318   MOCKPP_VISITABLE4_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \
01319                                     v_ret_type, m_name,           v_type1, v_type2, v_type3, v_type4)
01320 
01321 
01323 
01335 #define MOCKPP_VISITABLE5(classname, ret_type, name, type1, type2, type3, type4, type5) \
01336   public: \
01337     ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) \
01338   MOCKPP_VISITABLE5_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \
01339                                     ret_type, name, type1,         type2,         type3,         type4,         type5)
01340 
01352 #define MOCKPP_CONST_VISITABLE5(classname, ret_type, name, type1, type2, type3, type4, type5) \
01353   public: \
01354     ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) const \
01355   MOCKPP_VISITABLE5_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \
01356                                     ret_type, name, type1,         type2,         type3,         type4,         type5)
01357 
01377 #define MOCKPP_VISITABLE_EXT5(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \
01378                                          v_ret_type, x_name, v_type1, v_type2, v_type3, v_type4, v_type5) \
01379   public: \
01380     m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) \
01381   MOCKPP_VISITABLE5_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \
01382                                     v_ret_type, m_name,           v_type1, v_type2, v_type3, v_type4, v_type5)
01383 
01403 #define MOCKPP_CONST_VISITABLE_EXT5(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \
01404                                                v_ret_type, x_name, v_type1, v_type2, v_type3, v_type4, v_type5) \
01405   public: \
01406     m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) const \
01407   MOCKPP_VISITABLE5_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \
01408                                     v_ret_type, m_name,           v_type1, v_type2, v_type3, v_type4, v_type5)
01409 
01411 
01412 
01417 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE0(name) \
01418     MOCKPP_CONSTRUCT_BASE_VISITABLE_MEMBERS(name)
01419 
01425 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT0(m_name, x_name)\
01426   MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE0(m_name ## x_name)
01427 
01428 
01433 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE1(name) \
01434     MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE0(name), \
01435     MOCKPP_CONSTRUCT_PARAMETER1_VISITABLE_MEMBERS(name)
01436 
01442 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT1(m_name, x_name) \
01443   MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE1(m_name ## x_name)
01444 
01445 
01450 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE2(name) \
01451     MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE0(name), \
01452     MOCKPP_CONSTRUCT_PARAMETER2_VISITABLE_MEMBERS(name)
01453 
01459 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT2(m_name, x_name) \
01460   MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE2(m_name ## x_name)
01461 
01462 
01467 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE3(name) \
01468     MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE0(name), \
01469     MOCKPP_CONSTRUCT_PARAMETER3_VISITABLE_MEMBERS(name)
01470 
01476 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT3(m_name, x_name) \
01477   MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE3(m_name ## x_name)
01478 
01479 
01484 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE4(name) \
01485     MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE0(name), \
01486     MOCKPP_CONSTRUCT_PARAMETER4_VISITABLE_MEMBERS(name)
01487 
01493 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT4(m_name, x_name) \
01494   MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE4(m_name ## x_name)
01495 
01496 
01501 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE5(name) \
01502     MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE0(name), \
01503     MOCKPP_CONSTRUCT_PARAMETER5_VISITABLE_MEMBERS(name)
01504 
01510 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT5(m_name, x_name) \
01511   MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE5(m_name ## x_name)
01512 
01514 
01515 
01520 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(name) \
01521     MOCKPP_CONSTRUCT_BASE_VISITABLE_MEMBERS(name), \
01522     MOCKPP_CONSTRUCT_RETURN_VISITABLE_MEMBERS(name)
01523 
01529 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT0(m_name, x_name)\
01530   MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(m_name ## x_name)
01531 
01532 
01537 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE1(name) \
01538     MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(name), \
01539     MOCKPP_CONSTRUCT_PARAMETER1_VISITABLE_MEMBERS(name)
01540 
01546 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT1(m_name, x_name) \
01547   MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE1(m_name ## x_name)
01548 
01549 
01554 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE2(name) \
01555     MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(name), \
01556     MOCKPP_CONSTRUCT_PARAMETER2_VISITABLE_MEMBERS(name)
01557 
01563 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT2(m_name, x_name) \
01564   MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE2(m_name ## x_name)
01565 
01566 
01571 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE3(name) \
01572     MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(name), \
01573     MOCKPP_CONSTRUCT_PARAMETER3_VISITABLE_MEMBERS(name)
01574 
01580 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT3(m_name, x_name) \
01581   MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE3(m_name ## x_name)
01582 
01583 
01588 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE4(name) \
01589     MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(name), \
01590     MOCKPP_CONSTRUCT_PARAMETER4_VISITABLE_MEMBERS(name)
01591 
01597 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT4(m_name, x_name) \
01598   MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE4(m_name ## x_name)
01599 
01600 
01605 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE5(name) \
01606     MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(name), \
01607     MOCKPP_CONSTRUCT_PARAMETER5_VISITABLE_MEMBERS(name)
01608 
01614 #define MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT5(m_name, x_name) \
01615   MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE5(m_name ## x_name)
01616 
01617 
01618 #endif // MOCKPP_VISITABLEMOCKOBJECT_H