Improve documentation
This commit is contained in:
parent
1ace53533a
commit
94a6b47811
|
@ -61,13 +61,6 @@
|
|||
# error "Middle endian byte order is not supported!"
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* \namespace ConversionUtilities
|
||||
* \brief Contains several functions providing conversions between different data types.
|
||||
*
|
||||
* binaryconversion.h declares functions which convert base data types to an array of bytes and vice versa.
|
||||
* stringconversion.h declares different functions around string conversion such as converting a number to a string and vice versa.
|
||||
*/
|
||||
namespace ConversionUtilities
|
||||
{
|
||||
|
||||
|
|
|
@ -11,6 +11,13 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
/*!
|
||||
* \namespace ConversionUtilities
|
||||
* \brief Contains several functions providing conversions between different data types.
|
||||
*
|
||||
* binaryconversion.h declares functions which convert base data types to an array of bytes and vice versa.
|
||||
* stringconversion.h declares different functions around string conversion such as converting a number to a string and vice versa.
|
||||
*/
|
||||
namespace ConversionUtilities
|
||||
{
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace ConversionUtilities
|
|||
|
||||
/*!
|
||||
* \brief Converts a std::string to a wide string using the specified locale.
|
||||
* \deprecated Might be removed in future release because not used anymore. Use iconv based string converion functions instead.
|
||||
*/
|
||||
template<class E, class T = std::char_traits<E>, class A = std::allocator<E> >
|
||||
class CPP_UTILITIES_EXPORT Widen : public std::unary_function<const std::string &, std::basic_string<E, T, A> >
|
||||
|
|
15
io/copy.h
15
io/copy.h
|
@ -34,8 +34,8 @@ CopyHelper<bufferSize>::CopyHelper()
|
|||
|
||||
/*!
|
||||
* \brief Copies \a count bytes from \a input to \a output.
|
||||
* \remarks Set an exception mask using std::ios::exceptions() to get
|
||||
* a std::ios_base::failure exception when an IO error occurs.
|
||||
* \remarks Set an exception mask using std::ios::exceptions() to get a std::ios_base::failure exception
|
||||
* when an IO error occurs.
|
||||
*/
|
||||
template<std::size_t bufferSize>
|
||||
void CopyHelper<bufferSize>::copy(std::istream &input, std::ostream &output, std::size_t count)
|
||||
|
@ -51,16 +51,19 @@ void CopyHelper<bufferSize>::copy(std::istream &input, std::ostream &output, std
|
|||
|
||||
|
||||
/*!
|
||||
* \brief Copies \a count bytes from \a input to \a output. The procedure might be abortet. Progress updates will be reportet.
|
||||
* \brief Copies \a count bytes from \a input to \a output. The procedure might be aborted and
|
||||
* progress updates will be reported.
|
||||
*
|
||||
* Copying is aborted when \a isAborted returns true. The current progress is reported by calling the specified \a callback function.
|
||||
* Copying is aborted when \a isAborted returns true. The current progress is reported by calling
|
||||
* the specified \a callback function.
|
||||
*
|
||||
* \remarks Set an exception mask using std::ios::exceptions() to get a std::ios_base::failure exception when an IO error occurs.
|
||||
* \remarks Set an exception mask using std::ios::exceptions() to get a std::ios_base::failure exception
|
||||
* when an IO error occurs.
|
||||
*/
|
||||
template<std::size_t bufferSize>
|
||||
void CopyHelper<bufferSize>::callbackCopy(std::istream &input, std::ostream &output, std::size_t count, const std::function<bool (void)> &isAborted, const std::function<void (double)> &callback)
|
||||
{
|
||||
std::size_t totalBytes = count;
|
||||
const std::size_t totalBytes = count;
|
||||
while(count > bufferSize) {
|
||||
input.read(m_buffer, bufferSize);
|
||||
output.write(m_buffer, bufferSize);
|
||||
|
|
|
@ -90,7 +90,7 @@ void removeInvalidChars(std::string &fileName)
|
|||
* \param applicationDirectoryName Specifies the name for the application subdirectory.
|
||||
* \param createApplicationDirectory Indicates wheter the application subdirectory should be created if not present.
|
||||
* \returns Returns whether a settings directory could be located.
|
||||
* \deprecated This function has FIXMEs. Since it is not used actually also a good candidate for being removed.
|
||||
* \deprecated This function has FIXMEs. Since it is not used a good candidate for being removed.
|
||||
*/
|
||||
bool settingsDirectory(std::string &result, std::string applicationDirectoryName, bool createApplicationDirectory)
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@ using namespace std;
|
|||
/*!
|
||||
* \namespace RandomUtilities
|
||||
* \brief Contains utility functions for generating random character sequences.
|
||||
* \deprecated Might be removed in future release because API is bad and it is not used anymore anyways.
|
||||
*/
|
||||
|
||||
namespace RandomUtilities {
|
||||
|
@ -25,7 +26,7 @@ const char symbols[24] = "!\"$%&/()=?'#*+~-_><.:,;";
|
|||
|
||||
/*!
|
||||
* \brief Generates a random character sequence using the given \a randomizer.
|
||||
* \remarks Might be removed because not used anymore.
|
||||
* \deprecated Might be removed in future release because API is bad and it is not used anymore anyways.
|
||||
*/
|
||||
void generateRandomCharacterSequence(char *result, unsigned int length, std::function<int ()> randomizer, int highestRandomNumber, bool useSmallLetters, bool useCapitalLetters, bool useNumbers, bool useSymbols, bool useAtLeastOneOfEachCategory)
|
||||
{
|
||||
|
@ -114,7 +115,7 @@ void generateRandomCharacterSequence(char *result, unsigned int length, std::fun
|
|||
|
||||
/*!
|
||||
* \brief Generates a random character sequence using std::rand().
|
||||
* \remarks Might be removed because not used anymore.
|
||||
* \deprecated Might be removed in future release because API is bad and it is not used anymore anyways.
|
||||
*/
|
||||
void generateRandomCharacterSequence(char *result, unsigned int length, bool useSmallLetters, bool useCapitalLetters, bool useNumbers, bool useSymbols, bool useAtLeastOneOfEachCategory)
|
||||
{
|
||||
|
|
|
@ -3,11 +3,14 @@
|
|||
|
||||
#include <type_traits>
|
||||
|
||||
/// \brief Contains traits for conveniently exploiting SFINAE.
|
||||
namespace Traits {
|
||||
|
||||
/// \cond
|
||||
namespace Detail {
|
||||
enum class Enabler {};
|
||||
}
|
||||
/// \endcond
|
||||
|
||||
template <typename If, typename Then, typename Else>
|
||||
using Conditional = typename std::conditional<If::value, Then, Else>::type;
|
||||
|
|
Loading…
Reference in New Issue