Class Coord

Inheritance Relationships

Derived Type

Class Documentation

class Coord

Provides a coordinate system for each Domain.

The coordinate system must be able to produce a human-readable version of the coordinates given. For instance, an integer grid in two dimensions would provide standard Descartes coordinates like (0, 0) for the origin, or (2, 3) for the position that is two units “up” and three units to the “right” of the origin. Implementation of a coordinate system is left up to the user, though there are several established systems provided.

See also

GridCoord

Subclassed by kami::GridCoord

Public Functions

virtual std::string to_string() const = 0

Convert the coordinate to a human-readable string.

Returns

a human-readable form of the Coord as std::string.

Friends

friend std::ostream &operator<<(std::ostream &lhs, const Coord &rhs)

Output a Coord to the specified output stream.

The form of the output will be the same as that produced by the to_string() member function.

Parameters
  • lhs – is the stream to output the Coord to

  • rhs – is the Coord to output

Returns

the output stream for reuse