Make the category/category_type/script to-string helper methods part of the public API.

This commit is contained in:
Reece H. Dunn
2013-02-04 14:12:04 +00:00
parent 65c3bc33b6
commit 1116d02aa9
4 changed files with 218 additions and 175 deletions
+25 -1
View File
@@ -1,6 +1,6 @@
/* Unicode Character Database API
*
* Copyright (C) 2012 Reece H. Dunn
* Copyright (C) 2012-2013 Reece H. Dunn
*
* This file is part of ucd-tools.
*
@@ -51,6 +51,14 @@ namespace ucd
Z, /**< @brief Separator */
};
/** @brief Get a string representation of the category_group enumeration value.
*
* @param c The value to get the string representation for.
*
* @return The string representation, or "-" if the value is not recognized.
*/
const char *get_category_group_string(category_group c);
/** @brief Unicode General Category Values
* @see http://www.unicode.org/reports/tr44/
*/
@@ -96,6 +104,14 @@ namespace ucd
Zs, /**< @brief Space Separator */
};
/** @brief Get a string representation of the category enumeration value.
*
* @param c The value to get the string representation for.
*
* @return The string representation, or "--" if the value is not recognized.
*/
const char *get_category_string(category c);
/** @brief Lookup the General Category Group for a General Category.
*
* @param c The General Category to lookup.
@@ -236,6 +252,14 @@ namespace ucd
Zzzz, /**< @brief Unknown Script */
};
/** @brief Get a string representation of the script enumeration value.
*
* @param c The value to get the string representation for.
*
* @return The string representation, or "----" if the value is not recognized.
*/
const char *get_script_string(script s);
/** @brief Lookup the Script for a Unicode codepoint.
*
* @param c The Unicode codepoint to lookup.