ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
console.hpp
Go to the documentation of this file.
1/** ************************************************************************************************
2 * \file
3 * This header file is part of sub-namespace # alib::lang::system of module \alib_basecamp of
4 * the \aliblong.
5 *
6 * \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
7 * Published under \ref mainpage_license "Boost Software License".
8 **************************************************************************************************/
9#ifndef HPP_ALIB_LANG_CONSOLE
10#define HPP_ALIB_LANG_CONSOLE 1
11
12#if !defined(HPP_ALIB) && !defined(ALIB_DOX)
13# include "alib/alib.hpp"
14#endif
15
17
18
19namespace alib { namespace lang::system {
20
21/** ************************************************************************************************
22 * This class provides system dependent features in respect the console attached to a process.
23 **************************************************************************************************/
25{
26 protected:
27 /** Console text width. */
28 ALIB_API static
30
31 public:
32 /** ****************************************************************************************
33 * Tries to detect the current width of the console. Returns \c 0 in case of failure.
34 *
35 * @param forceRedetect If \c true, the console size is tried to be detected, even if it
36 * had been done before (and even if it failed before).<br>
37 * Defaults to \c false.
38 *
39 * @return The console width.
40 ******************************************************************************************/
41 ALIB_API static
42 int GetWidth( bool forceRedetect = false );
43};
44
45} // namespace alib[:: lang::system]
46
47/// Type alias in namespace \b alib.
49
50} // namespace [alib]
51
52#endif // HPP_ALIB_LANG_CONSOLE
static ALIB_API int GetWidth(bool forceRedetect=false)
Definition console.cpp:38
static ALIB_API int lastReceivedWidth
Definition console.hpp:29
#define ALIB_ASSERT_MODULE(modulename)
Definition alib.hpp:190
#define ALIB_API
Definition alib.hpp:538
Definition alib.cpp:57