reorganization and more distinct comment headings

compileTime
John Jekel 5 years ago
parent a59c1370d5
commit 2722e6832b
  1. 34
      include/anslatortray.hpp

@ -61,7 +61,7 @@
#if __cplusplus >= 201103L//supports C++11 and later for now
//Headers
/* Headers */
#include <string>
#include <cstdint>
#include <algorithm>
@ -76,25 +76,26 @@
*
* \brief Namespace containing functions to translate from English to Pig Latin.
*/
namespace anslatortray {}
namespace anslatortray//Definitions
{
/* Definitions */
/* Behavior altering definitions (safe to change) */
//Behavior changing definitions (safe to change)
//decent speed boost sacrifising replication of capital letters in translated word in smartWordToPig; recomended based on needs
//#define ANSLATORTRAY_IGNORE_CAPS
//decent speed boost sacrifising replication of capital letters in translated word in smartWordToPig; recomended based on needs
//#define ANSLATORTRAY_IGNORE_CAPS
//extremly small speed boost sacrifising sanity checking; words without vowels/letters will cause problems; not recomended unless speed despratly needed needed
//#define ANSLATORTRAY_SKIP_SANITY_CHECKS
//extremly small speed boost sacrifising sanity checking; words without vowels/letters will cause problems; not recomended unless speed despratly needed needed
//#define ANSLATORTRAY_SKIP_SANITY_CHECKS
//disables uncommonly used functions and other unnecerary things to reduce memory/binary footprints; does little that is actually worth it
//#define ANSLATORTRAY_TINY_TRANSLATOR
//disables uncommonly used functions and other unnecerary things to reduce memory/binary footprints; does little that is actually worth it
//#define ANSLATORTRAY_TINY_TRANSLATOR
/** \brief Ending to use if word to translate starts with a vowel */
constexpr char VOWEL_START_STYLE[] = {"way"};//sometimes "yay" is used
//Definitions
namespace anslatortray
{
//External Use
/* External use definitions */
/** \brief Translates a single complex English word to Pig Latin. (more robust)
*
* Unlike wordToPig, this function also handles punctuation (not seperated by whitespace), singular possesion ('s) and creates similar capatilization to the original english word (unless disabled by defining ANSLATORTRAY_IGNORE_CAPS).\n
@ -149,11 +150,8 @@ namespace anslatortray
inline std::string attemptWordToEnglish(const std::string &pig, std::uint64_t numBeginningConosoants = 1);
#endif
/** \brief Ending to use if word to translate starts with a vowel */
constexpr char VOWEL_START_STYLE[] = {"way"};//sometimes "yay" is used
//Internal use
/* Internal use definitions */
/** \brief Arrays of diffrent characters (internal use) */
namespace Characters
{
@ -192,7 +190,7 @@ namespace anslatortray
}
//Implementations
/* Implementations */
namespace anslatortray
{
std::string smartWordToPig(const std::string &englishWord)

Loading…
Cancel
Save