Macaulay2 Engine
Loading...
Searching...
No Matches
fromStream.cpp File Reference

Per-ring fromStream specialisations shared across the legacy Ring*Test.cpp suite. More...

#include "RingTest.hpp"
#include "aring-zzp.hpp"
#include "ZZp.hpp"

Go to the source code of this file.

Functions

template<typename T>
std::istream & fromStream (std::istream &i, const T &R, typename T::ElementType &result)
template<typename T>
bool fromStream (std::istream &i, const T &R, ring_elem &result)
template<>
std::istream & fromStream< M2::ARingZZp > (std::istream &i, const M2::ARingZZp &R, M2::ARingZZp::ElementType &result)
template<>
bool fromStream< Z_mod > (std::istream &i, const Z_mod &R, ring_elem &result)
template<>
bool fromStream< RingZZ > (std::istream &i, const RingZZ &R, ring_elem &result)

Detailed Description

Per-ring fromStream specialisations shared across the legacy Ring*Test.cpp suite.

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

Centralises the explicit-instantiation definitions of the fromStream<T>(istream, R, result) family declared in RingTest.hpp. fromStream<M2::ARingZZp> reads an int and calls R.set_from_long; fromStream<Z_mod> skips whitespace, accepts the optional sign, parses digits, and hands back a ring_elem; fromStream<RingZZ> follows the same shape for arbitrary-precision integers (work in progress — the digit-collection loop is marked // NOT DONE BEING WRITTEN). The unified file keeps the parser quirks in one place so individual test files stay focused on test logic.

Companion to RingTest.hpp (which declares the templates), M2-cpp-replacement.cpp (stub for system_interrupted), and util-polyring-creation.{cpp,hpp} (one-line ring builders) under the same file-test-harness markdown family.

See also
RingTest.hpp
aring-zzp.hpp
ZZp.hpp
ZZ.hpp
RingZZpTest.cpp

Definition in file fromStream.cpp.