|
Macaulay2 Engine
|
M2::Reader<RingType> — parse a single ring element from a std::istream. More...
Go to the source code of this file.
Classes | |
| class | M2::Reader< RingType > |
Namespaces | |
| namespace | M2 |
M2::Reader<RingType> — parse a single ring element from a std::istream.
Declares the per-ring stream reader: construct with a RingType& and call read(istream, result) to consume one element's textual form and land its value in RingType::ElementType. The header forward-declares the primary template and provides the explicit specialisation for ARingZZp; per-ring .cpp specialisations parse to a temporary (mpz_t, mpfr_t, ...) using the underlying library's stream operator and then call the ring's set_from_* to land the value in ElementType.
The pattern keeps parse logic close to each ring's native value type instead of going through a single Ring::from_text virtual. Used by matrix / polynomial I/O, the streaming polynomial parsers, and test harnesses that read serialised inputs.
Definition in file reader.hpp.