1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-24 12:30:17 +00:00

Added documentation.

This commit is contained in:
Thomas Harte 2017-07-22 17:31:12 -04:00
parent 825b38850e
commit d46da6ac9d

View File

@ -23,12 +23,25 @@ class Machine {
public:
Machine() : clock_is_unlimited_(false) {}
/*!
Causes the machine to set up its CRT and, if it has one, speaker. The caller guarantees
that an OpenGL context is bound.
*/
virtual void setup_output(float aspect_ratio) = 0;
/*!
Gives the machine a chance to release all owned resources. The caller guarantees that the
OpenGL context is bound.
*/
virtual void close_output() = 0;
/// @returns The CRT this machine is drawing to. Should not be @c nullptr.
virtual std::shared_ptr<Outputs::CRT::CRT> get_crt() = 0;
/// @returns The speaker that receives this machine's output, or @c nullptr if this machine is mute.
virtual std::shared_ptr<Outputs::Speaker> get_speaker() = 0;
/// Runs the machine for @c number_of_cycle cycles.
virtual void run_for_cycles(int number_of_cycles) = 0;
// TODO: sever the clock-rate stuff.