Rename Cabinet member variables to avoid using reserved identifiers
Names containing double underscores are reserved for the C++ implementation.
This commit is contained in:
parent
de9928977c
commit
ca68fbc075
10 changed files with 23 additions and 23 deletions
|
|
@ -84,7 +84,7 @@ typedef int ftnlen; // Fortran hidden string length type
|
||||||
// in that system , you need to declare the static storage variable.
|
// in that system , you need to declare the static storage variable.
|
||||||
// with the following line in the include file
|
// with the following line in the include file
|
||||||
//
|
//
|
||||||
// template<class M> Cabinet<M>* Cabinet<M>::__storage;
|
// template<class M> Cabinet<M>* Cabinet<M>::s_storage;
|
||||||
//
|
//
|
||||||
// Note, on other systems that declaration is treated as a definition
|
// Note, on other systems that declaration is treated as a definition
|
||||||
// and this leads to multiple defines at link time
|
// and this leads to multiple defines at link time
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ public:
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
Cabinet() {
|
Cabinet() {
|
||||||
__table.push_back(new M);
|
m_table.push_back(new M);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
@ -203,21 +203,21 @@ private:
|
||||||
* access the data through this function.
|
* access the data through this function.
|
||||||
*/
|
*/
|
||||||
static dataRef getData() {
|
static dataRef getData() {
|
||||||
if (__storage == 0) {
|
if (s_storage == 0) {
|
||||||
__storage = new Cabinet<M, canDelete>();
|
s_storage = new Cabinet<M, canDelete>();
|
||||||
}
|
}
|
||||||
return __storage->__table;
|
return s_storage->m_table;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pointer to the single instance of this class.
|
* Pointer to the single instance of this class.
|
||||||
*/
|
*/
|
||||||
static Cabinet<M, canDelete>* __storage;
|
static Cabinet<M, canDelete>* s_storage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vector to hold pointers to objects.
|
* Vector to hold pointers to objects.
|
||||||
*/
|
*/
|
||||||
std::vector<M*> __table;
|
std::vector<M*> m_table;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Declaration stating that the storage for the static member
|
//! Declaration stating that the storage for the static member
|
||||||
|
|
@ -226,7 +226,7 @@ private:
|
||||||
* The actual storage will be allocated in .cpp files
|
* The actual storage will be allocated in .cpp files
|
||||||
*/
|
*/
|
||||||
#ifdef NEEDS_GENERIC_TEMPL_STATIC_DECL
|
#ifdef NEEDS_GENERIC_TEMPL_STATIC_DECL
|
||||||
template<class M, bool canDelete> Cabinet<M, canDelete>* Cabinet<M, canDelete>::__storage;
|
template<class M, bool canDelete> Cabinet<M, canDelete>* Cabinet<M, canDelete>::s_storage;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,9 @@ typedef Cabinet<Kinetics> KineticsCabinet;
|
||||||
typedef Cabinet<Transport> TransportCabinet;
|
typedef Cabinet<Transport> TransportCabinet;
|
||||||
typedef Cabinet<XML_Node, false> XmlCabinet;
|
typedef Cabinet<XML_Node, false> XmlCabinet;
|
||||||
|
|
||||||
template<> ThermoCabinet* ThermoCabinet::__storage = 0;
|
template<> ThermoCabinet* ThermoCabinet::s_storage = 0;
|
||||||
template<> KineticsCabinet* KineticsCabinet::__storage = 0;
|
template<> KineticsCabinet* KineticsCabinet::s_storage = 0;
|
||||||
template<> TransportCabinet* TransportCabinet::__storage = 0;
|
template<> TransportCabinet* TransportCabinet::s_storage = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exported functions.
|
* Exported functions.
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ typedef Func1 func_t;
|
||||||
|
|
||||||
typedef Cabinet<Func1> FuncCabinet;
|
typedef Cabinet<Func1> FuncCabinet;
|
||||||
// Assign storage to the Cabinet<Func1> static member
|
// Assign storage to the Cabinet<Func1> static member
|
||||||
template<> FuncCabinet* FuncCabinet::__storage = 0;
|
template<> FuncCabinet* FuncCabinet::s_storage = 0;
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ using namespace std;
|
||||||
using namespace Cantera;
|
using namespace Cantera;
|
||||||
|
|
||||||
typedef Cabinet<MultiPhase> mixCabinet;
|
typedef Cabinet<MultiPhase> mixCabinet;
|
||||||
template<> mixCabinet* mixCabinet::__storage = 0;
|
template<> mixCabinet* mixCabinet::s_storage = 0;
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ using namespace Cantera;
|
||||||
|
|
||||||
typedef Cabinet<Sim1D> SimCabinet;
|
typedef Cabinet<Sim1D> SimCabinet;
|
||||||
typedef Cabinet<Domain1D> DomainCabinet;
|
typedef Cabinet<Domain1D> DomainCabinet;
|
||||||
template<> SimCabinet* SimCabinet::__storage = 0;
|
template<> SimCabinet* SimCabinet::s_storage = 0;
|
||||||
template<> DomainCabinet* DomainCabinet::__storage = 0;
|
template<> DomainCabinet* DomainCabinet::s_storage = 0;
|
||||||
|
|
||||||
typedef Cabinet<ThermoPhase> ThermoCabinet;
|
typedef Cabinet<ThermoPhase> ThermoCabinet;
|
||||||
typedef Cabinet<Kinetics> KineticsCabinet;
|
typedef Cabinet<Kinetics> KineticsCabinet;
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,10 @@ typedef Cabinet<Func1> FuncCabinet;
|
||||||
typedef Cabinet<ThermoPhase> ThermoCabinet;
|
typedef Cabinet<ThermoPhase> ThermoCabinet;
|
||||||
typedef Cabinet<Kinetics> KineticsCabinet;
|
typedef Cabinet<Kinetics> KineticsCabinet;
|
||||||
|
|
||||||
template<> ReactorCabinet* ReactorCabinet::__storage = 0;
|
template<> ReactorCabinet* ReactorCabinet::s_storage = 0;
|
||||||
template<> NetworkCabinet* NetworkCabinet::__storage = 0;
|
template<> NetworkCabinet* NetworkCabinet::s_storage = 0;
|
||||||
template<> FlowDeviceCabinet* FlowDeviceCabinet::__storage = 0;
|
template<> FlowDeviceCabinet* FlowDeviceCabinet::s_storage = 0;
|
||||||
template<> WallCabinet* WallCabinet::__storage = 0;
|
template<> WallCabinet* WallCabinet::s_storage = 0;
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ using namespace std;
|
||||||
|
|
||||||
typedef Cabinet<ReactionPathBuilder> BuilderCabinet;
|
typedef Cabinet<ReactionPathBuilder> BuilderCabinet;
|
||||||
typedef Cabinet<ReactionPathDiagram> DiagramCabinet;
|
typedef Cabinet<ReactionPathDiagram> DiagramCabinet;
|
||||||
template<> DiagramCabinet* DiagramCabinet::__storage = 0;
|
template<> DiagramCabinet* DiagramCabinet::s_storage = 0;
|
||||||
template<> BuilderCabinet* BuilderCabinet::__storage = 0;
|
template<> BuilderCabinet* BuilderCabinet::s_storage = 0;
|
||||||
|
|
||||||
typedef Cabinet<Kinetics> KineticsCabinet;
|
typedef Cabinet<Kinetics> KineticsCabinet;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ using namespace Cantera;
|
||||||
using namespace ctml;
|
using namespace ctml;
|
||||||
|
|
||||||
typedef Cabinet<XML_Node, false> XmlCabinet;
|
typedef Cabinet<XML_Node, false> XmlCabinet;
|
||||||
template<> XmlCabinet* XmlCabinet::__storage = 0;
|
template<> XmlCabinet* XmlCabinet::s_storage = 0;
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ using Cantera::handleAllExceptions;
|
||||||
#include "clib/Cabinet.h"
|
#include "clib/Cabinet.h"
|
||||||
|
|
||||||
typedef Cabinet<XML_Node, false> XmlCabinet;
|
typedef Cabinet<XML_Node, false> XmlCabinet;
|
||||||
template<> XmlCabinet* XmlCabinet::__storage = 0;
|
template<> XmlCabinet* XmlCabinet::s_storage = 0;
|
||||||
|
|
||||||
typedef integer status_t;
|
typedef integer status_t;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue