ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
tastring_ca_decl.inl
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header file is part of module \alib_strings of the \aliblong.
4///
5/// \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7//==================================================================================================
8#if !defined(HPP_ALIB_STRINGS_TASTRING_INLINING)
9# error "ALib sources with ending '.inl' must not be included from outside."
10#endif
12
13
14// #################################################################################################
15// #################################################################################################
16// This inlined header unit is to be included by compilation that specialize template
17// type "strings::TAString" in respect to its two template parameters TChar and TAllocator.
18// For this, before inclusion two preprocessor symbols have to be specified:
19// - ASTR_TCHAR_SPEC The character type
20// - ASTR_TALLOC_SPEC The allocator type
21// At the end of this header, both symbols will be set undefined, to allow a next invocation
22// with new symbols (and to enforce the right usage).
23//
24// With "tastring_ca_impl.inl", the corresponding implementations are to be made.
25// #################################################################################################
26// #################################################################################################
27
28#if !defined(ASTR_TCHAR_SPEC)
29# error "Preprocessor symbol ASTR_TCHAR_SPEC has to be given as ALIB_CHAR_TYPE_ID_XYZ before invoking this .INL"
30#endif
31#if !defined(ASTR_TALLOC_SPEC)
32# error "Preprocessor symbol ASTR_TCHAR_SPEC has to be given as ALIB_CHAR_TYPE_ID_XYZ before invoking this .INL"
33#endif
34
35
36#if ASTR_TCHAR_SPEC == ALIB_CHAR_TYPE_ID_N
37# define TCHARNAME nchar
38#elif ASTR_TCHAR_SPEC == ALIB_CHAR_TYPE_ID_W
39# define TCHARNAME wchar
40#elif ASTR_TCHAR_SPEC == ALIB_CHAR_TYPE_ID_X
41# define TCHARNAME xchar
42#else
43# error
44#endif
45
46namespace alib { namespace strings {
47
48template<typename TChar>
49class TFormat;
50
51
52//! @cond NO_DOX
53
54// #################################################################################################
55// member implementations
56// #################################################################################################
57
58// instantiations
63extern template ALIB_API integer TAString<TCHARNAME, ASTR_TALLOC_SPEC>::SearchAndReplace ( const TString<TCHARNAME>&,const TString<TCHARNAME>&,integer,integer,lang::Case,integer );
64extern template ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Trim ( const TCString<TCHARNAME>& );
65extern template ALIB_API integer TAString<TCHARNAME, ASTR_TALLOC_SPEC>::TrimAt ( integer,const TCString<TCHARNAME>& );
66#if ALIB_DEBUG_STRINGS
68#endif
69
70// specializations
71#if ASTR_TCHAR_SPEC == ALIB_CHAR_TYPE_ID_N
72template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<CHK,wchar>( const wchar*, integer);
73template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<NC ,wchar>( const wchar*, integer);
74template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<CHK,xchar>( const xchar*, integer);
75template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<NC ,xchar>( const xchar*, integer);
76#endif
77#if ASTR_TCHAR_SPEC == ALIB_CHAR_TYPE_ID_W
78template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<CHK,nchar>( const nchar*, integer);
79template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<NC ,nchar>( const nchar*, integer);
80template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<CHK,xchar>( const xchar*, integer);
81template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<NC ,xchar>( const xchar*, integer);
82#endif
83#if ASTR_TCHAR_SPEC == ALIB_CHAR_TYPE_ID_X
84template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<CHK,nchar>( const nchar*, integer);
85template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<NC ,nchar>( const nchar*, integer);
86template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<CHK,wchar>( const wchar*, integer);
87template<> template<> ALIB_API TAString<TCHARNAME, ASTR_TALLOC_SPEC>& TAString<TCHARNAME, ASTR_TALLOC_SPEC>::Append<NC ,wchar>( const wchar*, integer);
88#endif
89
90
91
92// #################################################################################################
93// T_Append implementations
94// #################################################################################################
95extern template ALIB_API void T_Append< int64_t , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, int64_t );
96extern template ALIB_API void T_Append< uint64_t , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, uint64_t );
97extern template ALIB_API void T_Append<double , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, double );
98#if ALIB_DEBUG
99extern template ALIB_API void T_Append<std::type_info , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const std::type_info& );
100#endif
101#if ALIB_EXT_LIB_THREADS_AVAILABLE
102extern template ALIB_API void T_Append<std::thread::id , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const std::thread::id& );
103#endif
104extern template ALIB_API void T_Append<lang::CallerInfo , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const lang::CallerInfo& );
105
106extern template ALIB_API void T_Append<TFormat<TCHARNAME> , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const TFormat<TCHARNAME>& );
107extern template ALIB_API void T_Append<TFormat<TCHARNAME>::Tab , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const TFormat<TCHARNAME>::Tab& );
108extern template ALIB_API void T_Append<TFormat<TCHARNAME>::Field , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const TFormat<TCHARNAME>::Field& );
109extern template ALIB_API void T_Append<TFormat<TCHARNAME>::Escape , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const TFormat<TCHARNAME>::Escape& );
110extern template ALIB_API void T_Append<TFormat<TCHARNAME>::Bin , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const TFormat<TCHARNAME>::Bin& );
111extern template ALIB_API void T_Append<TFormat<TCHARNAME>::Hex , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const TFormat<TCHARNAME>::Hex& );
112extern template ALIB_API void T_Append<TFormat<TCHARNAME>::Oct , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const TFormat<TCHARNAME>::Oct& );
113extern template ALIB_API void T_Append<TFormat<TCHARNAME>::Fill , TCHARNAME, ASTR_TALLOC_SPEC>::operator()( TAString<TCHARNAME, ASTR_TALLOC_SPEC>&, const TFormat<TCHARNAME>::Fill& );
114
115
116//! @endcond
117
118}} // namespace [alib::strings]
119
120#undef TCHARNAME
121#undef ASTR_TALLOC_SPEC
122#undef ASTR_TCHAR_SPEC
123
124
125
126
127
ALIB_API integer SearchAndReplace(TChar needle, TChar replacement, integer startIdx=0, integer endIdx=strings::MAX_LEN)
ALIB_API void GrowBufferAtLeastBy(integer minimumGrowth)
TAString & Append(const TCharSrc *src, integer srcLength)
ALIB_API integer TrimAt(integer idx, const TCString< TChar > &trimChars=TT_CStringConstants< TChar >::DefaultWhitespaces())
ALIB_API TAString & Trim(const TCString< TChar > &trimChars=TT_CStringConstants< TChar >::DefaultWhitespaces())
ALIB_API void SetBuffer(integer newCapacity)
#define ALIB_API
Definition alib.hpp:639
Case
Denotes upper and lower case character treatment.
Definition alib.cpp:69
characters::wchar wchar
Type alias in namespace alib.
characters::xchar xchar
Type alias in namespace alib.
characters::nchar nchar
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
Definition integers.hpp:273
void operator()(TAString< TChar > &target, const TAppendable &src)