diff options
| author | Vasile Vilvoiu <vasi@vilvoiu.ro> | 2021-07-21 21:14:30 +0300 |
|---|---|---|
| committer | Vasile Vilvoiu <vasi@vilvoiu.ro> | 2021-07-21 21:14:30 +0300 |
| commit | ee8a1573204f76b16b9fb711608447aabee55696 (patch) | |
| tree | 50bbcf182716ee0b5b2e5c1ecf104f7143d0bbfe /src/live.hpp | |
| parent | a7c430fa81c9e22dbce74869a0a27304da78855b (diff) | |
Added header file comments for classes and methods.
Renamed all factory methods to ::Build().
Diffstat (limited to 'src/live.hpp')
| -rw-r--r-- | src/live.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/live.hpp b/src/live.hpp index d7baa61..33f3b3d 100644 --- a/src/live.hpp +++ b/src/live.hpp @@ -12,6 +12,9 @@ #include "color-map.hpp" #include <SFML/Graphics.hpp> +/** + * Live output God object, keeping track of rendering, window, history etc. + */ class LiveOutput { private: /* configuration */ @@ -30,10 +33,29 @@ public: LiveOutput(LiveOutput &&) = delete; LiveOutput & operator=(const LiveOutput&) = delete; + /** + * @param conf Configuration to use. + * @param cmap Color map instance to use. + * @param vmap Value map instance to use. + */ LiveOutput(const Configuration& conf, const ColorMap& cmap, const ValueMap& vmap); + /** + * Add a FFT window to the history and render it. + * @param win_values Window values, real, scaled. + * @return A copy of the colorized window that is rendered. + */ std::vector<uint8_t> AddWindow(const RealWindow& win_values); + + /** + * Handle window events. + * @return True if window was closed. + */ bool HandleEvents(); + + /** + * Render live window. + */ void Render(); }; |
