Index: Relations.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Relations/Relations.h,v retrieving revision 1.2 diff -c -p -r1.2 Relations.h *** Relations.h 2001/10/12 17:58:43 1.2 --- Relations.h 2002/03/11 23:11:51 *************** private: *** 105,122 **** // ---------------------------------------------------------------------------- // Relation0 is a template used to construct relations, such as boundary // conditions, that do not depend on additional fields. The Target must be ! // a Field. The RelationFunctor must be Default Constructable and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const L &, const RelationFunctor &) // // and the member function // ! // template ! // void operator()(const L &) const // ! // where L is a Field. The constructor should use the arguments to // initialize itself and the function should apply the relation. // ---------------------------------------------------------------------------- --- 105,122 ---- // ---------------------------------------------------------------------------- // Relation0 is a template used to construct relations, such as boundary // conditions, that do not depend on additional fields. The Target must be ! // a Field. The RelationFunctor must be Copy Constructible and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const RelationFunctor &, const Target &) // // and the member function // ! // template ! // void operator()(const Target &) const // ! // where Target is a Field. The constructor should use the arguments to // initialize itself and the function should apply the relation. // ---------------------------------------------------------------------------- *************** public: *** 159,177 **** // ---------------------------------------------------------------------------- // Relation1 is a template used to construct relations that depend on one // additional field (e.g., a = b). The Target must be ! // a Field. The RelationFunctor must be Default Constructable and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const L &, const R1 &, ! // const RelationFunctor &) // // and the member function // ! // template ! // void operator()(const L &const R1 &) const // ! // where L and R1 are Fields. The constructor should use the arguments to // initialize itself and the function should apply the relation. // ---------------------------------------------------------------------------- --- 159,177 ---- // ---------------------------------------------------------------------------- // Relation1 is a template used to construct relations that depend on one // additional field (e.g., a = b). The Target must be ! // a Field. The RelationFunctor must be Copy Constructible and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const RelationFunctor &, const Target &, const R1 &) ! // // // and the member function // ! // template ! // void operator()(const Target &, const R1 &) const // ! // where Target and R1 are Fields. The constructor should use the arguments to // initialize itself and the function should apply the relation. // ---------------------------------------------------------------------------- *************** protected: *** 221,240 **** // ---------------------------------------------------------------------------- // Relation2 is a template used to construct relations that depend on two // additional fields (e.g., a = b + c). The Target must be ! // a Field. The RelationFunctor must be Default Constructable and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const L &, const R1 &, const R2 &, ! // const RelationFunctor &) // // and the member function // ! // template ! // void operator()(const L &const R1 &, const R2 &) const // ! // where L, R1, and R2 are Fields. The constructor should use the arguments to ! // initialize itself and the function should apply the relation. // ---------------------------------------------------------------------------- template --- 221,241 ---- // ---------------------------------------------------------------------------- // Relation2 is a template used to construct relations that depend on two // additional fields (e.g., a = b + c). The Target must be ! // a Field. The RelationFunctor must be Copy Constructible and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const RelationFunctor &, ! // const Target &, const R1 &, const R2 &) // // and the member function // ! // template ! // void operator()(const Target &, const R1 &, const R2 &) const // ! // where Target, R1, and R2 are Fields. The constructor should use the ! // arguments to initialize itself and the function should apply the ! // relation. // ---------------------------------------------------------------------------- template *************** protected: *** 285,303 **** // ---------------------------------------------------------------------------- // Relation3 is a template used to construct relations that depend on three // additional fields (e.g., a = b + c + d). The Target must be ! // a Field. The RelationFunctor must be Default Constructable and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const L &, const R1 &, const R2 &, const R3 &, // const RelationFunctor &) // // and the member function // ! // template ! // void operator()(const L &const R1 &, const R2 &, const R3 &) const // ! // where L, R1, R2, and R3 are Fields. The constructor should use // the arguments to initialize itself and the function should apply the // relation. // ---------------------------------------------------------------------------- --- 286,304 ---- // ---------------------------------------------------------------------------- // Relation3 is a template used to construct relations that depend on three // additional fields (e.g., a = b + c + d). The Target must be ! // a Field. The RelationFunctor must be Copy Constructible and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const Target &, const R1 &, const R2 &, const R3 &, // const RelationFunctor &) // // and the member function // ! // template ! // void operator()(const Target &const R1 &, const R2 &, const R3 &) const // ! // where Target, R1, R2, and R3 are Fields. The constructor should use // the arguments to initialize itself and the function should apply the // relation. // ---------------------------------------------------------------------------- *************** protected: *** 355,374 **** // ---------------------------------------------------------------------------- // Relation4 is a template used to construct relations that depend on four // additional fields (e.g., a = b + c + d + e). The Target must be ! // a Field. The RelationFunctor must be Default Constructable and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const L &, const R1 &, const R2 &, const R3 &, ! // const R4 &, const RelationFunctor &) // // and the member function // ! // template ! // void operator()(const L &const R1 &, const R2 &, const R3 &, // const R4 &) const // ! // where L, R1, R2, R3, and R4 are Fields. The constructor should use // the arguments to initialize itself and the function should apply the // relation. // ---------------------------------------------------------------------------- --- 356,376 ---- // ---------------------------------------------------------------------------- // Relation4 is a template used to construct relations that depend on four // additional fields (e.g., a = b + c + d + e). The Target must be ! // a Field. The RelationFunctor must be Copy Constructible and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const RelationFunctor &, ! // const Target &, const R1 &, const R2 &, const R3 &, ! // const R4 &) // // and the member function // ! // template ! // void operator()(const Target &, const R1 &, const R2 &, const R3 &, // const R4 &) const // ! // where Target, R1, R2, R3, and R4 are Fields. The constructor should use // the arguments to initialize itself and the function should apply the // relation. // ---------------------------------------------------------------------------- *************** protected: *** 430,449 **** // ---------------------------------------------------------------------------- // Relation5 is a template used to construct relations that depend on five // additional fields (e.g., a = b + c + d + e + f). The Target must be ! // a Field. The RelationFunctor must be Default Constructable and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const L &, const R1 &, const R2 &, const R3 &, ! // const R4 &, const R5 &, const RelationFunctor &) // // and the member function // ! // template ! // void operator()(const L &const R1 &, const R2 &, const R3 &, // const R4 &, const R5 &) const // ! // where L, R1, R2, R3, R4, and R5 are Fields. The constructor should use // the arguments to initialize itself and the function should apply the // relation. // ---------------------------------------------------------------------------- --- 432,452 ---- // ---------------------------------------------------------------------------- // Relation5 is a template used to construct relations that depend on five // additional fields (e.g., a = b + c + d + e + f). The Target must be ! // a Field. The RelationFunctor must be Copy Constructible and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const RelationFunctor &, ! // const Target &, const R1 &, const R2 &, const R3 &, ! // const R4 &, const R5 &) // // and the member function // ! // template ! // void operator()(const Target &, const R1 &, const R2 &, const R3 &, // const R4 &, const R5 &) const // ! // where Target, R1, R2, R3, R4, and R5 are Fields. The constructor should use // the arguments to initialize itself and the function should apply the // relation. // ---------------------------------------------------------------------------- *************** protected: *** 508,532 **** // ---------------------------------------------------------------------------- // Relation6 is a template used to construct relations that depend on six // additional fields (e.g., a = b + c + d + e + f + g). The Target must be ! // a Field. The RelationFunctor must be Default Constructable and Assignable. // In addition, it must provide the constructor // ! // template ! // RelationFunctor(const L &, const R1 &, const R2 &, const R3 &, ! // const R4 &, const R5 &, const R6 &, ! // const RelationFunctor &) // // and the member function // ! // template ! // void operator()(const L &const R1 &, const R2 &, const R3 &, // const R4 &, const R5 &, const R6 &) const // ! // where L, R1, R2, R3, R4, R5, and R6 are Fields. The constructor should use ! // the arguments to initialize itself and the function should apply the ! // relation. // ---------------------------------------------------------------------------- template ! // RelationFunctor(const RelationFunctor &, ! // const Target &, const R1 &, const R2 &, const R3 &, ! // const R4 &, const R5 &, const R6 &) // // and the member function // ! // template ! // void operator()(const Target &, const R1 &, const R2 &, const R3 &, // const R4 &, const R5 &, const R6 &) const // ! // where Target, R1, R2, R3, R4, R5, and R6 are Fields. The ! // constructor should use the arguments to initialize itself and the ! // function should apply the relation. // ---------------------------------------------------------------------------- template class RelationFunctionPtr0 { public: ! RelationFunctionPtr0(void (*f)(const L &)) : f_m(f) { } ! RelationFunctionPtr0(const RelationFunctionPtr0 &init, const L &) : f_m(init.f_m) { } ! inline void operator()(const L &l) { f_m(l); } private: ! void (*f_m)(const L &); }; ! template class RelationFunctionPtr1 { public: ! RelationFunctionPtr1(void (*f)(const L &, const R1 &)) : f_m(f) { } ! RelationFunctionPtr1(const RelationFunctionPtr1 &init, const L &) : f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1) { f_m(l, r1); } private: ! void (*f_m)(const L &, const R1 &); }; ! template class RelationFunctionPtr2 { public: ! RelationFunctionPtr2(void (*f)(const L &, const R1 &, const R2 &)) : f_m(f) { } ! RelationFunctionPtr2(const RelationFunctionPtr2 &init, const L &) : f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1, const R2 &r2) { f_m(l, r1, r2); } private: ! void (*f_m)(const L &, const R1 &, const R2 &); }; ! template class RelationFunctionPtr3 { public: ! RelationFunctionPtr3(void (*f)(const L &, const R1 &, const R2 &, const R3 &)) : f_m(f) { } RelationFunctionPtr3( ! const RelationFunctionPtr3 &model) : f_m(model.f_m) { } RelationFunctionPtr3( ! const RelationFunctionPtr3 &init, const L &) : f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1, const R2 &r2, const R3 &r3) { f_m(l, r1, r2, r3); --- 596,682 ---- // Relation functors supporting the use of function pointers. //----------------------------------------------------------------------------- ! template class RelationFunctionPtr0 { public: ! RelationFunctionPtr0(void (*f)(const Target &)) : f_m(f) { } ! RelationFunctionPtr0(const RelationFunctionPtr0 &init, const Target &) : f_m(init.f_m) { } ! inline void operator()(const Target &l) { f_m(l); } private: ! void (*f_m)(const Target &); }; ! template class RelationFunctionPtr1 { public: ! RelationFunctionPtr1(void (*f)(const Target &, const R1 &)) : f_m(f) { } ! RelationFunctionPtr1(const RelationFunctionPtr1 &init, const Target &) : f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1) { f_m(l, r1); } private: ! void (*f_m)(const Target &, const R1 &); }; ! template class RelationFunctionPtr2 { public: ! RelationFunctionPtr2(void (*f)(const Target &, const R1 &, const R2 &)) : f_m(f) { } ! RelationFunctionPtr2(const RelationFunctionPtr2 &init, const Target &) : f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1, const R2 &r2) { f_m(l, r1, r2); } private: ! void (*f_m)(const Target &, const R1 &, const R2 &); }; ! template class RelationFunctionPtr3 { public: ! RelationFunctionPtr3(void (*f)(const Target &, const R1 &, const R2 &, const R3 &)) : f_m(f) { } RelationFunctionPtr3( ! const RelationFunctionPtr3 &model) : f_m(model.f_m) { } RelationFunctionPtr3( ! const RelationFunctionPtr3 &init, const Target &) : f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1, const R2 &r2, const R3 &r3) { f_m(l, r1, r2, r3); *************** public: *** 681,707 **** private: ! void (*f_m)(const L &, const R1 &, const R2 &, const R3 &); }; ! template class RelationFunctionPtr4 { public: ! RelationFunctionPtr4(void (*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &)) : f_m(f) { } RelationFunctionPtr4( ! const RelationFunctionPtr4 &model) : f_m(model.f_m) { } RelationFunctionPtr4( ! const RelationFunctionPtr4 &init, const L &) : f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4) { f_m(l, r1, r2, r3, r4); --- 684,710 ---- private: ! void (*f_m)(const Target &, const R1 &, const R2 &, const R3 &); }; ! template class RelationFunctionPtr4 { public: ! RelationFunctionPtr4(void (*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &)) : f_m(f) { } RelationFunctionPtr4( ! const RelationFunctionPtr4 &model) : f_m(model.f_m) { } RelationFunctionPtr4( ! const RelationFunctionPtr4 &init, const Target &) : f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4) { f_m(l, r1, r2, r3, r4); *************** public: *** 709,737 **** private: ! void (*f_m)(const L &, const R1 &, const R2 &, const R3 &, const R4 &); }; ! template class RelationFunctionPtr5 { public: ! RelationFunctionPtr5(void (*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &)) : f_m(f) { } RelationFunctionPtr5( ! const RelationFunctionPtr5 &model) : f_m(model.f_m) { } RelationFunctionPtr5( ! const RelationFunctionPtr5 &init, const L &) : f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5) { f_m(l, r1, r2, r3, r4, r5); --- 712,740 ---- private: ! void (*f_m)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &); }; ! template class RelationFunctionPtr5 { public: ! RelationFunctionPtr5(void (*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &)) : f_m(f) { } RelationFunctionPtr5( ! const RelationFunctionPtr5 &model) : f_m(model.f_m) { } RelationFunctionPtr5( ! const RelationFunctionPtr5 &init, const Target &) : f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5) { f_m(l, r1, r2, r3, r4, r5); *************** public: *** 739,767 **** private: ! void (*f_m)(const L &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &); }; ! template class RelationFunctionPtr6 { public: ! RelationFunctionPtr6(void (*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &, const R6 &)) : f_m(f) { } RelationFunctionPtr6( ! const RelationFunctionPtr6 &model) : f_m(model.f_m) { } RelationFunctionPtr6( ! const RelationFunctionPtr6 &init, const L &) : f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5, const R6 &r6) { f_m(l, r1, r2, r3, r4, r5, r6); --- 742,770 ---- private: ! void (*f_m)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &); }; ! template class RelationFunctionPtr6 { public: ! RelationFunctionPtr6(void (*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &, const R6 &)) : f_m(f) { } RelationFunctionPtr6( ! const RelationFunctionPtr6 &model) : f_m(model.f_m) { } RelationFunctionPtr6( ! const RelationFunctionPtr6 &init, const Target &) : f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5, const R6 &r6) { f_m(l, r1, r2, r3, r4, r5, r6); *************** public: *** 769,775 **** private: ! void (*f_m)(const L &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &, const R6 &); }; --- 772,778 ---- private: ! void (*f_m)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &, const R6 &); }; *************** private: *** 778,798 **** // Relation functors supporting the use of member function pointers. //----------------------------------------------------------------------------- ! template class RelationMemberPtr0 { public: ! RelationMemberPtr0(const C &obj, void (C::*f)(const L &)) : obj_m(obj), f_m(f) { } ! RelationMemberPtr0(const RelationMemberPtr0 &model) : obj_m(model.obj_m), f_m(model.f_m) { } ! RelationMemberPtr0(const RelationMemberPtr0 &init, const L &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const L &l) { (obj_m.*f_m)(l); } --- 781,801 ---- // Relation functors supporting the use of member function pointers. //----------------------------------------------------------------------------- ! template class RelationMemberPtr0 { public: ! RelationMemberPtr0(const C &obj, void (C::*f)(const Target &)) : obj_m(obj), f_m(f) { } ! RelationMemberPtr0(const RelationMemberPtr0 &model) : obj_m(model.obj_m), f_m(model.f_m) { } ! RelationMemberPtr0(const RelationMemberPtr0 &init, const Target &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const Target &l) { (obj_m.*f_m)(l); } *************** public: *** 800,824 **** private: C obj_m; ! void (C::*f_m)(const L &); }; ! template class RelationMemberPtr1 { public: ! RelationMemberPtr1(const C &obj, void (C::*f)(const L &, const R1 &)) : obj_m(obj), f_m(f) { } ! RelationMemberPtr1(const RelationMemberPtr1 &model) : obj_m(model.obj_m), f_m(model.f_m) { } ! RelationMemberPtr1(const RelationMemberPtr1 &init, const L &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1) { (obj_m.*f_m)(l, r1); } --- 803,827 ---- private: C obj_m; ! void (C::*f_m)(const Target &); }; ! template class RelationMemberPtr1 { public: ! RelationMemberPtr1(const C &obj, void (C::*f)(const Target &, const R1 &)) : obj_m(obj), f_m(f) { } ! RelationMemberPtr1(const RelationMemberPtr1 &model) : obj_m(model.obj_m), f_m(model.f_m) { } ! RelationMemberPtr1(const RelationMemberPtr1 &init, const Target &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1) { (obj_m.*f_m)(l, r1); } *************** public: *** 826,850 **** private: C obj_m; ! void (C::*f_m)(const L &, const R1 &); }; ! template class RelationMemberPtr2 { public: ! RelationMemberPtr2(const C &obj, void (C::*f)(const L &, const R1 &, const R2 &)) : obj_m(obj), f_m(f) { } ! RelationMemberPtr2(const RelationMemberPtr2 &model) : obj_m(model.obj_m), f_m(model.f_m) { } ! RelationMemberPtr2(const RelationMemberPtr2 &init, const L &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1, const R2 &r2) { (obj_m.*f_m)(l, r1, r2); } --- 829,853 ---- private: C obj_m; ! void (C::*f_m)(const Target &, const R1 &); }; ! template class RelationMemberPtr2 { public: ! RelationMemberPtr2(const C &obj, void (C::*f)(const Target &, const R1 &, const R2 &)) : obj_m(obj), f_m(f) { } ! RelationMemberPtr2(const RelationMemberPtr2 &model) : obj_m(model.obj_m), f_m(model.f_m) { } ! RelationMemberPtr2(const RelationMemberPtr2 &init, const Target &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1, const R2 &r2) { (obj_m.*f_m)(l, r1, r2); } *************** public: *** 852,878 **** private: C obj_m; ! void (C::*f_m)(const L &, const R1 &, const R2 &); }; ! template class RelationMemberPtr3 { public: ! RelationMemberPtr3(const C &obj, void (C::*f)(const L &, const R1 &, const R2 &, const R3 &)) : obj_m(obj), f_m(f) { } RelationMemberPtr3( ! const RelationMemberPtr3 &model) : obj_m(model.obj_m), f_m(model.f_m) { } RelationMemberPtr3( ! const RelationMemberPtr3 &init, const L &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1, const R2 &r2, const R3 &r3) { (obj_m.*f_m)(l, r1, r2, r3); --- 855,881 ---- private: C obj_m; ! void (C::*f_m)(const Target &, const R1 &, const R2 &); }; ! template class RelationMemberPtr3 { public: ! RelationMemberPtr3(const C &obj, void (C::*f)(const Target &, const R1 &, const R2 &, const R3 &)) : obj_m(obj), f_m(f) { } RelationMemberPtr3( ! const RelationMemberPtr3 &model) : obj_m(model.obj_m), f_m(model.f_m) { } RelationMemberPtr3( ! const RelationMemberPtr3 &init, const Target &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1, const R2 &r2, const R3 &r3) { (obj_m.*f_m)(l, r1, r2, r3); *************** public: *** 881,907 **** private: C obj_m; ! void (C::*f_m)(const L &, const R1 &, const R2 &, const R3 &); }; ! template class RelationMemberPtr4 { public: ! RelationMemberPtr4(const C &obj, void (C::*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &)) : obj_m(obj), f_m(f) { } RelationMemberPtr4( ! const RelationMemberPtr4 &model) : obj_m(model.obj_m), f_m(model.f_m) { } RelationMemberPtr4( ! const RelationMemberPtr4 &init, const L &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4) { (obj_m.*f_m)(l, r1, r2, r3, r4); --- 884,910 ---- private: C obj_m; ! void (C::*f_m)(const Target &, const R1 &, const R2 &, const R3 &); }; ! template class RelationMemberPtr4 { public: ! RelationMemberPtr4(const C &obj, void (C::*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &)) : obj_m(obj), f_m(f) { } RelationMemberPtr4( ! const RelationMemberPtr4 &model) : obj_m(model.obj_m), f_m(model.f_m) { } RelationMemberPtr4( ! const RelationMemberPtr4 &init, const Target &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4) { (obj_m.*f_m)(l, r1, r2, r3, r4); *************** public: *** 910,938 **** private: C obj_m; ! void (C::*f_m)(const L &, const R1 &, const R2 &, const R3 &, const R4 &); }; ! template class RelationMemberPtr5 { public: ! RelationMemberPtr5(const C &obj, void (C::*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &)) : obj_m(obj), f_m(f) { } RelationMemberPtr5( ! const RelationMemberPtr5 &model) : obj_m(model.obj_m), f_m(model.f_m) { } RelationMemberPtr5( ! const RelationMemberPtr5 &init, const L &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5) { (obj_m.*f_m)(l, r1, r2, r3, r4, r5); --- 913,941 ---- private: C obj_m; ! void (C::*f_m)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &); }; ! template class RelationMemberPtr5 { public: ! RelationMemberPtr5(const C &obj, void (C::*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &)) : obj_m(obj), f_m(f) { } RelationMemberPtr5( ! const RelationMemberPtr5 &model) : obj_m(model.obj_m), f_m(model.f_m) { } RelationMemberPtr5( ! const RelationMemberPtr5 &init, const Target &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5) { (obj_m.*f_m)(l, r1, r2, r3, r4, r5); *************** public: *** 941,969 **** private: C obj_m; ! void (C::*f_m)(const L &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &); }; ! template class RelationMemberPtr6 { public: ! RelationMemberPtr6(const C &obj, void (C::*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &, const R6 &)) : obj_m(obj), f_m(f) { } RelationMemberPtr6( ! const RelationMemberPtr6 &model) : obj_m(model.obj_m), f_m(model.f_m) { } RelationMemberPtr6( ! const RelationMemberPtr6 &init, const L &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const L &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5, const R6 &r6) { (obj_m.*f_m)(l, r1, r2, r3, r4, r5, r6); --- 944,972 ---- private: C obj_m; ! void (C::*f_m)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &); }; ! template class RelationMemberPtr6 { public: ! RelationMemberPtr6(const C &obj, void (C::*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &, const R6 &)) : obj_m(obj), f_m(f) { } RelationMemberPtr6( ! const RelationMemberPtr6 &model) : obj_m(model.obj_m), f_m(model.f_m) { } RelationMemberPtr6( ! const RelationMemberPtr6 &init, const Target &) : obj_m(init.obj_m), f_m(init.f_m) { } ! inline void operator()(const Target &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5, const R6 &r6) { (obj_m.*f_m)(l, r1, r2, r3, r4, r5, r6); *************** public: *** 972,978 **** private: C obj_m; ! void (C::*f_m)(const L &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &, const R6 &); }; --- 975,981 ---- private: C obj_m; ! void (C::*f_m)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &, const R5 &, const R6 &); }; *************** namespace Pooma { *** 999,1049 **** //--------------------------------------------------------------------------- // Functor versions ! template ! void newRelation(const RelationFunctor &f, const L &l) { for (int m = 0; m < l.numMaterials(); ++m) { for (int c = 0; c < l.centeringSize(); ++c) { ! const L &lsub = l.subField(m, c); ! RelationListItem *r = new Relation0(lsub, f); r->setPriority(RelationFunctorTraits::defaultPriority); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const L &l, const R1 &r1) { for (int m = 0; m < l.numMaterials(); ++m) { for (int c = 0; c < l.centeringSize(); ++c) { ! const L &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); r1sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = new ! Relation1 (lsub, r1sub, f); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const L &l, const R1 &r1, const R2 &r2) { for (int m = 0; m < l.numMaterials(); ++m) { for (int c = 0; c < l.centeringSize(); ++c) { ! const L &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); const R2 &r2sub = r2.subField(m, c); --- 1002,1052 ---- //--------------------------------------------------------------------------- // Functor versions ! template ! void newRelation(const RelationFunctor &f, const Target &l) { for (int m = 0; m < l.numMaterials(); ++m) { for (int c = 0; c < l.centeringSize(); ++c) { ! const Target &lsub = l.subField(m, c); ! RelationListItem *r = new Relation0(lsub, f); r->setPriority(RelationFunctorTraits::defaultPriority); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const Target &l, const R1 &r1) { for (int m = 0; m < l.numMaterials(); ++m) { for (int c = 0; c < l.centeringSize(); ++c) { ! const Target &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); r1sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = new ! Relation1 (lsub, r1sub, f); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const Target &l, const R1 &r1, const R2 &r2) { for (int m = 0; m < l.numMaterials(); ++m) { for (int c = 0; c < l.centeringSize(); ++c) { ! const Target &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); const R2 &r2sub = r2.subField(m, c); *************** namespace Pooma { *** 1051,1071 **** r2sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = ! new Relation2(lsub, r1sub, r2sub, f); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const L &l, const R1 &r1, const R2 &r2, const R3 &r3) { for (int m = 0; m < l.numMaterials(); ++m) { for (int c = 0; c < l.centeringSize(); ++c) { ! const L &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); const R2 &r2sub = r2.subField(m, c); const R3 &r3sub = r3.subField(m, c); --- 1054,1074 ---- r2sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = ! new Relation2(lsub, r1sub, r2sub, f); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const Target &l, const R1 &r1, const R2 &r2, const R3 &r3) { for (int m = 0; m < l.numMaterials(); ++m) { for (int c = 0; c < l.centeringSize(); ++c) { ! const Target &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); const R2 &r2sub = r2.subField(m, c); const R3 &r3sub = r3.subField(m, c); *************** namespace Pooma { *** 1075,1090 **** r3sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = new ! Relation3 (lsub, r1sub, r2sub, r3sub, f); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const L &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4) { --- 1078,1093 ---- r3sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = new ! Relation3 (lsub, r1sub, r2sub, r3sub, f); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const Target &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4) { *************** namespace Pooma { *** 1092,1098 **** { for (int c = 0; c < l.centeringSize(); ++c) { ! const L &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); const R2 &r2sub = r2.subField(m, c); const R3 &r3sub = r3.subField(m, c); --- 1095,1101 ---- { for (int c = 0; c < l.centeringSize(); ++c) { ! const Target &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); const R2 &r2sub = r2.subField(m, c); const R3 &r3sub = r3.subField(m, c); *************** namespace Pooma { *** 1104,1119 **** r4sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = new ! Relation4 (lsub, r1sub, r2sub, r3sub, r4sub, f); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const L &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5) { --- 1107,1122 ---- r4sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = new ! Relation4 (lsub, r1sub, r2sub, r3sub, r4sub, f); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const Target &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5) { *************** namespace Pooma { *** 1121,1127 **** { for (int c = 0; c < l.centeringSize(); ++c) { ! const L &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); const R2 &r2sub = r2.subField(m, c); const R3 &r3sub = r3.subField(m, c); --- 1124,1130 ---- { for (int c = 0; c < l.centeringSize(); ++c) { ! const Target &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); const R2 &r2sub = r2.subField(m, c); const R3 &r3sub = r3.subField(m, c); *************** namespace Pooma { *** 1135,1150 **** r5sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = new ! Relation5 (lsub, r1sub, r2sub, r3sub, r4sub, r5sub, f); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const L &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5, const R6 &r6) { --- 1138,1153 ---- r5sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = new ! Relation5 (lsub, r1sub, r2sub, r3sub, r4sub, r5sub, f); lsub.addRelation(r); } } } ! template ! void newRelation(const RelationFunctor &f, const Target &l, const R1 &r1, const R2 &r2, const R3 &r3, const R4 &r4, const R5 &r5, const R6 &r6) { *************** namespace Pooma { *** 1152,1158 **** { for (int c = 0; c < l.centeringSize(); ++c) { ! const L &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); const R2 &r2sub = r2.subField(m, c); const R3 &r3sub = r3.subField(m, c); --- 1155,1161 ---- { for (int c = 0; c < l.centeringSize(); ++c) { ! const Target &lsub = l.subField(m, c); const R1 &r1sub = r1.subField(m, c); const R2 &r2sub = r2.subField(m, c); const R3 &r3sub = r3.subField(m, c); *************** namespace Pooma { *** 1168,1174 **** r6sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = new ! Relation6 (lsub, r1sub, r2sub, r3sub, r4sub, r5sub, r6sub, f); lsub.addRelation(r); } --- 1171,1177 ---- r6sub.addRelation(new InfluenceRelation(lsub)); RelationListItem *r = new ! Relation6 (lsub, r1sub, r2sub, r3sub, r4sub, r5sub, r6sub, f); lsub.addRelation(r); } *************** namespace Pooma { *** 1178,1297 **** //--------------------------------------------------------------------------- // Function pointer versions ! template ! RelationFunctionPtr0 ! functionPtr(void (*f)(const L &)) { ! return RelationFunctionPtr0(f); } ! template ! RelationFunctionPtr1 ! functionPtr(void (*f)(const L &, const R1 &)) { ! return RelationFunctionPtr1(f); } ! template ! RelationFunctionPtr2 ! functionPtr(void (*f)(const L &, const R1 &, const R2 &)) { ! return RelationFunctionPtr2(f); } ! template ! RelationFunctionPtr3 ! functionPtr(void (*f)(const L &, const R1 &, const R2 &, const R3 &)) { ! return RelationFunctionPtr3(f); } ! template ! RelationFunctionPtr4 ! functionPtr(void (*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &r4)) { ! return RelationFunctionPtr4(f); } ! template ! RelationFunctionPtr5 ! functionPtr(void (*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &r4, const R5 &r5)) { ! return RelationFunctionPtr5(f); } ! template ! RelationFunctionPtr6 ! functionPtr(void (*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &r4, const R5 &r5, const R6 &r6)) { ! return RelationFunctionPtr6(f); } //--------------------------------------------------------------------------- // Member function pointer versions ! template ! RelationMemberPtr0 ! memberPtr(const C &obj, void (C::*f)(const L &)) { ! return RelationMemberPtr0(obj, f); } ! template ! RelationMemberPtr1 ! memberPtr(const C &obj, void (C::*f)(const L &, const R1 &)) { ! return RelationMemberPtr1(obj, f); } ! template ! RelationMemberPtr2 ! memberPtr(const C &obj, void (C::*f)(const L &, const R1 &, const R2 &)) { ! return RelationMemberPtr2(obj, f); } ! template ! RelationMemberPtr3 memberPtr(const C &obj, ! void (C::*f)(const L &, const R1 &, const R2 &, const R3 &)) { ! return RelationMemberPtr3(obj, f); } ! template ! RelationMemberPtr4 memberPtr(const C &obj, ! void (C::*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &r4)) { ! return RelationMemberPtr4(obj, f); } ! template ! RelationMemberPtr5 memberPtr(const C &obj, ! void (C::*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &r4, const R5 &r5)) { ! return RelationMemberPtr5(obj, f); } ! template ! RelationMemberPtr6 memberPtr(const C &obj, ! void (C::*f)(const L &, const R1 &, const R2 &, const R3 &, const R4 &r4, const R5 &r5, const R6 &r6)) { ! return RelationMemberPtr6(obj, f); } } // namespace Pooma --- 1181,1300 ---- //--------------------------------------------------------------------------- // Function pointer versions ! template ! RelationFunctionPtr0 ! functionPtr(void (*f)(const Target &)) { ! return RelationFunctionPtr0(f); } ! template ! RelationFunctionPtr1 ! functionPtr(void (*f)(const Target &, const R1 &)) { ! return RelationFunctionPtr1(f); } ! template ! RelationFunctionPtr2 ! functionPtr(void (*f)(const Target &, const R1 &, const R2 &)) { ! return RelationFunctionPtr2(f); } ! template ! RelationFunctionPtr3 ! functionPtr(void (*f)(const Target &, const R1 &, const R2 &, const R3 &)) { ! return RelationFunctionPtr3(f); } ! template ! RelationFunctionPtr4 ! functionPtr(void (*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &r4)) { ! return RelationFunctionPtr4(f); } ! template ! RelationFunctionPtr5 ! functionPtr(void (*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &r4, const R5 &r5)) { ! return RelationFunctionPtr5(f); } ! template ! RelationFunctionPtr6 ! functionPtr(void (*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &r4, const R5 &r5, const R6 &r6)) { ! return RelationFunctionPtr6(f); } //--------------------------------------------------------------------------- // Member function pointer versions ! template ! RelationMemberPtr0 ! memberPtr(const C &obj, void (C::*f)(const Target &)) { ! return RelationMemberPtr0(obj, f); } ! template ! RelationMemberPtr1 ! memberPtr(const C &obj, void (C::*f)(const Target &, const R1 &)) { ! return RelationMemberPtr1(obj, f); } ! template ! RelationMemberPtr2 ! memberPtr(const C &obj, void (C::*f)(const Target &, const R1 &, const R2 &)) { ! return RelationMemberPtr2(obj, f); } ! template ! RelationMemberPtr3 memberPtr(const C &obj, ! void (C::*f)(const Target &, const R1 &, const R2 &, const R3 &)) { ! return RelationMemberPtr3(obj, f); } ! template ! RelationMemberPtr4 memberPtr(const C &obj, ! void (C::*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &r4)) { ! return RelationMemberPtr4(obj, f); } ! template ! RelationMemberPtr5 memberPtr(const C &obj, ! void (C::*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &r4, const R5 &r5)) { ! return RelationMemberPtr5(obj, f); } ! template ! RelationMemberPtr6 memberPtr(const C &obj, ! void (C::*f)(const Target &, const R1 &, const R2 &, const R3 &, const R4 &r4, const R5 &r5, const R6 &r6)) { ! return RelationMemberPtr6(obj, f); } } // namespace Pooma