Add IPC sync result for SerialPort::Write()
[platform/framework/native/appfw.git] / inc / FBaseUtilRegularExpression.h
index 186bff5..6231517 100644 (file)
@@ -39,28 +39,28 @@ namespace Tizen { namespace Base { namespace Utility
  */
 enum RegularExpressionOptions
 {
-       REGEX_CASELESS = 0x00000001,        /**< The case insensitive match option */
-       REGEX_MULTI_LINE = 0x00000002,      /**< The multiple lines match option @n
-                                                            Without this option, (^) matches only at the start of the string, while ($) matches only at
-                                                            the end of the string, or before a terminating newline */
-       REGEX_DOTALL = 0x00000004,          /**< The dot matches newlines option @n
-                                                                                        Without this option, a dot does not match when the current position is at a newline */
+       REGEX_CASELESS = 0x00000001,                /**< The case insensitive match option */
+       REGEX_MULTI_LINE = 0x00000002,              /**< The multiple lines match option @n
+                                                                   Without this option, (^) matches only at the start of the string, while ($) matches only at
+                                                                   the end of the string, or  before a terminating newline. */
+       REGEX_DOTALL = 0x00000004,                  /**< The dot matches newlines option @n
+                                                                                                       Without this option, a dot does not match when the current position is at a newline. */
        REGEX_EXTENDED = 0x00000008,            /**< The ignored whitespaces in a pattern */
-       REGEX_DOLLAR_ENDONLY = 0x00000020,      /**< The option to match the dollar symbol ($) only at the end @n
-                                                Without this option, a dollar symbol also matches immediately before a newline */
-       REGEX_UNGREEDY = 0x00000200,        /**< The option to reverse the (*) and (*?) symbols @n
-                                                            If this option is set, the quantifiers are not greedy by default, however they are, if followed by a question mark */
-       REGEX_UNICODE = 0x01000000,         /**< The option to support the unicode characters @n
-                                                            Without this option, only the ASCII characters are recognized */
+       REGEX_DOLLAR_ENDONLY = 0x00000020,              /**< The option to match the dollar symbol ($) only at the end @n
+                                                       Without this option, a dollar symbol also matches immediately before a newline. */
+       REGEX_UNGREEDY = 0x00000200,                /**< The option to reverse the (*) and (*?) symbols @n
+                                                                   If this option is set, the quantifiers are not greedy by default, however they are, if followed by a question mark. */
+       REGEX_UNICODE = 0x01000000,                 /**< The option to support the unicode characters @n
+                                                                   Without this option, only the ASCII characters are recognized. */
 };
 
 /**
  * @class      RegularExpression
- * @brief      This class provides the functionality for a regular expression.
+ * @brief              This class provides the functionality for a regular expression.
  *
  * @since 2.0
  *
- * The %RegularExpression class provides the operations of a regular expression based on PCRE and the syntax based on
+ * The %RegularExpression class provides operations of a regular expression based on PCRE and the syntax based on
  * the Perl regular expression.
  * The various supported operations are Match(), Replace(), and Consume().
  *
@@ -116,11 +116,11 @@ public:
         * @since 2.0
         *
         * @return                      An error code
-        * @param[in]           pattern                         The pattern to use
-        * @param[in]           options                         The option for the regular expression
-        * @exception           E_SUCCESS                       The method is successful.
+        * @param[in]           pattern The pattern to use
+        * @param[in]           options The option for the regular expression
+        * @exception           E_SUCCESS               The method is successful.
         * @exception           E_INVALID_STATE         This instance has already been constructed.
-        * @exception           E_INVALID_ARG           The length of the specified @c pattern is @c 0.
+        * @exception           E_INVALID_ARG           The length of the specified @c pattern parameter is @c 0.
         *
         * The following example demonstrates how to use the %Construct() method.
         * @code
@@ -144,25 +144,26 @@ public:
         *
         * @return                      @c true if the text matches successfully, @n
         *                                      else @c false
-        * @param[in]           text                            The text to match
-        * @param[in]           fullMatch                       Set to @c true to match exactly, @n
-        *                                                                              else @c false to match any substring of the text
-        * @param[out]          pMatchedString          The list of the matched string instances @n
-        *                                                              The count of the matched items is acquired from IList::GetCount() and
-        *                                                                              the maximum count of the items is @c 16.
+        * @param[in]           text  The text to match
+        * @param[in]           fullMatch               Set to @c true to match exactly, @n
+        *                                                                      else @c false to match any substring of the text
+        * @param[out]          pMatchedString  A list of the matched string instances @n
+        *                                                      The count of the matched items is acquired from IList::GetCount() and
+        *                                      the maximum count of the items is @c 16.
         * @exception           E_SUCCESS                       The method is successful.
         * @exception           E_INVALID_STATE         This instance has not been constructed as yet.
-        * @exception           E_INVALID_ARG           The length of the specified @c text is @c 0.
+        * @exception           E_INVALID_ARG           The length of the specified @c text parameter is @c 0.
         * @remarks
         *                                      - The specific error code can be accessed using the GetLastResult() method.
-        *                                      - If the grouping subpatterns are used in a pattern, the @c pMatchedString list contains the grouping data. @n
+        *                                      - If the grouping subpatterns are used in a pattern,
+        *                  the @c pMatchedString list will contain the grouping data. @n
         *                                      For example, if the pattern has two grouping subpatterns,
-        *                                      there are three data sets in the @c pMatchedString list.
-        *                                      The first data set contains full grouping data while the second
-        *                                      and third data set contains individual grouping data.
-        *                                      Because this method returns a new instance through an out-parameter @c pMatchedString,
+        *                  there will be three data sets in the @c pMatchedString list. @n
+        *                                      The first data set will be a full grouping data and the second
+        *                      and the third data sets will contain individual grouping data.
+        *                                      Because this method returns a new instance through an out-parameter @c pMatchedString,
         *                                      the caller needs to delete it after use. @n
-        *                                      Setting the element deleter of @c pMatchedString to SingleObjectDeleter is recommended.
+        *                                      Setting the element deleter of @c pMatchedString to SingleObjectDeleter is recommended.
         *
         * The following example demonstrates how to use the %Match() method.
         *
@@ -191,27 +192,26 @@ public:
 
        /**
         * Matches the pattern from the starting point of the text and removes the matched string. @n
-        * If the pattern does not match the text at the starting point, it returns @c false.
+        * If the pattern does not match the text at the starting point, it will return @c false.
         *
         * @since 2.0
         *
         * @return                      @c true if the text matches successfully, @n
         *                                      else @c false
-        * @param[in, out]  text                                The text to consume
-        * @param[out]      pMatchedString              The list of matched string instances  @n
-        *                                      The count of the matched items is acquired from IList::GetCount() and
-        *                                                                      the maximum count of the items is @c 16.
+        * @param[in, out]  text  The text to consume
+        * @param[out]      pMatchedString      A list of matched string instances  @n
+        *                                 The count of the matched items is acquired from IList::GetCount() and
+        *                                                                 the maximum count of the items is @c 16.
         * @exception           E_SUCCESS                       The method is successful.
         * @exception           E_INVALID_STATE         This instance has not been constructed as yet.
-        * @exception           E_INVALID_ARG           The length of the specified @c text is @c 0.
-        * @remarks
-        *                                      - The specific error code can be accessed using the GetLastResult() method.
-        *                                      - If the grouping subpatterns are used in a pattern, the @c pMatchedString list
-        *                                      contains grouping data. @n
+        * @exception           E_INVALID_ARG           The length of the specified @c text parameter is @c 0.
+        * @remarks                     The specific error code can be accessed using the GetLastResult() method.
+        * @remarks                     If the grouping subpatterns are used in a pattern, the @c pMatchedString list will
+        *                              contain the grouping data. @n
         *                                      For example, if the pattern has two grouping subpatterns,
-        *                                      there are three data sets in the @c pMatchedString list. @n
-        *                                      The first data set contains full grouping data while the second
-        *                                      and the third data set contains individual grouping data.
+        *                              there will be three data sets in the @c pMatchedString list. @n
+        *                                      The first data set will be a full grouping data and the second
+        *                              and the third data sets will contain individual grouping data.
         *
         * The following example demonstrates how to use the %Consume() method.
         * @code
@@ -243,21 +243,20 @@ public:
         *
         * @return                      @c true if the text matches successfully, @n
         *                                      else @c false
-        * @param[in, out]      text                            The text to find and consume
-        * @param[out]          pMatchedString          The list of matched string instances @n
-        *                                                      The count of the matched items is acquired from IList::GetCount() and
-        *                                                                              the maximum count of the items is @c 16.
+        * @param[in, out]      text  The text to find and consume
+        * @param[out]          pMatchedString  A list of matched string instances @n
+        *                  The count of the matched items is acquired from IList::GetCount() and
+        *                                              the maximum count of the items is @c 16.
         * @exception           E_SUCCESS                       The method is successful.
         * @exception           E_INVALID_STATE         This instance has not been constructed as yet.
-        * @exception           E_INVALID_ARG           The length of the specified @c text is @c 0.
-        * @remarks
-        *                                      - The specific error code can be accessed using the GetLastResult() method.
-        *                                      - If the grouping subpatterns are used in a pattern,
-        *                                      the @c pMatchedString list contains grouping data. @n
+        * @exception           E_INVALID_ARG           The length of the specified @c text parameter is @c 0.
+        * @remarks                     The specific error code can be accessed using the GetLastResult() method.
+        * @remarks                     If the grouping subpatterns are used in a pattern,
+        *                              the @c pMatchedString list will contain the grouping data. @n
         *                                      For example, if the pattern has two grouping subpatterns,
-        *                                      there are three data sets in the @c pMatchedString list. @n
-        *                                      The first data set contains full grouping data while the second
-        *                                      and the third data sets contains individual grouping data.
+        *                              there will be three data sets in the @c pMatchedString list. @n
+        *                                      The first data set will be a full grouping data and the second
+        *                              and the third data sets will contain individual grouping data.
         *
         * The following example demonstrates how to use the %FindAndConsume() method.
         *
@@ -290,16 +289,15 @@ public:
         *
         * @return                      @c true if the text is replaced successfully, @n
         *                                      else @c false
-        * @param[in, out]      text                            The text to replace when it is matched to a pattern
-        * @param[in]           rewrite                 The text with which to replace
-        * @param[in]           globalReplace           Set to @c true to replace globally, @n
-        *                                                                      else @c false to replace the first match of the pattern in the text
-        * @param[in]           startPos                The starting position of the text
+        * @param[in, out]      text  The text to replace when it is matched to a pattern
+        * @param[in]           rewrite         The text with which to replace
+        * @param[in]           globalReplace   Set to @c true to replace globally, @n
+        *                                                                  else @c false to replace the first match of the pattern in the text
+        * @param[in]           startPos       The starting position of the text
         * @exception           E_SUCCESS                       The method is successful.
         * @exception           E_INVALID_STATE         This instance has not been constructed as yet.
-        * @exception           E_INVALID_ARG           Either of the following conditions has occurred:
-        *                                                                              - The length of the specified @c pattern is @c 0.
-        *                                                                              - The size of @c pMatchedString exceeds the limitations.
+        * @exception           E_INVALID_ARG           The length of the specified @c pattern parameter is @c 0, or
+        *                                                                              the size of @c pMatchedString exceeds limitations.
         * @remarks                     The specific error code can be accessed using the GetLastResult() method.
         *
         * The following example demonstrates how to use the %Replace() method.
@@ -326,14 +324,13 @@ public:
         *
         * @return                      @c true if the text is extracted successfully, @n
         *                                      else @c false
-        * @param[in]           text                            The text to match
-        * @param[in]           rewrite                         The text to replace
-        * @param[out]          out                             The text to extract
+        * @param[in]           text     The text to match
+        * @param[in]           rewrite  The text to replace
+        * @param[out]          out      The text to extract
         * @exception           E_SUCCESS                       The method is successful.
         * @exception           E_INVALID_STATE         This instance has not been constructed as yet.
-        * @exception           E_INVALID_ARG           Either of the following conditions has occurred:
-        *                                                                              - The length of the specified @c pattern is @c 0.
-        *                                                                              - The size of @c pMatchedString exceeds the limitations.
+        * @exception           E_INVALID_ARG           The length of the specified @c pattern parameter is @c 0, or
+        *                                                                              the size of @c pMatchedString exceeds limitations.
         * @remarks                The specific error code can be accessed using the GetLastResult() method.
         *
         * The following example demonstrates how to use the %Extract() method.
@@ -380,8 +377,7 @@ public:
        *
        * @since 2.0
        *
-       * @return       The pattern used to compile the regular expression, @n
-       *                       else an empty string if this instance is not initialized
+       * @return       The pattern used to compile the regular expression @n An empty string if this instance is not initialized
        */
        Tizen::Base::String GetPattern(void) const;
 
@@ -390,9 +386,9 @@ public:
         *
         * @since 2.0
         *
-        * @param[in]           options                 The logical OR operator values of RegularExpressionOptions
+        * @param[in]           options          The logical OR operator values of RegularExpressionOptions
         * @exception           E_SUCCESS                       The method is successful.
-        * @exception           E_INVALID_ARG           The value of the specified @c options is invalid.
+        * @exception           E_INVALID_ARG           The value of @c options is invalid.
         */
        result SetOptions(unsigned long options);