#ifndef __JLANG__JEQUATION_T__ #define __JLANG__JEQUATION_T__ #include #include "JLang/JEquation.hh" #include "JLang/JEquationFacet.hh" #include "JLang/JEquationParameters.hh" /** * \author mdejong */ namespace JLANG {} namespace JPP { using namespace JLANG; } namespace JLANG { /** * Auxiliary data structure to read equations. */ struct JEquation_t : public JEquation { /** * Get equation parameters. * * \return equation parameters */ static inline JEquationParameters& getEquationParameters() { static JEquationParameters equation("=", ",", "./", "#"); return equation; } /** * Set equation parameters. * * \param equation equation parameters */ static inline void setEquationParameters(const JEquationParameters& equation) { getEquationParameters() = equation; } /** * Read equation from input stream. * * \param in input stream * \param equation equation * \return input stream */ friend inline std::istream& operator>>(std::istream& in, JEquation_t& equation) { using namespace std; using namespace JPP; const locale loc = in.imbue(locale(in.getloc(), new JEquationFacet(JEquationParameters()))); in >> static_cast(equation); //in.imbue(loc); return in; } }; } #endif