ALib C++ Library
by
Library Version:
2510 R0
Documentation generated by
Loading...
Searching...
No Matches
home
dev
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 \ref mainpage_license "Boost Software 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
//==========================================================================================
22
/// Tries to detect the current width of the console. Returns \c 0 in case of failure.
23
///
24
/// @param forceRedetect If \c true, the console size is tried to be detected, even if it
25
/// had been done before (and even if it failed before).<br>
26
/// Defaults to \c false.
27
///
28
/// @return The console width.
29
//==========================================================================================
30
ALIB_DLL
static
31
int
GetWidth
(
bool
forceRedetect =
false
);
32
};
33
34
}
// namespace alib[::system]
35
36
/// Type alias in namespace \b alib.
37
using
Console
=
system::Console
;
38
39
}
// namespace [alib]
40
41
alib::system::Console
This class provides system dependent features in respect the console attached to a process.
Definition
console.inl:14
alib::system::Console::lastReceivedWidth
static ALIB_DLL int lastReceivedWidth
Console text width.
Definition
console.inl:18
alib::system::Console::GetWidth
static ALIB_DLL int GetWidth(bool forceRedetect=false)
Definition
console.cpp:43
ALIB_DLL
#define ALIB_DLL
Definition
alib.inl:496
ALIB_EXPORT
#define ALIB_EXPORT
Definition
alib.inl:488
alib::system
Definition
exception.cpp:217
alib
Definition
ALib.Boxing.StdFunctors.H:18
alib::Console
system::Console Console
Type alias in namespace alib.
Definition
console.inl:37