Commit 2e51e7a6 authored by Praetorius, Simon's avatar Praetorius, Simon
parents 689880ac 262a0eb7
......@@ -18,7 +18,7 @@ include_directories(${MUPARSER_INCLUDE_DIR})
if (ENABLE_CXX11)
add_definitions(-DMUPARSER_HAS_CXX11=1)
add_definitions(-DAMDIS_HAS_CXX11=1)
endif (ENABLE_CXX11)
# specify how to install this target:
......
......@@ -18,7 +18,7 @@ target_include_directories(muparser PUBLIC ${MUPARSER_INCLUDE_DIR})
if (ENABLE_CXX11)
target_enable_cxx11(MUPARSER_ENABLE_CXX11 muparser PRIVATE)
target_compile_definitions(muparser PRIVATE MUPARSER_HAS_CXX11=1)
target_compile_definitions(muparser PRIVATE AMDIS_HAS_CXX11=1)
endif (ENABLE_CXX11)
# specify how to install this target:
......
......@@ -262,7 +262,7 @@ private:
mutable stringbuf_type m_vStringBuf; ///< String buffer, used for storing string function arguments
stringbuf_type m_vStringVarBuf;
#if MUPARSER_HAS_CXX11
#if AMDIS_HAS_CXX11
std::unique_ptr<token_reader_type> m_pTokenReader; ///< Managed pointer to the token reader object.
#else
std::auto_ptr<token_reader_type> m_pTokenReader; ///< Managed pointer to the token reader object.
......
......@@ -78,7 +78,7 @@ namespace mu
TString m_strTok; ///< Token string
TString m_strVal; ///< Value for string variables
value_type m_fVal;
#if MUPARSER_HAS_CXX11
#if AMDIS_HAS_CXX11
std::unique_ptr<ParserCallback> m_pCallback;
#else
std::auto_ptr<ParserCallback> m_pCallback;
......
......@@ -1040,7 +1040,7 @@ namespace mu
try
{
#if MUPARSER_HAS_CXX11
#if AMDIS_HAS_CXX11
std::unique_ptr<Parser> p1;
#else
std::auto_ptr<Parser> p1;
......
......@@ -145,7 +145,7 @@ namespace mu
*/
ParserTokenReader* ParserTokenReader::Clone(ParserBase *a_pParent) const
{
#if MUPARSER_HAS_CXX11
#if AMDIS_HAS_CXX11
std::unique_ptr<ParserTokenReader> ptr(new ParserTokenReader(*this));
#else
std::auto_ptr<ParserTokenReader> ptr(new ParserTokenReader(*this));
......
......@@ -57,6 +57,14 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t;
#undef min
#endif
#ifdef NONE
#undef NONE
#endif
#ifdef THIS
#undef THIS
#endif
#if MSC_VERSION >= 1800 && !defined(HAS_VARIADIC_TEMPLATES)
#define HAS_VARIADIC_TEMPLATES 1
#endif
......
......@@ -140,7 +140,7 @@ namespace AMDiS { namespace io {
macroFilename + ';' + perFilename;
macroFile_nl = macroFile.length();
} else if (writeMacro == Macroformat::THIS) {
} else if (writeMacro == Macroformat::SELF) {
macroFile_nl = 13;
readFileToString(macroFilename, macroData);
......@@ -163,7 +163,7 @@ namespace AMDiS { namespace io {
}
// write macro and periodic file
if (writeMacro == Macroformat::THIS && macroFilename.length()) {
if (writeMacro == Macroformat::SELF && macroFilename.length()) {
file.seekp(0, ios_base::end);
long macroPos = file.tellp(), perPos = 0;
file.write(macroData.c_str(), macroData.length());
......@@ -354,7 +354,7 @@ namespace AMDiS { namespace io {
macroFilename + ';' + perFilename;
macroFile_nl = macroFile.length();
} else if (writeMacro == Macroformat::THIS) {
} else if (writeMacro == Macroformat::SELF) {
macroFile_nl = perFilename.length() ? 27 : 13;
macroFile.resize(macroFile_nl, ' ');
}
......@@ -604,7 +604,7 @@ namespace AMDiS { namespace io {
//reset the macro positions in file
setMacrosPos(file, headerLen, macroSize);
if (writeMacro == Macroformat::THIS)
if (writeMacro == Macroformat::SELF)
setMacroFile(file, headerLen, mesh, writeMacro);
file.close();
......@@ -634,8 +634,8 @@ namespace AMDiS { namespace io {
{
FUNCNAME("setMacroFile()");
TEST_EXIT(writeMacro == Macroformat::THIS)
("This function should only be called under Macroformat::THIS.\n");
TEST_EXIT(writeMacro == Macroformat::SELF)
("This function should only be called under Macroformat::SELF.\n");
string macroFilename = "", perFilename = "";
string macroData = "", periodicData = "";
......
......@@ -27,7 +27,7 @@ namespace AMDiS { namespace io {
typedef enum{
NONE = 0, // no macro
PT_MACROFILE = 1, // pointer to macro file
THIS = 2 // pointer to this file, at the end of this file
SELF = 2 // pointer to this file, at the end of this file
} Value;
};
......
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