declareRunTimeSelectionTable在基类中可否同时调用两个?
-
各位前辈好,我最近准备从其他版本移植一个动网格功能时发现新旧版本之间motionSolver类在调用declareRunTimeSelectionTable函数时存在不同,旧版本中argList使用了Istream,新版本改为了Iodictionary。这导致旧版本的派生类移植到新版本遇到问题,如果直接改新版本的话又会导致其他派生类出现问题。因此可否在基类motionSolver中调用两次declareRunTimeSelectionTable,argList分别使用Istream和Iodictionary?
事实上我在polyPatch.H中看到了调用两个declareRunTimeSelectionTable的例子:TypeName("patch"); //- Debug switch to disallow the use of genericPolyPatch static int disallowGenericPolyPatch; // Declare run-time constructor selection tables declareRunTimeSelectionTable ( autoPtr, polyPatch, word, ( const word& name, const label size, const label start, const label index, const polyBoundaryMesh& bm, const word& patchType ), (name, size, start, index, bm, patchType) ); declareRunTimeSelectionTable ( autoPtr, polyPatch, dictionary, ( const word& name, const dictionary& dict, const label index, const polyBoundaryMesh& bm, const word& patchType ), (name, dict, index, bm, patchType) );
但是不清楚是否是为了实现上述的功能?