]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/unicode/ucharstriebuilder.h
ICU-551.30.tar.gz
[apple/icu.git] / icuSources / common / unicode / ucharstriebuilder.h
index cbdd9392d62ee8e0cc99fc69912c1a8a39051993..35e353d41b515eea8ff6ad972031501e21644f39 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
 /*
 *******************************************************************************
-*   Copyright (C) 2010-2012, International Business Machines
+*   Copyright (C) 2010-2014, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *******************************************************************************
 *   file name:  ucharstriebuilder.h
 *   Corporation and others.  All Rights Reserved.
 *******************************************************************************
 *   file name:  ucharstriebuilder.h
 #include "unicode/ucharstrie.h"
 #include "unicode/unistr.h"
 
 #include "unicode/ucharstrie.h"
 #include "unicode/unistr.h"
 
+/**
+ * \file
+ * \brief C++ API: Builder for icu::UCharsTrie
+ */
+
 U_NAMESPACE_BEGIN
 
 class UCharsTrieElement;
 U_NAMESPACE_BEGIN
 
 class UCharsTrieElement;
@@ -65,6 +70,9 @@ public:
      * Builds a UCharsTrie for the add()ed data.
      * Once built, no further data can be add()ed until clear() is called.
      *
      * Builds a UCharsTrie for the add()ed data.
      * Once built, no further data can be add()ed until clear() is called.
      *
+     * A UCharsTrie cannot be empty. At least one (string, value) pair
+     * must have been add()ed.
+     *
      * This method passes ownership of the builder's internal result array to the new trie object.
      * Another call to any build() variant will re-serialize the trie.
      * After clear() has been called, a new array will be used as well.
      * This method passes ownership of the builder's internal result array to the new trie object.
      * Another call to any build() variant will re-serialize the trie.
      * After clear() has been called, a new array will be used as well.
@@ -82,6 +90,9 @@ public:
      * Builds a UCharsTrie for the add()ed data and UChar-serializes it.
      * Once built, no further data can be add()ed until clear() is called.
      *
      * Builds a UCharsTrie for the add()ed data and UChar-serializes it.
      * Once built, no further data can be add()ed until clear() is called.
      *
+     * A UCharsTrie cannot be empty. At least one (string, value) pair
+     * must have been add()ed.
+     *
      * Multiple calls to buildUnicodeString() set the UnicodeStrings to the
      * builder's same UChar array, without rebuilding.
      * If buildUnicodeString() is called after build(), the trie will be
      * Multiple calls to buildUnicodeString() set the UnicodeStrings to the
      * builder's same UChar array, without rebuilding.
      * If buildUnicodeString() is called after build(), the trie will be
@@ -137,7 +148,6 @@ private:
     virtual int32_t getMinLinearMatch() const { return UCharsTrie::kMinLinearMatch; }
     virtual int32_t getMaxLinearMatchLength() const { return UCharsTrie::kMaxLinearMatchLength; }
 
     virtual int32_t getMinLinearMatch() const { return UCharsTrie::kMinLinearMatch; }
     virtual int32_t getMaxLinearMatchLength() const { return UCharsTrie::kMaxLinearMatchLength; }
 
-#ifndef U_HIDE_INTERNAL_API
     class UCTLinearMatchNode : public LinearMatchNode {
     public:
         UCTLinearMatchNode(const UChar *units, int32_t len, Node *nextNode);
     class UCTLinearMatchNode : public LinearMatchNode {
     public:
         UCTLinearMatchNode(const UChar *units, int32_t len, Node *nextNode);
@@ -146,7 +156,6 @@ private:
     private:
         const UChar *s;
     };
     private:
         const UChar *s;
     };
-#endif
 
     virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length,
                                         Node *nextNode) const;
 
     virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length,
                                         Node *nextNode) const;