Commit 8d8a8ef8 authored by Mark Olesen's avatar Mark Olesen
Browse files

db/runTimeSelection - fixed up missing/extra semi-colons

parent eb3c47c7
......@@ -147,8 +147,7 @@ const Type& Foam::objectRegistry::lookupObject(const word& name) const
}
}
const Type* dummyPtr_ = NULL;
return *dummyPtr_;
return *reinterpret_cast< const Type* >(0);
}
......
......@@ -41,7 +41,7 @@ Description
(baseType,thisType,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType::add##argNames##ConstructorToTable<thisType> \
baseType::add##argNames##ConstructorToTable< thisType > \
add##thisType##argNames##ConstructorTo##baseType##Table_
......@@ -50,7 +50,7 @@ Description
(baseType,thisType,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType::add##argNames##ConstructorToTable<thisType> \
baseType::add##argNames##ConstructorToTable< thisType > \
add_##lookup##_##thisType##argNames##ConstructorTo##baseType##Table_(#lookup)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -62,7 +62,7 @@ Description
(baseType,thisType,Targ,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType::add##argNames##ConstructorToTable<thisType<Targ> > \
baseType::add##argNames##ConstructorToTable< thisType< Targ > > \
add##thisType##Targ##argNames##ConstructorTo##baseType##Table_
......@@ -72,7 +72,7 @@ Description
(baseType,thisType,Targ,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType::add##argNames##ConstructorToTable<thisType<Targ> > \
baseType::add##argNames##ConstructorToTable< thisType< Targ > > \
add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType##Table_(#lookup)
......@@ -85,7 +85,7 @@ Description
(baseType,thisType,Targ,argNames) \
\
/* Add the thisType constructor function to the table */ \
baseType<Targ>::add##argNames##ConstructorToTable<thisType<Targ> > \
baseType< Targ >::add##argNames##ConstructorToTable< thisType< Targ > > \
add##thisType##Targ##argNames##ConstructorTo##baseType##Targ##Table_
......@@ -95,7 +95,7 @@ Description
(baseType,thisType,Targ,argNames,lookup) \
\
/* Add the thisType constructor function to the table, find by lookup */ \
baseType<Targ>::add##argNames##ConstructorToTable<thisType<Targ> > \
baseType< Targ >::add##argNames##ConstructorToTable< thisType< Targ > > \
add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType##Targ##Table_(#lookup)
......
......@@ -54,24 +54,24 @@ Description
(autoPtr,baseType,argNames,argList,parList) \
\
/* Construct from argList function pointer type */ \
typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList; \
typedef autoPtr< baseType > (*argNames##ConstructorPtr)argList; \
\
/* Construct from argList function table type */ \
typedef HashTable<argNames##ConstructorPtr, word, string::hash> \
typedef HashTable< argNames##ConstructorPtr, word, string::hash > \
argNames##ConstructorTable; \
\
/* Construct from argList function pointer table pointer */ \
static argNames##ConstructorTable* argNames##ConstructorTablePtr_; \
\
/* Class to add constructor from argList to table */ \
template<class baseType##Type> \
template< class baseType##Type > \
class add##argNames##ConstructorToTable \
{ \
public: \
\
static autoPtr<baseType> New argList \
static autoPtr< baseType > New argList \
{ \
return autoPtr<baseType>(new baseType##Type parList); \
return autoPtr< baseType >(new baseType##Type parList); \
} \
\
add##argNames##ConstructorToTable \
......@@ -103,24 +103,24 @@ Description
(autoPtr,baseType,argNames,argList,parList) \
\
/* Construct from argList function pointer type */ \
typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList; \
typedef autoPtr< baseType > (*argNames##ConstructorPtr)argList; \
\
/* Construct from argList function table type */ \
typedef HashTable<argNames##ConstructorPtr, word, string::hash> \
typedef HashTable< argNames##ConstructorPtr, word, string::hash > \
argNames##ConstructorTable; \
\
/* Construct from argList function pointer table pointer */ \
static argNames##ConstructorTable* argNames##ConstructorTablePtr_; \
\
/* Class to add constructor from argList to table */ \
template<class baseType##Type> \
template< class baseType##Type > \
class add##argNames##ConstructorToTable \
{ \
public: \
\
static autoPtr<baseType> New##baseType argList \
static autoPtr< baseType > New##baseType argList \
{ \
return autoPtr<baseType>(baseType##Type::New parList.ptr()); \
return autoPtr< baseType >(baseType##Type::New parList.ptr()); \
} \
\
add##argNames##ConstructorToTable \
......@@ -213,7 +213,7 @@ Description
(baseType,argNames) \
\
defineRunTimeSelectionTablePtr(baseType,argNames); \
defineRunTimeSelectionTableConstructor(baseType,argNames) \
defineRunTimeSelectionTableConstructor(baseType,argNames); \
defineRunTimeSelectionTableDestructor(baseType,argNames)
......@@ -227,7 +227,7 @@ Description
template<> \
defineRunTimeSelectionTablePtr(baseType,argNames); \
template<> \
defineRunTimeSelectionTableConstructor(baseType,argNames) \
defineRunTimeSelectionTableConstructor(baseType,argNames); \
template<> \
defineRunTimeSelectionTableDestructor(baseType,argNames)
......@@ -242,14 +242,14 @@ Description
(baseType,argNames,Targ) \
\
/* Table constructor called from the table add function */ \
void baseType<Targ>::construct##argNames##ConstructorTables() \
void baseType< Targ >::construct##argNames##ConstructorTables() \
{ \
static bool constructed = false; \
\
if (!constructed) \
{ \
baseType<Targ>::argNames##ConstructorTablePtr_ \
= new baseType<Targ>::argNames##ConstructorTable; \
baseType< Targ >::argNames##ConstructorTablePtr_ \
= new baseType< Targ >::argNames##ConstructorTable; \
\
constructed = true; \
} \
......@@ -263,12 +263,12 @@ Description
(baseType,argNames,Targ) \
\
/* Table destructor called from the table add function destructor */ \
void baseType<Targ>::destroy##argNames##ConstructorTables() \
void baseType< Targ >::destroy##argNames##ConstructorTables() \
{ \
if (baseType<Targ>::argNames##ConstructorTablePtr_) \
if (baseType< Targ >::argNames##ConstructorTablePtr_) \
{ \
delete baseType<Targ>::argNames##ConstructorTablePtr_; \
baseType<Targ>::argNames##ConstructorTablePtr_ = NULL; \
delete baseType< Targ >::argNames##ConstructorTablePtr_; \
baseType< Targ >::argNames##ConstructorTablePtr_ = NULL; \
} \
}
......@@ -280,8 +280,8 @@ Description
(baseType,argNames,Targ) \
\
/* Define the constructor function table */ \
baseType<Targ>::argNames##ConstructorTable* \
baseType<Targ>::argNames##ConstructorTablePtr_ = NULL
baseType< Targ >::argNames##ConstructorTable* \
baseType< Targ >::argNames##ConstructorTablePtr_ = NULL
// external use:
......@@ -294,7 +294,7 @@ Description
template<> \
defineTemplatedRunTimeSelectionTablePtr(baseType,argNames,Targ); \
template<> \
defineTemplatedRunTimeSelectionTableConstructor(baseType,argNames,Targ) \
defineTemplatedRunTimeSelectionTableConstructor(baseType,argNames,Targ); \
template<> \
defineTemplatedRunTimeSelectionTableDestructor(baseType,argNames,Targ)
......
......@@ -44,13 +44,13 @@ Description
// Without debug information
#define ClassNameNoDebug(TypeNameString) \
static const char* typeName_() { return TypeNameString; } \
static const ::Foam::word typeName;
static const ::Foam::word typeName
//- Add typeName information from argument @a TypeNameString to a namespace.
// Without debug information.
#define NamespaceNameNoDebug(TypeNameString) \
inline const char* typeName_() { return TypeNameString; } \
extern const ::Foam::word typeName;
extern const ::Foam::word typeName
//- Add typeName information from argument @a TemplateNameString to a template class.
// Without debug information.
......@@ -60,7 +60,7 @@ class TemplateNameString##Name \
public: \
TemplateNameString##Name() {} \
ClassNameNoDebug(#TemplateNameString); \
};
}
......@@ -89,7 +89,7 @@ class TemplateNameString##Name \
public: \
TemplateNameString##Name() {} \
ClassName(#TemplateNameString); \
};
}
......@@ -100,30 +100,30 @@ public: \
//- Define the typeName, with alternative lookup as @a Name
#define defineTypeNameWithName(Type, Name) \
const ::Foam::word Type::typeName(Name);
const ::Foam::word Type::typeName(Name)
//- Define the typeName
#define defineTypeName(Type) \
defineTypeNameWithName(Type, Type::typeName_());
defineTypeNameWithName(Type, Type::typeName_())
#ifdef __INTEL_COMPILER
//- Define the typeName as @a Name for template classes
# define defineTemplateTypeNameWithName(Type, Name) \
defineTypeNameWithName(Type, Name);
defineTypeNameWithName(Type, Name)
#else
//- Define the typeName as @a Name for template classes
# define defineTemplateTypeNameWithName(Type, Name) \
template<> \
defineTypeNameWithName(Type, Name);
defineTypeNameWithName(Type, Name)
#endif
//- Define the typeName for template classes, useful with typedefs
#define defineTemplateTypeName(Type) \
defineTemplateTypeNameWithName(Type, #Type);
defineTemplateTypeNameWithName(Type, #Type)
//- Define the typeName directly for template classes
#define defineNamedTemplateTypeName(Type) \
defineTemplateTypeNameWithName(Type, Type::typeName_());
defineTemplateTypeNameWithName(Type, Type::typeName_())
......@@ -134,31 +134,31 @@ public: \
//- Define the debug information, lookup as @a Name
#define defineDebugSwitchWithName(Type, Name, DebugSwitch) \
int Type::debug(::Foam::debug::debugSwitch(Name, DebugSwitch));
int Type::debug(::Foam::debug::debugSwitch(Name, DebugSwitch))
//- Define the debug information
#define defineDebugSwitch(Type, DebugSwitch) \
defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch);
defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
#ifdef __INTEL_COMPILER
//- Define the debug information for templates, lookup as @a Name
# define defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch) \
defineDebugSwitchWithName(Type, Name, DebugSwitch);
defineDebugSwitchWithName(Type, Name, DebugSwitch)
#else
//- Define the debug information for templates, lookup as @a Name
# define defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch) \
template<> \
defineDebugSwitchWithName(Type, Name, DebugSwitch);
defineDebugSwitchWithName(Type, Name, DebugSwitch)
#endif
//- Define the debug information for templates
// Useful with typedefs
#define defineTemplateDebugSwitch(Type, DebugSwitch) \
defineTemplateDebugSwitchWithName(Type, #Type, DebugSwitch);
defineTemplateDebugSwitchWithName(Type, #Type, DebugSwitch)
//- Define the debug information directly for templates
#define defineNamedTemplateDebugSwitch(Type, DebugSwitch) \
defineTemplateDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch);
defineTemplateDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
......@@ -170,21 +170,21 @@ public: \
//- Define the typeName and debug information
#define defineTypeNameAndDebug(Type, DebugSwitch) \
defineTypeName(Type); \
defineDebugSwitch(Type, DebugSwitch);
defineDebugSwitch(Type, DebugSwitch)
//- Define the typeName and debug information, lookup as @a Name
#define defineTemplateTypeNameAndDebugWithName(Type, Name, DebugSwitch) \
defineTemplateTypeNameWithName(Type, Name); \
defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch);
defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch)
//- Define the typeName and debug information for templates, useful with typedefs
#define defineTemplateTypeNameAndDebug(Type, DebugSwitch) \
defineTemplateTypeNameAndDebugWithName(Type, #Type, DebugSwitch);
defineTemplateTypeNameAndDebugWithName(Type, #Type, DebugSwitch)
//- Define the typeName and debug information for templates
#define defineNamedTemplateTypeNameAndDebug(Type, DebugSwitch) \
defineNamedTemplateTypeName(Type); \
defineNamedTemplateDebugSwitch(Type, DebugSwitch);
defineNamedTemplateDebugSwitch(Type, DebugSwitch)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -98,7 +98,7 @@ void Foam::meshReader::writeInterfaces(const objectRegistry& registry) const
ioObj.writeHeader(os);
os << interfaces_;
io.writeEndDivider(os);
ioObj.writeEndDivider(os);
}
......
......@@ -44,7 +44,7 @@ typedef Cthermo<Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \
defineTemplateTypeNameAndDebugWithName \
(Cthermo##Mixture##Transport##Thermo##EqnOfState, \
#Cthermo \
"<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", 0) \
"<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", 0); \
\
addToRunTimeSelectionTable \
( \
......
......@@ -138,7 +138,7 @@ makeCombustionThermo
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Reaction thermo
defineTemplateTypeNameAndDebug(hMixtureThermo<reactingMixture>, 0)
defineTemplateTypeNameAndDebug(hMixtureThermo<reactingMixture>, 0);
typedef hMixtureThermo<reactingMixture> hMixtureThermoReactingMixture;
......
......@@ -43,7 +43,7 @@ typedef MixtureThermo \
defineTemplateTypeNameAndDebugWithName \
(MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \
#MixtureThermo \
"<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", 0) \
"<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", 0); \
\
addToRunTimeSelectionTable \
( \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment