ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
system.prepro.hpp File Reference

Description:

This header-file is part of the ALib C++ Framework.

© 2013-2025 A-Worx GmbH, Germany. Published under Boost Software License.

Definition in file system.prepro.hpp.

#include "alib/alib.inl"

Go to the source code of this file.

Macros

#define A_PATH(literal)
#define ALIB_PATH_CHARACTERS_WIDE   1
#define ALIB_PATH_TO_NARROW( src, dest, bufSize)
#define ALIB_PATH_TO_NARROW_ARG( src, bufSize)
#define ALIB_PATH_TO_STRING( src, dest, bufSize)
#define ALIB_PATH_TO_STRING_ARG( src, bufSize)
#define ALIB_STRING_TO_PATH( src, dest, bufSize)
#define ALIB_STRING_TO_PATH_ARG( src, bufSize)

Macro Definition Documentation

◆ A_PATH

#define A_PATH ( literal)
Value:
literal

Macro used to define Path-string literals in a platform-independent way. Similar to macro A_CHAR, but dependent on the character type defined by the C++ standard library with type std::filesystem::path::value_type.
This is usually single-byte characters, and only on Windows OS, prefix 'L' is added.

See also
Configuration macro ALIB_PATH_CHARACTERS_WIDE.
Parameters
literalThe string literal to be eventually prefix with 'L'.

Definition at line 32 of file system.prepro.hpp.

◆ ALIB_PATH_CHARACTERS_WIDE

#define ALIB_PATH_CHARACTERS_WIDE   1

This configuration macro is set to 1 if the character type defined by the C++ standard library with type std::filesystem::path::value_type is wchar_t. Otherwise, it is set to 0.
The configuration macro is set in ALib.System.H but can only be "guessed". The guess is that only if the configuration macro _MSC_VER is set, wide characters are used. The header raises a static assertion error if the macro is wrongly guessed or externally set.

Should the guess be wrong, the right value has to be passed with compilation of the library.

Definition at line 23 of file system.prepro.hpp.

◆ ALIB_PATH_TO_NARROW

#define ALIB_PATH_TO_NARROW ( src,
dest,
bufSize )
Value:
decltype(src)& dest(src);

Similar to ALIB_STRINGS_TO_NARROW. If PathCharType does not equal nchar, a local narrow string is created and the given path is converted. Otherwise, just a reference to the given path is created, which will ultimately be optimized out by the compiler.

Parameters
srcThe name of the source instance.
destThe name of the destination instance (or reference to the source).
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 48 of file system.prepro.hpp.

◆ ALIB_PATH_TO_NARROW_ARG

#define ALIB_PATH_TO_NARROW_ARG ( src,
bufSize )
Value:
src;

Similar to ALIB_STRINGS_TO_NARROW and ALIB_STRINGS_TO_NARROW_ARG. Used to pass ALib path-strings as an argument when a narrow-string is expected.

Parameters
srcThe name of the source instance.
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 49 of file system.prepro.hpp.

◆ ALIB_PATH_TO_STRING

#define ALIB_PATH_TO_STRING ( src,
dest,
bufSize )
Value:
decltype(src)& dest(src);

Similar to ALIB_STRINGS_TO_NARROW. If PathCharType does not equal character, a local string is created and the given path is converted. Otherwise, just a reference to the given path is created, which will ultimately be optimized out by the compiler.

Parameters
srcThe name of the source instance.
destThe name of the destination instance (or reference to the source).
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 36 of file system.prepro.hpp.

◆ ALIB_PATH_TO_STRING_ARG

#define ALIB_PATH_TO_STRING_ARG ( src,
bufSize )
Value:
src;

Similar to ALIB_PATH_TO_STRING and ALIB_STRINGS_TO_NARROW_ARG. Used to pass ALib path-strings as an argument when an ALib string is expected.

Parameters
srcThe name of the source instance.
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 37 of file system.prepro.hpp.

◆ ALIB_STRING_TO_PATH

#define ALIB_STRING_TO_PATH ( src,
dest,
bufSize )
Value:
decltype(src)& dest(src);

Similar to ALIB_STRINGS_TO_NARROW. If PathCharType does not equal character, a local path-string is created and the given string is converted. Otherwise, just a reference to the given string is created, which will ultimately be optimized out by the compiler.

Parameters
srcThe name of the source instance.
destThe name of the destination instance (or reference to the source).
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 38 of file system.prepro.hpp.

◆ ALIB_STRING_TO_PATH_ARG

#define ALIB_STRING_TO_PATH_ARG ( src,
bufSize )
Value:
src;

Similar to ALIB_STRINGS_TO_NARROW and ALIB_STRINGS_TO_NARROW_ARG. Used to pass ALib strings as an argument when a path-string is expected.

Parameters
srcThe name of the source instance.
bufSizeThe (initial) size of the local string, which is used as the conversion buffer.

Definition at line 39 of file system.prepro.hpp.