|
Macaulay2 Engine
|
Per-ring fromStream specialisations shared across the legacy Ring*Test.cpp suite. More...
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) |
Per-ring fromStream specialisations shared across the legacy Ring*Test.cpp suite.
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.
Definition in file fromStream.cpp.