ENH: support file-scope 'localCode' in dynamicCode

This commit is contained in:
Mark Olesen
2011-03-08 11:08:42 +01:00
parent 8c3a8fcd21
commit e8a3587df4
6 changed files with 58 additions and 8 deletions

View File

@ -34,22 +34,37 @@ Description
${codeInclude}
//}}} end codeInclude
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
//{{{ begin localCode
${localCode}
//}}} end localCode
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
extern "C"
{
void ${typeName}(Ostream& os, const dictionary& dict)
void ${typeName}
(
Ostream& os,
const dictionary& dict
)
{
//{{{ begin code
${code};
${code}
//}}} end code
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //