ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Classes | Functions
aworx::lib::strings::compatibility::std Namespace Reference

This namespace documents compatibility features of ALib Strings and the standard C++ class library found in namespace std.

Classes

struct  equal_to< aworx::lib::strings::TString< TChar > >
 
struct  equal_to_string_ignore_case
 
struct  hash< aworx::lib::strings::TString< TChar > >
 
struct  hash_string_ignore_case
 
struct  less< aworx::lib::strings::TString< TChar > >
 
struct  less_string_ignore_case
 
class  StringReader
 
class  StringWriter
 
struct  T_SuppressStdOstreamOperator
 
struct  TISReadLine
 

Functions

std::ostream & operator<< (std::ostream &stream, const aworx::NString &string)
 
ALIB_API std::ostream & operator<< (std::ostream &stream, const aworx::WString &string)
 
template<typename TAppendable , typename TEnableIf = typename std::enable_if< aworx::lib::strings::TT_IsAppendable<TAppendable,aworx::nchar>::value && !aworx::lib::strings::compatibility::std::T_SuppressStdOstreamOperator<TAppendable>::value >::type>
std::ostream & operator<< (std::ostream &stream, const TAppendable &appendable)
 
std::ostream * operator<< (std::ostream *stream, const aworx::NString &string)
 
std::ostream * operator<< (std::ostream *stream, const aworx::WString &string)
 
template<typename TAppendable , typename TEnableIf = typename std::enable_if< aworx::lib::strings::TT_IsAppendable<TAppendable,aworx::nchar>::value && !aworx::lib::strings::compatibility::std::T_SuppressStdOstreamOperator<TAppendable>::value >::type>
std::ostream * operator<< (std::ostream *stream, const TAppendable &appendable)
 
ALIB_API std::wostream & operator<< (std::wostream &stream, const aworx::NString &string)
 
std::wostream & operator<< (std::wostream &stream, const aworx::WString &string)
 
template<typename TAppendable , typename TEnableIf = typename std::enable_if< aworx::lib::strings::TT_IsAppendable<TAppendable,aworx::wchar>::value && !aworx::lib::strings::compatibility::std::T_SuppressStdOstreamOperator<TAppendable>::value >::type>
std::wostream & operator<< (std::wostream &stream, const TAppendable &appendable)
 
std::wostream * operator<< (std::wostream *stream, const aworx::NString &string)
 
std::wostream * operator<< (std::wostream *stream, const aworx::WString &string)
 
template<typename TAppendable , typename TEnableIf = typename std::enable_if< aworx::lib::strings::TT_IsAppendable<TAppendable,aworx::wchar>::value && !aworx::lib::strings::compatibility::std::T_SuppressStdOstreamOperator<TAppendable>::value >::type>
std::wostream * operator<< (std::wostream *stream, const TAppendable &appendable)
 
std::basic_istream< wchar_t > & operator>> (std::basic_istream< wchar_t > &stream, aworx::WAString &string)
 
std::basic_istream< wchar_t > * operator>> (std::basic_istream< wchar_t > *stream, aworx::WAString &string)
 
std::istream & operator>> (std::istream &stream, aworx::NAString &string)
 
std::istream * operator>> (std::istream *stream, aworx::NAString &string)
 

Function Documentation

◆ operator<<() [1/12]

std::ostream& aworx::lib::strings::compatibility::std::operator<< ( std::ostream &  stream,
const aworx::NString string 
)
inline

Copies the contents of the given NString to into the std::ostream given as reference.

Note
Unlike this documentation indicates, the operator is defined in the global namespace.
Parameters
streamThe ostream object to write the given String into.
stringThe String to write into the given ostream.
Returns
The ostream to allow concatenated operations.

Definition at line 419 of file std_strings_iostream.hpp.

◆ operator<<() [2/12]

ALIB_API std::ostream& aworx::lib::strings::compatibility::std::operator<< ( std::ostream &  stream,
const aworx::WString string 
)

Copies the contents of the given WString to into the std::ostream given as reference.

Note
Unlike this documentation indicates, the operator is defined in the global namespace.
Parameters
streamThe ostream object to write the given String into.
stringThe String to write into the given ostream.
Returns
The ostream to allow concatenated operations.

◆ operator<<() [3/12]

std::ostream& aworx::lib::strings::compatibility::std::operator<< ( std::ostream &  stream,
const TAppendable &  appendable 
)

Copies the contents of the given appendable type the std::ostream given as reference.

Note
Unlike this documentation indicates, this operator is defined in the global namespace.
Template Parameters
TAppendableThe appendable type.
Parameters
streamThe std::ostream object to write the given String into.
appendableThe object whose contents is to be written into the given stream.
Returns
The ostream to allow concatenated operations.

Definition at line 644 of file std_strings_iostream.hpp.

Here is the call graph for this function:

◆ operator<<() [4/12]

std::ostream* aworx::lib::strings::compatibility::std::operator<< ( std::ostream *  stream,
const aworx::NString string 
)
inline

Copies the contents of the given NString to into the std::ostream given as pointer.

Note
Unlike this documentation indicates, the operator is defined in the global namespace.
Parameters
streamThe ostream object to write the given String into.
stringThe String to write into the given ostream.
Returns
The ostream to allow concatenated operations.

Definition at line 434 of file std_strings_iostream.hpp.

◆ operator<<() [5/12]

std::ostream* aworx::lib::strings::compatibility::std::operator<< ( std::ostream *  stream,
const aworx::WString string 
)
inline

Copies the contents of the given WString to into the std::ostream given as pointer.

Note
Unlike this documentation indicates, the operator is defined in the global namespace.
Parameters
streamThe ostream object to write the given String into.
stringThe String to write into the given ostream.
Returns
The ostream to allow concatenated operations.

Definition at line 458 of file std_strings_iostream.hpp.

◆ operator<<() [6/12]

std::ostream* aworx::lib::strings::compatibility::std::operator<< ( std::ostream *  stream,
const TAppendable &  appendable 
)

Copies the contents of the given appendable type the std::ostream given as pointer.

Note
Unlike this documentation indicates, this operator is defined in the global namespace.
Template Parameters
TAppendableThe appendable type.
Parameters
streamThe std::ostream object to write the given String into.
appendableThe object whose contents is to be written into the given stream.
Returns
The ostream to allow concatenated operations.

Definition at line 670 of file std_strings_iostream.hpp.

Here is the call graph for this function:

◆ operator<<() [7/12]

ALIB_API std::wostream& aworx::lib::strings::compatibility::std::operator<< ( std::wostream &  stream,
const aworx::NString string 
)

Copies the contents of the given NString to into the std::wostream given as reference.

Note
This operator uses a local string buffer of 256 bytes size to convert the given narrow string to an string of wchar_t characters that the output stream accepts. In case that the given string is larger, a dynamic memory allocation has to be made.
In performance critical code that writes larger string data, a custom conversion method, that for example reuses a buffer, may be appropriate.
Note
Unlike this documentation indicates, the operator is defined in the global namespace.
Parameters
streamThe ostream object to write the given String into.
stringThe String to write into the given ostream.
Returns
The ostream to allow concatenated operations.

◆ operator<<() [8/12]

std::wostream& aworx::lib::strings::compatibility::std::operator<< ( std::wostream &  stream,
const aworx::WString string 
)
inline

Copies the contents of the given WString to into the std::wostream given as reference.

Note
Unlike this documentation indicates, the operator is defined in the global namespace.
Parameters
streamThe ostream object to write the given String into.
stringThe String to write into the given ostream.
Returns
The ostream to allow concatenated operations.

Definition at line 507 of file std_strings_iostream.hpp.

Here is the call graph for this function:

◆ operator<<() [9/12]

std::wostream& aworx::lib::strings::compatibility::std::operator<< ( std::wostream &  stream,
const TAppendable &  appendable 
)

Copies the contents of the given appendable type the std::ostream given as reference.

Note
Unlike this documentation indicates, this operator is defined in the global namespace.
Template Parameters
TAppendableThe appendable type.
Parameters
streamThe std::ostream object to write the given String into.
appendableThe object whose contents is to be written into the given stream.
Returns
The ostream to allow concatenated operations.

Definition at line 693 of file std_strings_iostream.hpp.

Here is the call graph for this function:

◆ operator<<() [10/12]

std::wostream* aworx::lib::strings::compatibility::std::operator<< ( std::wostream *  stream,
const aworx::NString string 
)
inline

Copies the contents of the given NString to into the std::wostream given as pointer.

