Commit f19f4813 authored by Henry Weller's avatar Henry Weller
Browse files

Consistently indent continuation backslashes in macro definitions

parent 56fa7c09
......@@ -150,10 +150,10 @@ public:
// Instantiation for multi-component-multi-component pairs
#define makeInterfaceCompositionType(Type, Thermo, Comp, Mix, Phys, OtherThermo, OtherComp, OtherMix, OtherPhys)\
\
typedef Thermo<Comp, SpecieMixture<Mix<Phys>>> \
typedef Thermo<Comp, SpecieMixture<Mix<Phys>>> \
Type##Thermo##Comp##Mix##Phys; \
\
typedef OtherThermo<OtherComp, OtherMix<OtherPhys>> \
typedef OtherThermo<OtherComp, OtherMix<OtherPhys>> \
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys; \
\
addInterfaceCompositionToRunTimeSelectionTable \
......@@ -166,10 +166,10 @@ public:
// Instantiation for multi-component-single-component pairs
#define makeSpecieInterfaceCompositionType(Type, Thermo, Comp, Mix, Phys, OtherThermo, OtherComp, OtherMix, OtherPhys)\
\
typedef Thermo<Comp, SpecieMixture<Mix<Phys>>> \
typedef Thermo<Comp, SpecieMixture<Mix<Phys>>> \
Type##Thermo##Comp##Mix##Phys; \
\
typedef OtherThermo<OtherComp, SpecieMixture<OtherMix<OtherPhys>>> \
typedef OtherThermo<OtherComp, SpecieMixture<OtherMix<OtherPhys>>> \
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys; \
\
addInterfaceCompositionToRunTimeSelectionTable \
......
......@@ -58,33 +58,33 @@ packDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@')
# - exclude Doxygen documentation etc
#
find -H $packDir \
! -type d \
\( -type f -o -type l \) \
! -name "*~" \
-a ! -name ".*~" \
-a ! -name "*.orig" \
-a ! -name "*.dep" \
-a ! -name "*.o" \
-a ! -name "*.so" \
-a ! -name "*.a" \
-a ! -name "*.tar" \
-a ! -name "*.tar.gz" \
-a ! -name "*.tgz" \
-a ! -name "*.tar.bz2" \
-a ! -name "*.tbz" \
-a ! -name "core" \
-a ! -name "core.[1-9]*" \
-a ! -name "libccmio*" \
| sed \
-e '\@/\.git/@d' \
-e '\@/\.tags/@d' \
-e '\@/platforms/@d' \
-e '\@/t/@d' \
-e '\@/Make[.A-Za-z]*/[^/]*/@d' \
-e '\@/[Dd]oxygen/html/@d' \
-e '\@/download/@d' \
-e '\@/libccmio-.*/@d' \
find -H $packDir \
! -type d \
\( -type f -o -type l \) \
! -name "*~" \
-a ! -name ".*~" \
-a ! -name "*.orig" \
-a ! -name "*.dep" \
-a ! -name "*.o" \
-a ! -name "*.so" \
-a ! -name "*.a" \
-a ! -name "*.tar" \
-a ! -name "*.tar.gz" \
-a ! -name "*.tgz" \
-a ! -name "*.tar.bz2" \
-a ! -name "*.tbz" \
-a ! -name "core" \
-a ! -name "core.[1-9]*" \
-a ! -name "libccmio*" \
| sed \
-e '\@/\.git/@d' \
-e '\@/\.tags/@d' \
-e '\@/platforms/@d' \
-e '\@/t/@d' \
-e '\@/Make[.A-Za-z]*/[^/]*/@d' \
-e '\@/[Dd]oxygen/html/@d' \
-e '\@/download/@d' \
-e '\@/libccmio-.*/@d' \
-e '\@\./debian/@d'
......
......@@ -31,18 +31,18 @@ License
#if (UINT_MAX == 0xFFFFFFFF)
// 32-bit counting, Hamming weight method
# define COUNT_PACKEDBITS(sum, x) \
{ \
x -= (x >> 1) & 0x55555555; \
x = (x & 0x33333333) + ((x >> 2) & 0x33333333); \
sum += (((x + (x >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24; \
# define COUNT_PACKEDBITS(sum, x) \
{ \
x -= (x >> 1) & 0x55555555; \
x = (x & 0x33333333) + ((x >> 2) & 0x33333333); \
sum += (((x + (x >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24; \
}
#elif (UINT_MAX == 0xFFFFFFFFFFFFFFFF)
// 64-bit counting, Hamming weight method
# define COUNT_PACKEDBITS(sum, x) \
{ \
x -= (x >> 1) & 0x5555555555555555; \
x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333); \
# define COUNT_PACKEDBITS(sum, x) \
{ \
x -= (x >> 1) & 0x5555555555555555; \
x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333); \
sum += (((x + (x >> 4)) & 0x0F0F0F0F0F0F0F0F) * 0x0101010101010101) >> 56;\
}
#else
......
......@@ -440,11 +440,11 @@ ostream& operator<<(ostream&, const InfoProxy<token>&);
template<>
Ostream& operator<<(Ostream& os, const InfoProxy<token>& ip);
#define defineCompoundTypeName(Type, Name) \
#define defineCompoundTypeName(Type, Name) \
defineTemplateTypeNameAndDebugWithName(token::Compound<Type>, #Type, 0);
#define addCompoundToRunTimeSelectionTable(Type, Name) \
token::compound::addIstreamConstructorToTable<token::Compound<Type>> \
#define addCompoundToRunTimeSelectionTable(Type, Name) \
token::compound::addIstreamConstructorToTable<token::Compound<Type>> \
add##Name##IstreamConstructorToTable_;
......
......@@ -74,10 +74,10 @@ class StaticAssertionTest {};
// ~~~~~~~~~~~~~
//- Assert that some test is true at compile-time
#define StaticAssert(Test) \
typedef ::Foam::StaticAssertionTest \
< \
sizeof( ::Foam::StaticAssertionFailed<((Test) ? true : false)>) \
#define StaticAssert(Test) \
typedef ::Foam::StaticAssertionTest \
< \
sizeof( ::Foam::StaticAssertionFailed<((Test) ? true : false)>) \
> StaticAssertMacro(StaticAssertionTest, __LINE__)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -34,39 +34,39 @@ Description
// add to hash-table of functions with typename as the key
#define addToRunTimeSelectionTable\
(baseType,thisType,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType::add##argNames##ConstructorToTable<thisType> \
(baseType,thisType,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType::add##argNames##ConstructorToTable<thisType> \
add##thisType##argNames##ConstructorTo##baseType##Table_
// add to hash-table of functions with 'lookup' as the key
#define addNamedToRunTimeSelectionTable\
(baseType,thisType,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType::add##argNames##ConstructorToTable<thisType> \
add_##lookup##_##thisType##argNames##ConstructorTo##baseType##Table_ \
(baseType,thisType,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType::add##argNames##ConstructorToTable<thisType> \
add_##lookup##_##thisType##argNames##ConstructorTo##baseType##Table_ \
(#lookup)
// add to hash-table of functions with typename as the key
#define addRemovableToRunTimeSelectionTable\
(baseType,thisType,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType::addRemovable##argNames##ConstructorToTable<thisType> \
(baseType,thisType,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType::addRemovable##argNames##ConstructorToTable<thisType> \
addRemovable##thisType##argNames##ConstructorTo##baseType##Table_
// add to hash-table of functions with 'lookup' as the key
#define addRemovableNamedToRunTimeSelectionTable\
(baseType,thisType,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType::addRemovable##argNames##ConstructorToTable<thisType> \
addRemovable_##lookup##_##thisType##argNames##ConstructorTo \
(baseType,thisType,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType::addRemovable##argNames##ConstructorToTable<thisType> \
addRemovable_##lookup##_##thisType##argNames##ConstructorTo \
##baseType##Table_(#lookup)
......@@ -76,21 +76,21 @@ Description
// add to hash-table of functions with typename as the key
// use when baseType doesn't need a template argument (eg, is a typedef)
#define addTemplateToRunTimeSelectionTable\
(baseType,thisType,Targ,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType::add##argNames##ConstructorToTable<thisType<Targ>> \
(baseType,thisType,Targ,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType::add##argNames##ConstructorToTable<thisType<Targ>> \
add##thisType##Targ##argNames##ConstructorTo##baseType##Table_
// add to hash-table of functions with 'lookup' as the key
// use when baseType doesn't need a template argument (eg, is a typedef)
#define addNamedTemplateToRunTimeSelectionTable\
(baseType,thisType,Targ,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType::add##argNames##ConstructorToTable<thisType<Targ>> \
add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType \
(baseType,thisType,Targ,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType::add##argNames##ConstructorToTable<thisType<Targ>> \
add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType \
##Table_(#lookup)
......@@ -100,21 +100,21 @@ Description
// add to hash-table of functions with typename as the key
// use when baseType requires the Targ template argument as well
#define addTemplatedToRunTimeSelectionTable\
(baseType,thisType,Targ,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType<Targ>::add##argNames##ConstructorToTable<thisType<Targ>> \
(baseType,thisType,Targ,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType<Targ>::add##argNames##ConstructorToTable<thisType<Targ>> \
add##thisType##Targ##argNames##ConstructorTo##baseType##Targ##Table_
// add to hash-table of functions with 'lookup' as the key
// use when baseType requires the Targ template argument as well
#define addNamedTemplatedToRunTimeSelectionTable\
(baseType,thisType,Targ,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType<Targ>::add##argNames##ConstructorToTable<thisType<Targ>> \
add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType## \
(baseType,thisType,Targ,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType<Targ>::add##argNames##ConstructorToTable<thisType<Targ>> \
add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType## \
Targ##Table_(#lookup)
......
......@@ -36,10 +36,10 @@ Description
// add to hash-table of functions with 'lookup' as the key
#define addNamedToGlobalFunctionSelectionTable\
(memberFunction,argNames,lookup,functionPtr) \
\
/* Add to the table, find by lookup name */ \
add##memberFunction##argNames##GlobalMemberFunctionToTable \
(memberFunction,argNames,lookup,functionPtr) \
\
/* Add to the table, find by lookup name */ \
add##memberFunction##argNames##GlobalMemberFunctionToTable \
add_##lookup##_##memberFunction##argNames##GlobalMemberFunctionTo##Table_ \
(#lookup, functionPtr)
......
......@@ -40,87 +40,87 @@ Description
// ~~~~~~~~~~~~~
// declare a run-time selection:
#define declareGlobalFunctionSelectionTable\
(returnType,memberFunction,argNames,argList,parList) \
\
/* Construct from argList function pointer type */ \
(returnType,memberFunction,argNames,argList,parList) \
\
/* Construct from argList function pointer type */ \
typedef returnType (*memberFunction##argNames##MemberFunctionPtr)argList; \
\
/* Construct from argList function table type */ \
typedef HashTable \
<memberFunction##argNames##MemberFunctionPtr, word, string::hash> \
memberFunction##argNames##MemberFunctionTable; \
\
/* Construct from argList function pointer table pointer */ \
extern memberFunction##argNames##MemberFunctionTable* \
memberFunction##argNames##MemberFunctionTablePtr_; \
\
/* Table memberFunction called from the table add function */ \
void construct##memberFunction##argNames##MemberFunctionTables(); \
\
/* Table destructor called from the table add function destructor */ \
void destroy##memberFunction##argNames##MemberFunctionTables(); \
\
/* Class to add constructor from argList to table */ \
class add##memberFunction##argNames##GlobalMemberFunctionToTable \
{ \
public: \
\
add##memberFunction##argNames##GlobalMemberFunctionToTable \
( \
const word& lookup, \
memberFunction##argNames##MemberFunctionPtr function \
) \
{ \
construct##memberFunction##argNames##MemberFunctionTables(); \
memberFunction##argNames##MemberFunctionTablePtr_->insert \
( \
lookup, \
function \
); \
} \
\
~add##memberFunction##argNames##GlobalMemberFunctionToTable() \
{ \
destroy##memberFunction##argNames##MemberFunctionTables(); \
} \
\
/* Construct from argList function table type */ \
typedef HashTable \
<memberFunction##argNames##MemberFunctionPtr, word, string::hash> \
memberFunction##argNames##MemberFunctionTable; \
\
/* Construct from argList function pointer table pointer */ \
extern memberFunction##argNames##MemberFunctionTable* \
memberFunction##argNames##MemberFunctionTablePtr_; \
\
/* Table memberFunction called from the table add function */ \
void construct##memberFunction##argNames##MemberFunctionTables(); \
\
/* Table destructor called from the table add function destructor */ \
void destroy##memberFunction##argNames##MemberFunctionTables(); \
\
/* Class to add constructor from argList to table */ \
class add##memberFunction##argNames##GlobalMemberFunctionToTable \
{ \
public: \
\
add##memberFunction##argNames##GlobalMemberFunctionToTable \
( \
const word& lookup, \
memberFunction##argNames##MemberFunctionPtr function \
) \
{ \
construct##memberFunction##argNames##MemberFunctionTables(); \
memberFunction##argNames##MemberFunctionTablePtr_->insert \
( \
lookup, \
function \
); \
} \
\
~add##memberFunction##argNames##GlobalMemberFunctionToTable() \
{ \
destroy##memberFunction##argNames##MemberFunctionTables(); \
} \
}
// internal use:
// constructor/destructor aid
#define defineGlobalFunctionSelectionTableConstructDestruct\
(memberFunction,argNames) \
\
/* Table constructor called from the table add function */ \
void construct##memberFunction##argNames##MemberFunctionTables() \
{ \
static bool constructed = false; \
if (!constructed) \
{ \
constructed = true; \
memberFunction##argNames##MemberFunctionTablePtr_ \
= new memberFunction##argNames##MemberFunctionTable; \
} \
} \
\
/* Table destructor called from the table add function destructor */ \
void destroy##memberFunction##argNames##MemberFunctionTables() \
{ \
if (memberFunction##argNames##MemberFunctionTablePtr_) \
{ \
delete memberFunction##argNames##MemberFunctionTablePtr_; \
memberFunction##argNames##MemberFunctionTablePtr_ = NULL; \
} \
(memberFunction,argNames) \
\
/* Table constructor called from the table add function */ \
void construct##memberFunction##argNames##MemberFunctionTables() \
{ \
static bool constructed = false; \
if (!constructed) \
{ \
constructed = true; \
memberFunction##argNames##MemberFunctionTablePtr_ \
= new memberFunction##argNames##MemberFunctionTable; \
} \
} \
\
/* Table destructor called from the table add function destructor */ \
void destroy##memberFunction##argNames##MemberFunctionTables() \
{ \
if (memberFunction##argNames##MemberFunctionTablePtr_) \
{ \
delete memberFunction##argNames##MemberFunctionTablePtr_; \
memberFunction##argNames##MemberFunctionTablePtr_ = NULL; \
} \
}
// internal use:
// create pointer to hash-table of functions
#define defineGlobalFunctionSelectionTablePtr\
(memberFunction,argNames) \
\
/* Define the memberFunction table */ \
memberFunction##argNames##MemberFunctionTable* \
(memberFunction,argNames) \
\
/* Define the memberFunction table */ \
memberFunction##argNames##MemberFunctionTable* \
memberFunction##argNames##MemberFunctionTablePtr_ = NULL
......@@ -130,11 +130,11 @@ Description
// ~~~~~~~~~~~~~
// define run-time selection table
#define defineGlobalFunctionSelectionTable\
(memberFunction,argNames) \
\
defineGlobalFunctionSelectionTablePtr \
(memberFunction,argNames); \
defineGlobalFunctionSelectionTableConstructDestruct \
(memberFunction,argNames) \
\
defineGlobalFunctionSelectionTablePtr \
(memberFunction,argNames); \
defineGlobalFunctionSelectionTableConstructDestruct \
(memberFunction,argNames)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -37,21 +37,21 @@ Description
// add to hash-table of functions with typename as the key
#define addToMemberFunctionSelectionTable\
(baseType,thisType,memberFunction,argNames) \
\
/* Add the thisType memberFunction to the table */ \
baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType> \
(baseType,thisType,memberFunction,argNames) \
\
/* Add the thisType memberFunction to the table */ \
baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType> \
add##thisType##memberFunction##argNames##MemberFunctionTo##baseType##Table_
// add to hash-table of functions with 'lookup' as the key
#define addNamedToMemberFunctionSelectionTable\
(baseType,thisType,memberFunction,argNames,lookup) \
\
/* Add the thisType memberFunction to the table, find by lookup name */ \
baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType> \
add_##lookup##_##thisType##memberFunction##argNames##MemberFunctionTo## \
(baseType,thisType,memberFunction,argNames,lookup) \
\
/* Add the thisType memberFunction to the table, find by lookup name */ \
baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType> \
add_##lookup##_##thisType##memberFunction##argNames##MemberFunctionTo## \
baseType##Table_(#lookup)
......@@ -61,44 +61,44 @@ Description
// add to hash-table of functions with typename as the key
// use when baseType doesn't need a template argument (eg, is a typedef)
#define addTemplateToMemberFunctionSelectionTable\
(baseType,thisType,Targ,memberFunction,argNames) \
\
/* Add the thisType memberFunction to the table */ \
baseType::add##memberFunction##argNames## \
MemberFunctionToTable<thisType<Targ>> \
add##thisType##Targ##memberFunction##argNames##MemberFunctionTo## \
(baseType,thisType,Targ,memberFunction,argNames) \
\
/* Add the thisType memberFunction to the table */ \
baseType::add##memberFunction##argNames## \
MemberFunctionToTable<thisType<Targ>> \
add##thisType##Targ##memberFunction##argNames##MemberFunctionTo## \
baseType##Table_
// add to hash-table of functions with 'lookup' as the key
// use when baseType doesn't need a template argument (eg, is a typedef)
#define addNamedTemplateToMemberFunctionSelectionTable\
(baseType,thisType,Targ,memberFunction,argNames,lookup) \
\
/* Add the thisType memberFunction to the table, find by lookup name */ \
baseType::add##memberFunction##argNames## \
MemberFunctionToTable<thisType<Targ>> \
add_##lookup##_##thisType##Targ##memberFunction##argNames## \
(baseType,thisType,Targ,memberFunction,argNames,lookup) \
\
/* Add the thisType memberFunction to the table, find by lookup name */ \
baseType::add##memberFunction##argNames## \
MemberFunctionToTable<thisType<Targ>> \
add_##lookup##_##thisType##Targ##memberFunction##argNames## \
MemberFunctionTo##baseType##Table_(#lookup)
// use when baseType requires the Targ template argument as well
#define addTemplatedToMemberFunctionSelectionTable\
(baseType,thisType,Targ,memberFunction,argNames) \
\
/* Add the thisType memberFunction to the table */ \
baseType<Targ>::add##memberFunction##argNames## \
MemberFunctionToTable<thisType<Targ>> \
add##thisType##Targ##memberFunction##argNames##MemberFunctionTo## \
(baseType,thisType,Targ,memberFunction,argNames) \
\
/* Add the thisType memberFunction to the table */ \
baseType<Targ>::add##memberFunction##argNames## \
MemberFunctionToTable<thisType<Targ>> \
add##thisType##Targ##memberFunction##argNames##MemberFunctionTo## \
baseType##Targ##Table_
// use when baseType requires the Targ template argument as well
#define addNamedTemplatedToMemberFunctionSelectionTable\
(baseType,thisType,Targ,memberFunction,argNames,lookup) \
\
/* Add the thisType memberFunction to the table, find by lookup name */ \
baseType<Targ>::add##memberFunction##argNames## \
MemberFunctionToTable<thisType<Targ>> \
add_##lookup##_##thisType##Targ##memberFunction##argNames## \
(baseType,thisType,Targ,memberFunction,argNames,lookup) \
\
/* Add the thisType memberFunction to the table, find by lookup name */ \
baseType<Targ>::add##memberFunction##argNames## \
MemberFunctionToTable<thisType<Targ>> \
add_##lookup##_##thisType##Targ##memberFunction##argNames## \
MemberFunctionTo##baseType##Targ##Table_(#lookup)
......@@ -108,24 +108,24 @@ Description