]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/unicode/enumset.h
ICU-66108.tar.gz
[apple/icu.git] / icuSources / common / unicode / enumset.h
index a7a2416dcabf02a32f6facc022bff2fe4e097f45..bde8c455c0dd2bd80f57101dc95d0ef094352b72 100644 (file)
@@ -1,7 +1,9 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 ******************************************************************************
 *
-*   Copyright (C) 2012, International Business Machines
+*   Copyright (C) 2012,2014 International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 ******************************************************************************
 
 U_NAMESPACE_BEGIN
 
+/* Can't use #ifndef U_HIDE_INTERNAL_API for the entire EnumSet class, needed in .h file declarations */
 /**
  * enum bitset for boolean fields. Similar to Java EnumSet<>. 
- * Needs to range check.
+ * Needs to range check. Used for private instance variables.
  * @internal
+ * \cond
  */
 template<typename T, uint32_t minValue, uint32_t limitValue>
 class EnumSet {
@@ -32,6 +36,7 @@ public:
     inline EnumSet() : fBools(0) {}
     inline EnumSet(const EnumSet<T,minValue,limitValue>& other) : fBools(other.fBools) {}
     inline ~EnumSet() {}
+#ifndef U_HIDE_INTERNAL_API
     inline void clear() { fBools=0; }
     inline void add(T toAdd) { set(toAdd, 1); }
     inline void remove(T toRemove) { set(toRemove, 0); }
@@ -48,6 +53,7 @@ public:
     inline uint32_t getAll() const {
         return fBools; 
     }
+#endif /* U_HIDE_INTERNAL_API */
 
 private:
     inline uint32_t flag(T toCheck) const { return (1<<(toCheck-minValue)); }
@@ -55,6 +61,8 @@ private:
     uint32_t fBools;
 };
 
+/** \endcond */
+
 U_NAMESPACE_END
 
 #endif /* U_SHOW_CPLUSPLUS_API */