ALib C++ Framework
by
Library Version:
2511 R0
Documentation generated by
Loading...
Searching...
No Matches
A-Worx
ALib
src
alib
system
console.inl
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
/// \emoji :copyright: 2013-2025 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
{
15
protected
:
16
/// Console text width.
17
ALIB_DLL
static
18
int
lastReceivedWidth
;
19
20
public
:
21
/// Tries to detect the current width of the console. Returns \c 0 in case of failure.
22
/// @param forceRedetect If \c true, the console size is tried to be detected, even if it
23
/// had been done before (and even if it failed before).<br>
24
/// Defaults to \c false.
25
/// @param defaultWidth The default value, in case the detection fails or the detected
26
/// value is \c 0.<br>
27
/// Defaults to \c 80.
28
///
29
/// @return The console width.
30
ALIB_DLL
static
31
int
GetWidth
(
bool
forceRedetect =
false
,
int
defaultWidth= 80 );
32
};
33
34
}
// namespace alib[::system]
35
36
/// Type alias in namespace \b alib.
37
using
Console
=
system::Console
;
38
39
}
// namespace [alib]
ALIB_DLL
#define ALIB_DLL
Definition
alib.inl:573
ALIB_EXPORT
#define ALIB_EXPORT
Definition
alib.inl:562
alib::system::Console
This class provides system-dependent features in respect the console attached to a process.
Definition
console.inl:14
alib::system::Console::GetWidth
static int GetWidth(bool forceRedetect=false, int defaultWidth=80)
Definition
console.cpp:43
alib::system::Console::lastReceivedWidth
static int lastReceivedWidth
Console text width.
Definition
console.inl:18
alib::system
Definition
console.cpp:37
alib
Definition
ALib.Boxing.StdFunctors.H:18
alib::Console
system::Console Console
Type alias in namespace alib.
Definition
console.inl:37