]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/unicode/bytestriebuilder.h
ICU-551.30.tar.gz
[apple/icu.git] / icuSources / common / unicode / bytestriebuilder.h
index 2720a89ca7533c8ce60f181eb028c8cf8462e299..d00ab9b3b0947d0d05c8935f98efe15073da6218 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:  bytestriebuilder.h
 *   Corporation and others.  All Rights Reserved.
 *******************************************************************************
 *   file name:  bytestriebuilder.h
 *   created by: Markus W. Scherer
 */
 
 *   created by: Markus W. Scherer
 */
 
+/**
+ * \file
+ * \brief C++ API: Builder for icu::BytesTrie
+ */
+
 #ifndef __BYTESTRIEBUILDER_H__
 #define __BYTESTRIEBUILDER_H__
 
 #ifndef __BYTESTRIEBUILDER_H__
 #define __BYTESTRIEBUILDER_H__
 
@@ -66,6 +71,9 @@ public:
      * Builds a BytesTrie for the add()ed data.
      * Once built, no further data can be add()ed until clear() is called.
      *
      * Builds a BytesTrie for the add()ed data.
      * Once built, no further data can be add()ed until clear() is called.
      *
+     * A BytesTrie cannot be empty. At least one (byte sequence, 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.
@@ -83,6 +91,9 @@ public:
      * Builds a BytesTrie for the add()ed data and byte-serializes it.
      * Once built, no further data can be add()ed until clear() is called.
      *
      * Builds a BytesTrie for the add()ed data and byte-serializes it.
      * Once built, no further data can be add()ed until clear() is called.
      *
+     * A BytesTrie cannot be empty. At least one (byte sequence, value) pair
+     * must have been add()ed.
+     *
      * Multiple calls to buildStringPiece() return StringPieces referring to the
      * builder's same byte array, without rebuilding.
      * If buildStringPiece() is called after build(), the trie will be
      * Multiple calls to buildStringPiece() return StringPieces referring to the
      * builder's same byte array, without rebuilding.
      * If buildStringPiece() is called after build(), the trie will be
@@ -130,7 +141,6 @@ private:
     virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinearMatch; }
     virtual int32_t getMaxLinearMatchLength() const { return BytesTrie::kMaxLinearMatchLength; }
 
     virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinearMatch; }
     virtual int32_t getMaxLinearMatchLength() const { return BytesTrie::kMaxLinearMatchLength; }
 
-#ifndef U_HIDE_INTERNAL_API
     /**
      * @internal
      */
     /**
      * @internal
      */
@@ -142,7 +152,6 @@ private:
     private:
         const char *s;
     };
     private:
         const char *s;
     };
-#endif  /* U_HIDE_INTERNAL_API */
 
     virtual Node *createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t length,
                                         Node *nextNode) const;
 
     virtual Node *createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t length,
                                         Node *nextNode) const;