NDEVR
API Documentation
STDOutputStream.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Base
28File: STDOutputStream
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/LogStream.h>
34#include <NDEVR/Dictionary.h>
35#include "DLLInfo.h"
36namespace NDEVR
37{
42 class STDOutputStream final : public LogStream
43 {
44 public:
54 public:
58 NDEVR_BASE_API STDOutputStream() {}
59
65 void setProgress(uint04 id, fltp04 progress) final override;
66
72 void addMessage(uint04 id, const LogMessage& message) final override;
73
78 void clearLines(uint04 lines) const;
79
83 void printLogo();
84 public:
85 static bool s_print_error_bars;
90 };
91}
A class that allows for specific log information to be conveyed to a InfoPipe object including inform...
Definition LogMessage.h:48
A listener that receives and processes log messages and progress updates from an InfoPipe.
Definition LogStream.h:49
StdPrintType
Defines how messages are printed to the standard output.
@ e_none
Do not print the message.
@ e_print_and_wait
Print the message and wait for user acknowledgment.
@ e_print
Print the message to standard output.
static StdPrintType s_print_regular_message
Controls how regular (non-error) messages are printed.
void addMessage(uint04 id, const LogMessage &message) final override
Adds a log message and prints it to standard output based on the current print settings.
void clearLines(uint04 lines) const
Clears the specified number of lines from the console output.
static uint02 s_max_print_message_size
The maximum number of characters to print per message.
static bool s_print_error_bars
Whether to print error progress bars to standard output.
STDOutputStream()
Constructs a default STDOutputStream.
void printLogo()
Prints the NDEVR ASCII logo to standard output.
static bool s_print_loading_bars
Whether to print loading progress bars to standard output.
void setProgress(uint04 id, fltp04 progress) final override
Updates the progress of an ongoing operation and prints a progress bar to standard output.
static StdPrintType s_print_error_message
Controls how error messages are printed.
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...