ALib C++ Library
Library Version: 2412 R0
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_SYSTEM_CONSOLE
10#define HPP_ALIB_LANG_SYSTEM_CONSOLE 1
11#pragma once
12#if !defined(DOXYGEN)
13# include "alib/alib.hpp"
14#endif
15
17
18namespace alib { namespace lang::system {
19
20//==================================================================================================
21/// This class provides system dependent features in respect the console attached to a process.
22//==================================================================================================
24{
25 protected:
26 /// Console text width.
27 ALIB_API static
29
30 public:
31 //==========================================================================================
32 /// Tries to detect the current width of the console. Returns \c 0 in case of failure.
33 ///
34 /// @param forceRedetect If \c true, the console size is tried to be detected, even if it
35 /// had been done before (and even if it failed before).<br>
36 /// Defaults to \c false.
37 ///
38 /// @return The console width.
39 //==========================================================================================
40 ALIB_API static
41 int GetWidth( bool forceRedetect = false );
42};
43
44} // namespace alib[:: lang::system]
45
46/// Type alias in namespace \b alib.
48
49} // namespace [alib]
50
51#endif // HPP_ALIB_LANG_SYSTEM_CONSOLE
52
This class provides system dependent features in respect the console attached to a process.
Definition console.hpp:24
static ALIB_API int GetWidth(bool forceRedetect=false)
Definition console.cpp:32
static ALIB_API int lastReceivedWidth
Console text width.
Definition console.hpp:28
#define ALIB_ASSERT_MODULE(modulename)
Definition alib.hpp:223
#define ALIB_API
Definition alib.hpp:639
Definition alib.cpp:69