ALib C++ Framework
by
Library Version:
2605 R0
Documentation generated by
Loading...
Searching...
No Matches
ALib
src
alib
system
console.hpp
Go to the documentation of this file.
1
//==================================================================================================
2
/// \file
3
/// This header-file is part of module \alib_system of the \aliblong.
4
///
5
/// Copyright 2013-2026 A-Worx GmbH, Germany.
6
/// Published under #"mainpage_license".
7
//==================================================================================================
8
ALIB_EXPORT
namespace
alib
{
namespace
system
{
9
10
//==================================================================================================
11
/// This class provides system-dependent features in respect the console attached to a process.
12
//==================================================================================================
13
class
Console
{
14
protected
:
15
/// Console text width.
16
ALIB_DLL
static
17
int
lastReceivedWidth
;
18
19
public
:
20
/// Tries to detect the current width of the console. Returns \c 0 in case of failure.
21
/// @param forceRedetect If \c true, the console size is tried to be detected, even if it
22
/// had been done before (and even if it failed before).<br>
23
/// Defaults to \c false.
24
/// @param defaultWidth The default value, in case the detection fails or the detected
25
/// value is \c 0.<br>
26
/// Defaults to \c 80.
27
///
28
/// @return The console width.
29
ALIB_DLL
static
30
int
GetWidth
(
bool
forceRedetect =
false
,
int
defaultWidth= 80 );
31
};
32
33
}
// namespace alib[::system]
34
35
/// Type alias in namespace #"%alib".
36
using
Console
=
system::Console
;
37
38
}
// namespace [alib]
ALIB_DLL
#define ALIB_DLL
Definition
alib.prepro.hpp:549
ALIB_EXPORT
#define ALIB_EXPORT
Definition
alib.prepro.hpp:538
alib::system::Console
This class provides system-dependent features in respect the console attached to a process.
Definition
console.hpp:13
alib::system::Console::GetWidth
static int GetWidth(bool forceRedetect=false, int defaultWidth=80)
Definition
console.cpp:7
alib::system::Console::lastReceivedWidth
static int lastReceivedWidth
Console text width.
Definition
console.hpp:17
alib::system
Definition
console.cpp:1
alib
Definition
alox.cpp:14
alib::Console
system::Console Console
Type alias in namespace #"%alib".
Definition
console.hpp:36