Macaulay2 Engine
Loading...
Searching...
No Matches
reader.hpp File Reference

M2::Reader<RingType> — parse a single ring element from a std::istream. More...

#include "aring-zzp.hpp"
#include <cstddef>

Go to the source code of this file.

Classes

class  M2::Reader< RingType >

Namespaces

namespace  M2

Detailed Description

M2::Reader<RingType> — parse a single ring element from a std::istream.

Note
AI-generated documentation. Verify against the source before relying on it.

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.

See also
aring-zzp.hpp

Definition in file reader.hpp.