Note
Unlike this documentation indicates, the operator is defined in the global namespace.
See also
The notes on memory efficiency, documented with operator operator<<(std::wostream&,const NString&) which this operator uses inline.
Parameters
streamThe ostream object to write the given String into.
stringThe String to write into the given ostream.
Returns
The ostream to allow concatenated operations.

Definition at line 493 of file std_strings_iostream.hpp.

◆ operator<<() [11/12]

std::wostream* aworx::lib::strings::compatibility::std::operator<< ( std::wostream *  stream,
const aworx::WString string 
)
inline

Copies the contents of the given WString to into the std::wostream given as pointer.

Note
Unlike this documentation indicates, the operator is defined in the global namespace.
Parameters
streamThe ostream object to write the given String into.
stringThe String to write into the given ostream.
Returns
The ostream to allow concatenated operations.

Definition at line 530 of file std_strings_iostream.hpp.

◆ operator<<() [12/12]

std::wostream* aworx::lib::strings::compatibility::std::operator<< ( std::wostream *  stream,
const TAppendable &  appendable 
)

Copies the contents of the given appendable type the std::ostream given as pointer.

Note
Unlike this documentation indicates, this operator is defined in the global namespace.
Template Parameters
TAppendableThe appendable type.
Parameters
streamThe std::ostream object to write the given String into.
appendableThe object whose contents is to be written into the given stream.
Returns
The ostream to allow concatenated operations.

Definition at line 722 of file std_strings_iostream.hpp.

◆ operator>>() [1/4]

std::basic_istream<wchar_t>& aworx::lib::strings::compatibility::std::operator>> ( std::basic_istream< wchar_t > &  stream,
aworx::WAString string 
)
inline

Clears the given WAString and extracts data from the std::istream into it. The extractions ends with either the end of the std::istream or when reading a newline character.

Note
If code selection symbol ALIB_CHARACTERS_NATIVE_WCHAR evaluates to false, a local buffer is used to convert the string of wchar_t characters that the input stream provides. In case that the string read from the stream is larger, a dynamic memory allocation has to be made.
In performance critical code that receives larger string data, a custom conversion method, that for example reuses a buffer, may be appropriate.
Note
Unlike this documentation indicates, the operator is defined in the global namespace.
Parameters
streamThe istream object to extract data from.
stringThe AString to receive data.
Returns
The ostream to allow concatenated operations.

Definition at line 589 of file std_strings_iostream.hpp.

Here is the call graph for this function:

◆ operator>>() [2/4]

std::basic_istream<wchar_t>* aworx::lib::strings::compatibility::std::operator>> ( std::basic_istream< wchar_t > *  stream,
aworx::WAString string 
)
inline

Clears the given WAString and extracts data from the std::istream into it. The extractions ends with either the end of the std::istream or when reading a newline character.

Note
Unlike this documentation indicates, the operator is defined in the global namespace.
See also
The notes on memory efficiency, documented with operator operator>>(std::basic_istream<wchar_t>&, WAString& ) which this operator uses inline.
Parameters
streamThe istream object to extract data from.
stringThe AString to receive data.
Returns
The ostream to allow concatenated operations.

Definition at line 618 of file std_strings_iostream.hpp.

◆ operator>>() [3/4]

std::istream& aworx::lib::strings::compatibility::std::operator>> ( std::istream &  stream,
aworx::NAString string 
)
inline

Clears the given NAString and extracts data from the std::istream into it. The extractions ends with either the end of the std::istream or when reading a newline character.

Note
Unlike this documentation indicates, the operator is defined in the global namespace.
Parameters
streamThe istream object to extract data from.
stringThe AString to receive data.
Returns
The ostream to allow concatenated operations.

Definition at line 545 of file std_strings_iostream.hpp.

◆ operator>>() [4/4]

std::istream* aworx::lib::strings::compatibility::std::operator>> ( std::istream *  stream,
aworx::NAString string 
)
inline

Clears the given NAString and extracts data from the std::istream into it. The extractions ends with either the end of the std::istream or when reading a newline character.

Note
Unlike this documentation indicates, the operator is defined in the global namespace.
Parameters
streamThe istream object to extract data from.
stringThe AString to receive data.
Returns
The ostream to allow concatenated operations.

Definition at line 561 of file std_strings_iostream.hpp.