Skip to content

Commit

Permalink
Namespace our own copy of muParser to prevent downstream conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
drwells committed Mar 26, 2022
1 parent 5306c39 commit cbafe97
Show file tree
Hide file tree
Showing 20 changed files with 60 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
\brief Definition of the standard floating point parser.
*/

namespace dealii
{
namespace mu
{
/** \brief Mathematical expressions parser.
Expand Down Expand Up @@ -110,6 +112,7 @@ namespace mu
static int IsVal(const char_type* a_szExpr, int *a_iPos, value_type *a_fVal);
};
} // namespace mu
}

#endif

3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#include "muParserError.h"


namespace dealii
{
namespace mu
{
/** \file
Expand Down Expand Up @@ -312,6 +314,7 @@ friend class ParserTokenReader;
};

} // namespace mu
}

#endif

3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserBytecode.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
*/


namespace dealii
{
namespace mu
{
struct SToken
Expand Down Expand Up @@ -135,6 +137,7 @@ class ParserByteCode
};

} // namespace mu
}

#endif

Expand Down
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
\brief Definition of the parser callback class.
*/

namespace dealii
{
namespace mu
{

Expand Down Expand Up @@ -116,6 +118,7 @@ class ParserCallback
typedef std::map<string_type, ParserCallback> funmap_type;

} // namespace mu
}

#endif

3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@
#endif


namespace dealii
{
namespace mu
{
#if defined(_UNICODE)
Expand Down Expand Up @@ -363,6 +365,7 @@ namespace mu
/** \brief Callback used for variable creation factory functions. */
typedef value_type* (*facfun_type)(const char_type*, void*);
} // end of namespace
}

#endif

3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserError.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
\brief This file defines the error class used by the parser.
*/

namespace dealii
{
namespace mu
{

Expand Down Expand Up @@ -171,6 +173,7 @@ class ParserError
};

} // namespace mu
}

#endif

3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
*/


namespace dealii
{
namespace mu
{

Expand Down Expand Up @@ -135,6 +137,7 @@ class ParserInt : public ParserBase
};

} // namespace mu
}

#endif

3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
\brief This file defines the stack used by muparser.
*/

namespace dealii
{
namespace mu
{

Expand Down Expand Up @@ -121,5 +123,6 @@ namespace mu
}
};
} // namespace MathUtils
}

#endif
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserTemplateMagic.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "muParserError.h"


namespace dealii
{
namespace mu
{
//-----------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -109,5 +111,6 @@ namespace mu
static T Pow(T v1, T v2) { return std::pow(v1, v2); }
};
}
}

#endif
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
\brief This file contains the parser test class.
*/

namespace dealii
{
namespace mu
{
/** \brief Namespace for test cases. */
Expand Down Expand Up @@ -208,6 +210,7 @@ namespace mu
};
} // namespace Test
} // namespace mu
}

#endif

Expand Down
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserToken.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
\brief This file contains the parser token definition.
*/

namespace dealii
{
namespace mu
{
/** \brief Encapsulation of the data for a single formula token.
Expand Down Expand Up @@ -397,5 +399,6 @@ namespace mu
}
};
} // namespace mu
}

#endif
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/include/muParserTokenReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
*/


namespace dealii
{
namespace mu
{
// Forward declaration
Expand Down Expand Up @@ -155,6 +157,7 @@ namespace mu
char_type m_cArgSep; ///< The character used for separating function arguments
};
} // namespace mu
}

#endif

Expand Down
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/src/muParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ using namespace std;


/** \brief Namespace for mathematical applications. */
namespace dealii
{
namespace mu
{

Expand Down Expand Up @@ -395,3 +397,4 @@ namespace mu
return fRes;
}
} // namespace mu
}
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/src/muParserBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ using namespace std;
\brief This file contains the basic implementation of the muparser engine.
*/

namespace dealii
{
namespace mu
{
std::locale ParserBase::s_locale = std::locale(std::locale::classic(), new change_dec_sep<char_type>('.'));
Expand Down Expand Up @@ -1778,3 +1780,4 @@ namespace mu

}
} // namespace mu
}
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/src/muParserBytecode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include "muParserTemplateMagic.h"


namespace dealii
{
namespace mu
{
//---------------------------------------------------------------------------
Expand Down Expand Up @@ -587,3 +589,4 @@ namespace mu
mu::console() << _T("END") << std::endl;
}
} // namespace mu
}
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/src/muParserCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
*/


namespace dealii
{
namespace mu
{
//---------------------------------------------------------------------------
Expand Down Expand Up @@ -461,3 +463,4 @@ namespace mu
return m_iArgc;
}
} // namespace mu
}
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/src/muParserError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "muParserError.h"


namespace dealii
{
namespace mu
{
const ParserErrorMsg ParserErrorMsg::m_Instance;
Expand Down Expand Up @@ -335,3 +337,4 @@ namespace mu
return m_iErrc;
}
} // namespace mu
}
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/src/muParserInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ using namespace std;
*/

/** \brief Namespace for mathematical applications. */
namespace dealii
{
namespace mu
{
value_type ParserInt::Abs(value_type v) { return (value_type)Round(fabs((double)v)); }
Expand Down Expand Up @@ -278,3 +280,4 @@ void ParserInt::InitOprt()
}

} // namespace mu
}
3 changes: 3 additions & 0 deletions bundled/muparser_v2_2_4/src/muParserTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ using namespace std;
\brief This file contains the implementation of parser test cases.
*/

namespace dealii
{
namespace mu
{
namespace Test
Expand Down Expand Up @@ -1550,3 +1552,4 @@ namespace mu
}
} // namespace test
} // namespace mu
}
4 changes: 3 additions & 1 deletion bundled/muparser_v2_2_4/src/muParserTokenReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
*/


namespace dealii
{
namespace mu
{

Expand Down Expand Up @@ -955,4 +957,4 @@ namespace mu
return m_cArgSep;
}
} // namespace mu

}

0 comments on commit cbafe97

Please sign in to comment.