Improve documentation

experiment/meta_header
Martchus 7 years ago
parent 4d1c874b56
commit c7c64e0784
  1. 33
      application/global.h
  2. 5
      conversion/stringconversion.h
  3. 4
      io/binaryreader.cpp
  4. 4
      io/bitreader.cpp
  5. 4
      io/bitreader.h
  6. 4
      io/path.cpp

@ -1,44 +1,38 @@
#ifndef MARTCHUSUTILITY_LIBRARY_GLOBAL_H
#define MARTCHUSUTILITY_LIBRARY_GLOBAL_H
#ifdef _WIN32
# ifndef PLATFORM_WINDOWS
/*!
* \def PLATFORM_WINDOWS
* \brief Defined on Windows.
*/
/*!
* \def PLATFORM_UNIX
* \brief Defined on any UNIX system.
*/
/*!
* \def PLATFORM_LINUX
* \brief Defined on Linux.
*/
#ifdef _WIN32
# ifndef PLATFORM_WINDOWS
# define PLATFORM_WINDOWS
# endif
#elif __unix__
# ifndef PLATFORM_UNIX
/*!
* \brief Defined on any UNIX system.
*/
# define PLATFORM_UNIX
# endif
#endif
#ifdef __linux__
# ifndef PLATFORM_LINUX
/*!
* \brief Defined on Linux.
*/
# define PLATFORM_LINUX
# endif
#endif
/*!
* \def LIB_EXPORT
* \brief This macro marks a symbol for shared library export.
* \brief Marks a symbol for shared library export.
*/
/*!
* \def LIB_IMPORT
* \brief This macro declares a symbol to be an import from a shared library.
* \brief Declares a symbol to be an import from a shared library.
*/
/*!
@ -60,8 +54,8 @@
/*!
* \def USE_NOTHROW
* \brief This macro marks a function as never throwing, under no circumstances.
* If the function does nevertheless throw, the behaviour is undefined.
* \brief Marks a function as never throwing, under no circumstances.
* \remarks If the function does nevertheless throw, the behaviour is undefined.
*/
#ifndef USE_NOTHROW
@ -74,8 +68,7 @@
/*!
* \def DECLARE_ENUM
* \brief This macro can be used to forward declare enums without
* preventing lupdate to parse the file correctly.
* \brief Forward-declares enums without preventing lupdate to parse the file correctly.
*/
#define DECLARE_ENUM(name, base) enum class name : base;

@ -74,10 +74,9 @@ enum class EmptyPartsTreat
/*!
* \brief Splits the given \a string at the specified \a delimiter.
*
* \param strings The string to be splitted.
* \param string The string to be splitted.
* \param delimiter Specifies the delimiter.
* \param skipEmpty Indicates whether empty parts should be skipped.
* \param emptyPartsRole Specifies the treatment of empty parts.
* \param maxParts Specifies the maximal number of parts. Values less or equal zero indicate an unlimited number of parts.
* \tparam Container The STL-container used to return the parts.
* \returns Returns the parts.

@ -216,7 +216,7 @@ string BinaryReader::readMultibyteTerminatedStringLE(uint16 termination)
* \param maxBytesToRead The maximal number of bytes to read.
* \param termination The two byte sized big endian value to be recognized as termination.
*/
string BinaryReader::readMultibyteTerminatedStringBE(size_t maxBytesToRead, uint16 termination)
string BinaryReader::readMultibyteTerminatedStringBE(std::size_t maxBytesToRead, uint16 termination)
{
unique_ptr<char []> buff = make_unique<char []>(maxBytesToRead);
char *delimChars = m_buffer;
@ -240,7 +240,7 @@ string BinaryReader::readMultibyteTerminatedStringBE(size_t maxBytesToRead, uint
* \param maxBytesToRead The maximal number of bytes to read.
* \param termination The two byte sized little endian value to be recognized as termination.
*/
string BinaryReader::readMultibyteTerminatedStringLE(size_t maxBytesToRead, uint16 termination)
string BinaryReader::readMultibyteTerminatedStringLE(std::size_t maxBytesToRead, uint16 termination)
{
unique_ptr<char []> buff = make_unique<char []>(maxBytesToRead);
char *delimChars = m_buffer;

@ -11,8 +11,8 @@ namespace IoUtilities {
/*!
* \brief Skips the specified number of bits without reading it.
* \param Specifies the number of bits to skip.
* \throws Throws ios_base::failure if the end of the buffer is exceeded.
* \param bitCount Specifies the number of bits to skip.
* \throws Throws std::ios_base::failure if the end of the buffer is exceeded.
* The reader becomes invalid in that case.
*/
void BitReader::skipBits(std::size_t bitCount)

@ -143,10 +143,11 @@ inline std::size_t BitReader::bitsAvailable()
/*!
* \brief Resets the reader.
* \remarks
* - Does not take ownership over the specified \a buffer.
* - bufferSize must be equal or greather than 1.
*/
inline void BitReader::reset(const char *buffer, size_t bufferSize)
inline void BitReader::reset(const char *buffer, std::size_t bufferSize)
{
m_buffer = reinterpret_cast<const byte *>(buffer);
m_end = reinterpret_cast<const byte *>(buffer + bufferSize);
@ -155,6 +156,7 @@ inline void BitReader::reset(const char *buffer, size_t bufferSize)
/*!
* \brief Resets the reader.
* \remarks
* - Does not take ownership over the specified \a buffer.
* - \a end must be greather than \a buffer.
*/

@ -53,7 +53,7 @@ string fileName(const string &path)
*
* The characters <, >, ?, !, *, |, /, :, \ and new lines are considered as invalid.
*/
void removeInvalidChars(string &fileName)
void removeInvalidChars(std::string &fileName)
{
size_t startPos = 0;
static const char invalidPathChars[] = {'\"', '<', '>', '?', '!', '*', '|', '/', ':', '\\', '\n'};
@ -73,7 +73,7 @@ void removeInvalidChars(string &fileName)
* \param createApplicationDirectory Indicates wheter the application subdirectory should be created if not present.
* \returns Returns if a settings directory could be located.
*/
bool settingsDirectory(string &result, string applicationDirectoryName, bool createApplicationDirectory)
bool settingsDirectory(std::string &result, std::string applicationDirectoryName, bool createApplicationDirectory)
{
result.clear();
fstream pathConfigFile("path.config", ios_base::in);

Loading…
Cancel
Save