|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
The dialect a function tree is printed in – who the text is for. More...
#include <ios>Go to the source code of this file.
Namespaces | |
| namespace | bertini |
| namespace | bertini::node |
Enumerations | |
| enum class | bertini::node::PrintDialect { bertini::node::Classic = 0 , bertini::node::PythonReadable = 1 , bertini::node::PythonExact = 2 } |
| Who a printed expression is for; selects the operator and constant spellings. More... | |
Functions | |
| int | bertini::node::PrintDialectSlot () |
| The stream-state slot the dialect is kept in (allocated once per process). | |
| PrintDialect | bertini::node::DialectOf (std::ios_base &stream) |
| The dialect a stream prints in; Classic unless SetDialect was called on it. | |
| void | bertini::node::SetDialect (std::ios_base &stream, PrintDialect dialect) |
| Choose the dialect everything subsequently printed to stream is written in. | |
| char const * | bertini::node::PowerSymbol (PrintDialect dialect) |
| The power operator in a dialect: ^ for Bertini 1, ** for Python. | |
The dialect a function tree is printed in – who the text is for.
Printing is a family, one member per audience (ADR-0059):
The dialect rides on the output stream (an std::ios_base slot), so the recursive node printers need no extra parameter and operator<< keeps working; a stream that nobody has set a dialect on prints Classic, which is what every pre-existing caller expected. Canonicalization (the content digest) uses none of these: identity is decided on the canonical encoding, never on printed text.