You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ea...@apache.org on 2007/02/03 17:54:51 UTC

svn commit: r503249 [3/6] - /incubator/uima/uimacpp/trunk/src/cas/uima/

Added: incubator/uima/uimacpp/trunk/src/cas/uima/internal_serializedcas.hpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/cas/uima/internal_serializedcas.hpp?view=auto&rev=503249
==============================================================================
--- incubator/uima/uimacpp/trunk/src/cas/uima/internal_serializedcas.hpp (added)
+++ incubator/uima/uimacpp/trunk/src/cas/uima/internal_serializedcas.hpp Sat Feb  3 08:54:50 2007
@@ -0,0 +1,317 @@
+#ifndef UIMA_INTERNAL_SERIALIZEDCAS_HPP
+#define UIMA_INTERNAL_SERIALIZEDCAS_HPP
+/** \file internal_serializedcas.hpp .
+-----------------------------------------------------------------------------
+
+
+
+
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+
+-----------------------------------------------------------------------------
+
+   Description:
+
+-----------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------- */
+
+
+/* ----------------------------------------------------------------------- */
+/*       Include dependencies                                              */
+/* ----------------------------------------------------------------------- */
+#include "uima/pragmas.hpp" // must be first file to be included to get pragmas
+#include <vector>
+#include "uima/types.h"
+#include "uima/unistrref.hpp"
+#include "uima/lowlevel_internal_heap.hpp"
+/* ----------------------------------------------------------------------- */
+/*       Constants                                                         */
+/* ----------------------------------------------------------------------- */
+
+/* ----------------------------------------------------------------------- */
+/*       Forward declarations                                              */
+/* ----------------------------------------------------------------------- */
+
+namespace uima {
+  namespace internal {
+    class CASSerializer;
+  }
+}
+
+/* ----------------------------------------------------------------------- */
+/*       Types / Classes                                                   */
+/* ----------------------------------------------------------------------- */
+
+namespace uima {
+  namespace internal {
+
+    /**
+     * SerializedCAS is the container for all data structure which are the
+     * result of a serialized CAS/CASDefinition.
+     * 
+     * The data format is now described in detail:
+     * 1. Type system: In general, every type and feature is basically an integer > 0.
+     *    - type inheritance table: an integer array which for each type contains its parent,
+     *      e.g. iv_vecTypeInheritanceTable[ t ] is t's parent.
+     *      (length: number of types)
+     *    - feature definition table: an integer array containing for each feature its introduction 
+     *      and range type, i.e.,
+     *      iv_vecFeatureDefinitionTable[ 2*f   ] is the intro type of f and
+     *      iv_vecFeatureDefinitionTable[ 2*f+1 ] is the range type of f and
+     *      (length: 2 * (number of features+1) )
+     *    - feature offset table: an integer array indicating for each feature its offset
+     *      on the heap, i.e.,
+     *      iv_vecFeatureOffsetTable[ f ]
+     *      (length: number of features)
+     *    - type priority table: integer array indicating the internal type priority number:
+     *      Type t1 has priority over t2 iff 
+     *        iv_vecTypePriorityTable[ t1 ] < iv_vecTypePriorityTable[ t2 ]
+     *      (length: number of types)
+     *    - type symbol table: string array indicating the name of each type:
+     *      iv_vecTypeSymbolTable[ t ] is the fully qualified name of t
+     *      (length: number of types)
+     *    - feature symbol table: string array indicating the name of each feature:
+     *      iv_vecFeatureSymbolTable[ f ] is the fully qualified name of f
+     *      (length: number of features)
+     *    - string sub types: integer array indicating which types are string sub types
+     *      iv_stringSubTypes[ i ] is the ith string sub types
+     *      (length: number of string sub types(
+     *    - string subtype values: string array containing the string values for each string subtype:
+     *      iv_stringSubTypeValues[ i ] is some string sub type value
+     *      (length: nunber of string subtype values)
+     *    - string subtype value positions: integer array indicating where the string values in
+     *      the array above start:
+     *      iv_stringSubTypeValuePos[ t ] is the index where the string sub types in 
+     *        iv_stringSubTypeValues start.
+     * 
+     * 2. Index definitions:
+     *    - index ID table: string array indication the names of the indexes:
+     *      iv_vecIndexIDTable[ i ] is the name of the ith index
+     *      (length: number of indexes)
+     *    - comparator definition table: integer array of pairs of a feature and a comp ID:
+     *      iv_vecComparatorDefinitionTable[ i ] is a feature and
+     *      iv_vecComparatorDefinitionTable[ i+1 ] is an integer indicating if the comparison
+     *           is standard or reverse
+     *      for some adequate i (see next bullet)
+     *      (length: number of overall features for all comparators)
+     *    - comparator start table: integer array indicating for each index ID where its 
+     *         comparator description starts in the comparator definition table:
+     *      iv_vecComparatorStartTable[ i ] is an index into iv_vecComparatorDefinitionTable for 
+     *         the index with the name iv_vecIndexIDTable[ i ]
+     *      (length: number of indexes)
+     * 
+     * 3. The Feature Structure Heap:
+     *    - heap array: the heap as one contiguous integer array:
+     *      iv_vecFSHeapArray[ i ] is the ith heap cell
+     *      (length: overall heap size)
+     *    - string symbol table: the string symbol table for the heap as a string array
+     *      iv_vecStringSYmbolTable[ i ] is the ith string referenced on the heap.
+     *      (length: number of strings referenced on the heap)
+     * 
+     * 4. Indexes:
+     *    - indexed FSs: integer array containing all indexed FSs
+     *      iv_vecIndexedFSs[ i ] is the ith feature structure in any index
+     *      (length: number of feature structures in any index)
+     *    
+     */
+    class UIMA_LINK_IMPORTSPEC SerializedCAS {
+      friend class uima::internal::CASSerializer;
+    public:
+      typedef WORD32 TyNum;
+    private:
+      SerializedCAS & operator=(SerializedCAS const &);
+      SerializedCAS(SerializedCAS const &);
+
+      typedef uima::lowlevel::internal::Heap<UChar> TyStringHeap;
+      TyStringHeap iv_stringHeap;
+
+      UnicodeStringRef addString(UnicodeStringRef const & crRef);
+
+      icu::UnicodeString iv_emptyString;
+
+    public:
+      UnicodeStringRef iv_ulstrDocument;
+
+      vector<TyNum> iv_vecTypeInheritanceTable;
+      vector<TyNum> iv_vecFeatureDefinitionTable;
+      vector<UnicodeStringRef> iv_vecTypeSymbolTable;
+      vector<UnicodeStringRef> iv_vecFeatureSymbolTable;
+      vector<TyNum> iv_vecFeatureOffsetTable;
+      vector<TyNum> iv_vecTypePriorityTable;
+
+      vector<TyNum> iv_stringSubTypes;
+      vector<UnicodeStringRef> iv_stringSubTypeValues;
+      vector<TyNum> iv_stringSubTypeValuePos;
+
+      vector<UnicodeStringRef> iv_vecIndexIDTable;
+      vector<TyNum> iv_vecComparatorDefinitionTable;
+      vector<TyNum> iv_vecComparatorStartTable;
+      vector<TyNum> iv_vecIndexKindTable;
+
+      vector<TyNum> iv_vecFSHeapArray;
+      vector<UnicodeStringRef> iv_vecStringSymbolTable;
+
+      vector<TyNum> iv_vecIndexedFSs;
+
+      vector<char> iv_vecByteHeapArray;
+      vector<short> iv_vecShortHeapArray;
+      vector<INT64> iv_vecLongHeapArray;
+
+
+    public:
+      SerializedCAS();
+
+      ~SerializedCAS();
+
+      // type system
+      vector<TyNum> const & getTypeInheritanceTable() const {
+        return iv_vecTypeInheritanceTable;
+      }
+
+      vector<TyNum> const & getFeatureDefinitionTable() const {
+        return iv_vecFeatureDefinitionTable;
+      }
+
+      vector<UnicodeStringRef> const & getTypeSymbolTable() const {
+        return iv_vecTypeSymbolTable;
+      }
+
+      vector<UnicodeStringRef> const & getFeatureSymbolTable() const {
+        return iv_vecFeatureSymbolTable;
+      }
+
+      vector<TyNum> const & getFeatureOffsetTable() const {
+        return iv_vecFeatureOffsetTable;
+      }
+
+      vector<TyNum> const & getTypePriorityTable() const {
+        return iv_vecTypePriorityTable;
+      }
+
+      vector<TyNum> const & getStringSubTypes() const {
+        return iv_stringSubTypes;
+      }
+
+      vector<UnicodeStringRef> const & getStringSubTypeValues() const {
+        return iv_stringSubTypeValues;
+      }
+
+      vector<TyNum> const & getStringSubTypeValuePos() const {
+        return iv_stringSubTypeValuePos;
+      }
+
+      // index definition
+      vector<UnicodeStringRef> const & getIndexIDTable() const {
+        return iv_vecIndexIDTable;
+      }
+
+      vector<TyNum> const & getComparatorDefinitionTable() const {
+        return iv_vecComparatorDefinitionTable;
+      }
+
+      vector<TyNum> const & getComparatorStartTable() const {
+        return iv_vecComparatorStartTable;
+      }
+
+      vector<TyNum> const & getIndexKindTable() const {
+        return iv_vecIndexKindTable;
+      }
+
+      // document
+      UnicodeStringRef getDocument() const {
+        return iv_ulstrDocument;
+      }
+
+      // fsheap
+      vector<TyNum> const & getFSHeapArray() const {
+        return iv_vecFSHeapArray;
+      }
+
+      // 8bit heap
+      vector<char> const & getByteHeapArray() const {
+        return iv_vecByteHeapArray;
+      }
+
+      // 16bit heap
+      vector<short> const & getShortHeapArray() const {
+        return iv_vecShortHeapArray;
+      }
+
+      // 8bit heap
+      vector<INT64> const & getLongHeapArray() const {
+        return iv_vecLongHeapArray;
+      }
+
+
+
+      vector<UnicodeStringRef> const & getStringSymbolTable() const {
+        return iv_vecStringSymbolTable;
+      }
+
+      // indexes
+      vector<TyNum> const & getIndexedFSs() const {
+        return iv_vecIndexedFSs;
+      }
+
+      void reset();
+
+      // returns how many real Java objects (arrays and string) must be created
+      //  in order to create a serialized representations of this CAS
+      size_t getNumberOfJavaObjectsToBeCreatedDefinitions() const {
+        return iv_vecTypeSymbolTable.size()
+               + iv_vecFeatureSymbolTable.size()
+               + iv_vecIndexIDTable.size()
+               + iv_stringSubTypeValues.size()
+               + 64;
+      }
+
+      size_t getNumberOfJavaObjectsToBeCreatedData() const {
+        return iv_vecStringSymbolTable.size() + 64;
+      }
+
+      void print(ostream &) const;
+    };
+
+  }
+}
+/* ----------------------------------------------------------------------- */
+/*       Implementation                                                    */
+/* ----------------------------------------------------------------------- */
+
+namespace uima {
+  namespace internal {
+
+    inline UnicodeStringRef SerializedCAS::addString(UnicodeStringRef const & crRef) {
+      size_t l = crRef.length();
+      int pOff = iv_stringHeap.increaseHeap(l + 1);
+      UChar* p = iv_stringHeap.getHeapStart() + pOff;
+      assert( (2*l) == crRef.getSizeInBytes() );
+      memcpy(p, crRef.getBuffer(), crRef.getSizeInBytes() );
+      return UnicodeStringRef(p,l);
+    }
+  }
+}
+
+
+/* ----------------------------------------------------------------------- */
+
+
+#endif
+

Propchange: incubator/uima/uimacpp/trunk/src/cas/uima/internal_serializedcas.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/uima/uimacpp/trunk/src/cas/uima/internal_typeshortcuts.hpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/cas/uima/internal_typeshortcuts.hpp?view=auto&rev=503249
==============================================================================
--- incubator/uima/uimacpp/trunk/src/cas/uima/internal_typeshortcuts.hpp (added)
+++ incubator/uima/uimacpp/trunk/src/cas/uima/internal_typeshortcuts.hpp Sat Feb  3 08:54:50 2007
@@ -0,0 +1,153 @@
+#ifndef UIMA_INTERNAL_TYPESHORTCUTS_HPP
+#define UIMA_INTERNAL_TYPESHORTCUTS_HPP
+/** \file internal_typeshortcuts.hpp .
+-----------------------------------------------------------------------------
+
+
+
+
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+
+
+
+-----------------------------------------------------------------------------
+
+   Description: This file contains shortcuts for builtin and
+                predefined types/features
+
+-----------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------- */
+
+
+/* ----------------------------------------------------------------------- */
+/*       Include dependencies                                              */
+/* ----------------------------------------------------------------------- */
+#include "uima/pragmas.hpp" // must be first file to be included to get pragmas
+#include "uima/lowlevel_typedefs.hpp"
+
+/* ----------------------------------------------------------------------- */
+/*       Constants                                                         */
+/* ----------------------------------------------------------------------- */
+
+namespace uima {
+  namespace internal {
+    /**
+     * Here are some hardcoded shortcuts to CAS builtin types.
+     * The function areTypeShortcutsCorrect() below checks that they are
+     * in fact correct.
+     */
+    const uima::lowlevel::TyFSType gs_tyIntegerType = 2;
+    const uima::lowlevel::TyFSType gs_tyFloatType = 3;
+    const uima::lowlevel::TyFSType gs_tyStringType = 4;
+
+    const uima::lowlevel::TyFSType gs_tyArrayBaseType = 5;
+    const uima::lowlevel::TyFSType gs_tyFSArrayType = 6;
+    const uima::lowlevel::TyFSType gs_tyFloatArrayType = 7;
+    const uima::lowlevel::TyFSType gs_tyIntArrayType = 8;
+    const uima::lowlevel::TyFSType gs_tyStringArrayType = 9;
+
+    const uima::lowlevel::TyFSType gs_tyListBaseType = 10;
+    const uima::lowlevel::TyFSType gs_tyFSListType = 11;
+    const uima::lowlevel::TyFSType gs_tyEListType = 12;
+    const uima::lowlevel::TyFSType gs_tyNEListType = 13;
+    const uima::lowlevel::TyFSFeature                 gs_tyHeadFeature = 1;
+    const uima::lowlevel::TyFSFeature                 gs_tyTailFeature = 2;
+
+    const uima::lowlevel::TyFSType gs_tyFloatListType = 14;
+    const uima::lowlevel::TyFSType gs_tyEFloatListType = 15;
+    const uima::lowlevel::TyFSType gs_tyNEFloatListType = 16;
+    const uima::lowlevel::TyFSFeature                 gs_tyFloatHeadFeature = 3;
+    const uima::lowlevel::TyFSFeature                 gs_tyFloatTailFeature = 4;
+
+    const uima::lowlevel::TyFSType gs_tyIntListType = 17;
+    const uima::lowlevel::TyFSType gs_tyEIntListType = 18;
+    const uima::lowlevel::TyFSType gs_tyNEIntListType = 19;
+    const uima::lowlevel::TyFSFeature                 gs_tyIntHeadFeature = 5;
+    const uima::lowlevel::TyFSFeature                 gs_tyIntTailFeature = 6;
+
+    const uima::lowlevel::TyFSType gs_tyStringListType = 20;
+    const uima::lowlevel::TyFSType gs_tyEStringListType = 21;
+    const uima::lowlevel::TyFSType gs_tyNEStringListType = 22;
+    const uima::lowlevel::TyFSFeature                         gs_tyStringHeadFeature = 7;
+    const uima::lowlevel::TyFSFeature                         gs_tyStringTailFeature = 8;
+
+    // Extended primitive types
+    const uima::lowlevel::TyFSType gs_tyBooleanType = 23;
+    const uima::lowlevel::TyFSType gs_tyByteType = 24;
+    const uima::lowlevel::TyFSType gs_tyShortType = 25;
+    const uima::lowlevel::TyFSType gs_tyLongType = 26;
+    const uima::lowlevel::TyFSType gs_tyDoubleType = 27;
+    const uima::lowlevel::TyFSType gs_tyBooleanArrayType = 28;
+    const uima::lowlevel::TyFSType gs_tyByteArrayType = 29;
+    const uima::lowlevel::TyFSType gs_tyShortArrayType = 30;
+    const uima::lowlevel::TyFSType gs_tyLongArrayType = 31;
+    const uima::lowlevel::TyFSType gs_tyDoubleArrayType = 32;
+
+    const uima::lowlevel::TyFSType gs_tySofaType = 33;
+    const uima::lowlevel::TyFSFeature                         gs_tySofaNumFeature = 9;
+    const uima::lowlevel::TyFSFeature                         gs_tySofaIDFeature = 10;
+    const uima::lowlevel::TyFSFeature                         gs_tySofaMimeFeature = 11;
+    const uima::lowlevel::TyFSFeature                         gs_tySofaArrayFeature = 12;
+    const uima::lowlevel::TyFSFeature                         gs_tySofaStringFeature = 13;
+    const uima::lowlevel::TyFSFeature                         gs_tySofaURIFeature = 14;
+
+    const uima::lowlevel::TyFSType gs_tyAnnotationBaseType = 34;
+    const uima::lowlevel::TyFSType gs_tyAnnotationType = 35;
+    const uima::lowlevel::TyFSFeature                         gs_tySofaRefFeature = 15;
+    const uima::lowlevel::TyFSFeature                         gs_tyBeginPosFeature = 16;
+    const uima::lowlevel::TyFSFeature                         gs_tyEndPosFeature = 17;
+
+  }  // namespace internal
+}  // namespace uima
+
+/* ----------------------------------------------------------------------- */
+/*       Forward declarations                                              */
+/* ----------------------------------------------------------------------- */
+namespace uima {
+  namespace lowlevel {
+    class TypeSystem;
+  }
+}
+
+
+/* ----------------------------------------------------------------------- */
+/*       Types / Classes                                                   */
+/* ----------------------------------------------------------------------- */
+
+namespace uima {
+  namespace internal {
+    /**
+     * This function returns true if all the shortcuts are correct.
+     * Called in CAS::commitTypeSystem().
+     */
+    bool areTypeShortcutsCorrect(uima::lowlevel::TypeSystem const &);
+  }
+}
+
+/* ----------------------------------------------------------------------- */
+/*       Implementation                                                    */
+/* ----------------------------------------------------------------------- */
+
+
+/* ----------------------------------------------------------------------- */
+
+
+#endif
+

Propchange: incubator/uima/uimacpp/trunk/src/cas/uima/internal_typeshortcuts.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/uima/uimacpp/trunk/src/cas/uima/internal_xmlconstants.hpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/cas/uima/internal_xmlconstants.hpp?view=auto&rev=503249
==============================================================================
--- incubator/uima/uimacpp/trunk/src/cas/uima/internal_xmlconstants.hpp (added)
+++ incubator/uima/uimacpp/trunk/src/cas/uima/internal_xmlconstants.hpp Sat Feb  3 08:54:50 2007
@@ -0,0 +1,74 @@
+#ifndef UIMA_INTERNAL_XMLCONSTANTS_HPP
+#define UIMA_INTERNAL_XMLCONSTANTS_HPP
+/** \file internal_xmlconstants.hpp .
+-----------------------------------------------------------------------------
+
+
+
+
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+
+-----------------------------------------------------------------------------
+
+   Description:
+
+-----------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------- */
+
+
+/* ----------------------------------------------------------------------- */
+/*       Include dependencies                                              */
+/* ----------------------------------------------------------------------- */
+#include "uima/pragmas.hpp" // must be first file to be included to get pragmas
+#include "uima/types.h"
+/* ----------------------------------------------------------------------- */
+/*       Constants                                                         */
+/* ----------------------------------------------------------------------- */
+
+/* ----------------------------------------------------------------------- */
+/*       Forward declarations                                              */
+/* ----------------------------------------------------------------------- */
+
+/* ----------------------------------------------------------------------- */
+/*       Types / Classes                                                   */
+/* ----------------------------------------------------------------------- */
+namespace uima {
+  namespace internal {
+    class UIMA_LINK_IMPORTSPEC XMLConstants {
+    public:
+      static char const * TAGNAME_TYPE;
+      static char const * TAGNAME_FEATURE;
+      static char const * TAGNAME_TYPEHIERARCHY;
+      static char const * ATTRIBUTENAME_RANGE;
+      static char const * ATTRIBUTENAME_NAME;
+    };
+  }
+}
+
+/* ----------------------------------------------------------------------- */
+/*       Implementation                                                    */
+/* ----------------------------------------------------------------------- */
+
+
+/* ----------------------------------------------------------------------- */
+
+
+#endif
+

Propchange: incubator/uima/uimacpp/trunk/src/cas/uima/internal_xmlconstants.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/uima/uimacpp/trunk/src/cas/uima/listfs.hpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/cas/uima/listfs.hpp?view=auto&rev=503249
==============================================================================
--- incubator/uima/uimacpp/trunk/src/cas/uima/listfs.hpp (added)
+++ incubator/uima/uimacpp/trunk/src/cas/uima/listfs.hpp Sat Feb  3 08:54:50 2007
@@ -0,0 +1,497 @@
+#ifndef UIMA_LISTFS_HPP
+#define UIMA_LISTFS_HPP
+/** \file listfs.hpp .
+-----------------------------------------------------------------------------
+
+
+
+
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+
+-----------------------------------------------------------------------------
+
+    \brief Contains the family of ListFS classes (IntListFS, FloatListFS etc.)
+
+   Description:
+
+-----------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------- */
+
+
+/* ----------------------------------------------------------------------- */
+/*       Include dependencies                                              */
+/* ----------------------------------------------------------------------- */
+
+#include "uima/pragmas.hpp"
+
+#include "uima/lowlevel_typedefs.hpp"
+#include "uima/typesystem.hpp"
+#include "uima/exceptions.hpp"
+#include "uima/featurestructure.hpp"
+#include "uima/internal_typeshortcuts.hpp"
+
+#include "unicode/utf.h"
+/* ----------------------------------------------------------------------- */
+/*       Constants                                                         */
+/* ----------------------------------------------------------------------- */
+
+/* ----------------------------------------------------------------------- */
+/*       Forward declarations                                              */
+/* ----------------------------------------------------------------------- */
+
+
+namespace uima {
+  class CAS;
+  namespace internal {
+    class FSSystem;
+  }
+}
+
+/* ----------------------------------------------------------------------- */
+/*       Types / Classes                                                   */
+/* ----------------------------------------------------------------------- */
+
+namespace uima {
+  // exceptions
+  UIMA_EXC_CLASSDECLARE(FSIsNotListException, CASException);
+  UIMA_EXC_CLASSDECLARE(ListIsEmptyException, CASException);
+  UIMA_EXC_CLASSDECLARE(ListIsCircularException, CASException);
+} // namespace uima
+
+/* ----------------------------------------------------------------------- */
+/*       BasicListFS                                                            */
+/* ----------------------------------------------------------------------- */
+
+namespace uima {
+  /// @if internal
+  template< class T,
+  const uima::lowlevel::TyFSType LIST_TYPE,
+  const uima::lowlevel::TyFSType ELIST_TYPE,
+  const uima::lowlevel::TyFSType NELIST_TYPE,
+  const uima::lowlevel::TyFSFeature HEAD_FEATURE,
+  const uima::lowlevel::TyFSFeature TAIL_FEATURE >
+  /// @endif internal
+  /**
+   * A on object representing a list of elements from the CAS.
+   * (e.g. they are of type empty list or of type non-empty list).
+   * An element can be either a FeatureStructure or a float or an int or a
+   * string. For each such element type there is a sub-class of BasicListFS
+   * implementing this template interface with type specific methods.
+   * ListFS, IntListFS, FloatListFS, StringListFS.
+   *
+   * All get methods may throw an <code>InvalidFSObjectException</code> if the
+   * feature structure object is not valid.
+   *
+   * Creating a list can be done like this:
+     @code
+     // store elements of a vector of strings in a list feature
+     FeatureStructure fsNewString;           // re-used for each new string
+     StringListFS fsNewList = tcas.createListFS(); // create an empty list
+     // build up a fs list from our vector
+     for (size_t i = 0; i < vecStrings.size(); ++i) {
+        // create a string feature structure
+        fsNewList.addLast(vecStrings[i]);
+     }
+     // now that the list is complete, set the feature value to the list
+     fsWithListFeature.setFSValue(fListFeature, fsNewList);
+     @endcode
+   * Accessing a list can be done like this:
+     @code
+     // check if we need to touch our element
+     if (fsWithListFeature.hasListElements(fListFeature) ) {
+        // get list
+        StringListFS fsList = fsWithListFeature.getStringListFSValue(fListFeature);
+        // iterate list
+        while (!fsList.isEmpty()) {
+           cout << fsList.getHead() << " "; // print the string
+           fsList.moveToNext();
+        }
+     }
+     @endcode
+   *
+   * The example uses StringListFS to show the usage of the interfaces with
+   * strings. Usage of FeatureStructure, int or float values is analogous.
+   *
+   * @see ListFS
+   * @see IntListFS
+   * @see FloatListFS
+   * @see StringListFS
+   */
+  class UIMA_LINK_IMPORTSPEC BasicListFS : public FeatureStructure {
+    friend class CAS;
+    friend class FeatureStructure;
+  protected:
+    /// @if internal
+    void checkList(lowlevel::TyFS tyFS, TyMessageId tyContext) const;
+    void checkNEList(lowlevel::TyFS tyFS, TyMessageId tyContext) const;
+    void checkCircularity(lowlevel::TyFS tyFS1, lowlevel::TyFS tyFS2, TyMessageId tyContext) const;
+    lowlevel::TyFS getLastListElement(lowlevel::TyFS tyListFS, size_t & rOutSize) const;
+    lowlevel::TyFS addLastLowlevel(lowlevel::TyFS tyListFS, T tyNewElement);
+    void appendLowlevel(lowlevel::TyFS tyListFS1, lowlevel::TyFS tyListFS2);
+
+    BasicListFS(lowlevel::TyFS anFS, uima::CAS&, bool bDoChecks = true);
+    /// @endif internal
+  public:
+    typedef T HeadType;
+
+    /**
+     * Default CTOR: Creates an invalid BasicListFS (use CAS::createListFS() instead)
+     */
+    BasicListFS();
+
+    /**
+     * Upgrade/Conversion CTOR: Creates an BasicListFS from an existing FeatureStructure.
+     * fs must be of type List.
+     *
+     * @throws FSIsNotListException
+     */
+    explicit BasicListFS( FeatureStructure const & fs );
+
+    /**
+     * Return true if this element is not valid or of type empty list.
+     * @throws InvalidFSObjectException
+     */
+    bool isEmpty() const;
+
+    /**
+     * Get the value of the head feature of this list element.
+     * @throws InvalidFSObjectException
+     * @throws ListIsEmptyException
+     */
+    T getHead() const;
+
+    /**
+     * Set the value of the head feature of this list element.
+     * @throws InvalidFSObjectException
+     * @throws ListIsEmptyException
+     */
+    void setHead( T const & fs );
+
+    /**
+     * Get the value of the tail feature of this list element.
+     * @throws InvalidFSObjectException
+     * @throws ListIsEmptyException
+     */
+    BasicListFS getTail() const;
+
+    /**
+     * Set the value of the tail feature of this list element.
+     * @throws InvalidFSObjectException
+     * @throws ListIsEmptyException
+     */
+    void setTail( BasicListFS fs );
+
+    /**
+     * Get the length of this list.
+     * @throws InvalidFSObjectException
+     */
+    size_t getLength() const;
+
+    /**
+     * Adds the value fs to the begin of this list.
+     * addFirst takes constant time with the length of this list
+     *
+     * @return  The list starting with the newly added element.
+     *          (i.e. the first element of the full list)
+     *
+     * @throws InvalidFSObjectException
+     */
+    BasicListFS addFirst( T const & fs );
+
+    /**
+     * Adds the value fs to the end of this list.
+     * addLast takes linear time with the length of this list
+     *
+     * @return  The list starting with the newly added element
+     *          (i.e. the last element of the full list)
+     *
+     * @throws InvalidFSObjectException
+     */
+    BasicListFS addLast( T const & fs );
+
+    /**
+     * Appends the list l to the end of this list.
+     * append takes linear time with the length of this list
+     *
+     * @return  The new list.
+     *
+     * @throws InvalidFSObjectException
+     */
+    BasicListFS append( BasicListFS l );
+
+    /**
+     * Appends the list l to the begin of this list.
+     * prepend takes linear time with the length of list <code>l</code>
+     *
+     * @return  The new list.
+     *
+     * @throws InvalidFSObjectException
+     */
+    BasicListFS prepend( BasicListFS l );
+
+    /**
+     * Advance this list element to the next element in the list.
+     * Equivalent to <code>this = this.getTailFS();</code>
+     * Assumes that the list is not empty.
+     *
+     * @throws InvalidFSObjectException
+     * @throws ListIsEmptyException
+     */
+    void moveToNext();
+
+    /**
+     * Removes the first occurrence of element from this list.
+     *
+     * @return  The singleton list containing the removed element.
+     *
+     * @throws InvalidFSObjectException
+     */
+    BasicListFS removeElement( T const & element);
+
+
+    /// @if internal
+    /**
+     * Check if the list-value for the feature f on feature structure fs
+     * has any elements.
+     * Conceptually this is equivalent to
+     * <code>!fs.getListFSValue(f).isEmpty()</code>
+     * But unlike getListFSValue() hasListElements() will not touch the
+     * feature value for f.
+     *
+     * @param fs  The feature structure on which to check the value for f
+     * @param f   The feature to check (must be of type list)
+     *
+     * @throws InvalidFSObjectException
+     * @throws InvalidFSFeatureObjectException
+     * @throws FeatureNotAppropriateException
+     * @throws FSIsNotListException
+     */
+    static bool hasListElements(FeatureStructure fs, Feature const & f);
+
+    /**
+     * Return feature structure of type list stored at feature fList.
+     * The return value is guaranteed to be a properly terminated list.
+     * If the feature value for f is untouched a properly terminated list
+     * will be created on the fly.
+     *
+     * @param fList   The feature referencing the list to return.
+     *                fList must be valid.
+     *                fList must be appropriate for this feature strucutre.
+     *                fList must be subsumed by type list.
+     *
+     * @throws InvalidFSObjectException
+     * @throws InvalidFSFeatureObjectException
+     * @throws FeatureNotAppropriateException
+     * @throws FSIsNotListException
+     */
+    static BasicListFS getListFSValue(FeatureStructure const & fs, Feature const & fList);
+
+    /**
+     * create a feature structure of type empty list (list length is zero)
+     * @param bIsPermanent indicate if the data should be permanent,
+     *                     i.e., has a lifetime longer than the document
+     */
+    static BasicListFS createListFS( CAS & cas, bool bIsPermanent = false );
+
+    /**
+     * create a feature structure of type non-empty list (list length is 1)
+     * @param fsHead        the feature structure to be made the head of the new list.
+     *                      cas.createListFS(f).getHead() == f
+     * @param bIsPermanent  indicate if the data should be permanent,
+     *                      i.e., has a lifetime longer than the document
+     */
+    static BasicListFS createListFS( CAS & cas, T const & head, bool bIsPermanent = false );
+
+    /// @endif internal
+  }
+  ; // class BasicListFS
+
+  typedef BasicListFS< FeatureStructure, internal::gs_tyFSListType, internal::gs_tyEListType, internal::gs_tyNEListType, internal::gs_tyHeadFeature, internal::gs_tyTailFeature > BasicFSListFS;
+  /**
+   * A ListFS object implements a list of FeatureStructure objects
+   * It is derived from the BasicListFS template interface so all
+   * interesting member functions are derived from BasicListFS.
+   * @see BasicListFS
+   * @see IntListFS
+   * @see FloatListFS
+   * @see StringListFS
+   */
+  class UIMA_LINK_IMPORTSPEC ListFS : public BasicFSListFS {
+    /// @if internal
+    friend class CAS;
+    friend class FeatureStructure;
+  protected:
+    ListFS(lowlevel::TyFS anFS, uima::CAS & cas, bool bDoChecks = true) :
+        BasicFSListFS(anFS, cas, bDoChecks) {}
+  public:
+    /**
+     * Default CTOR: Creates an invalid ListFS (use CAS::createListFS() instead)
+     */
+    ListFS() :
+        BasicFSListFS() {}
+
+    /**
+     * Upgrade/Conversion CTOR: Creates an ListFS from an existing FeatureStructure.
+     * fs must be of type List.
+     *
+     * @throws FSIsNotListException
+     */
+    explicit ListFS( FeatureStructure const & fs ) :
+        BasicFSListFS(fs) {}
+
+    /**
+     * Upgrade/Conversion CTOR: Creates an ListFS from an existing BasicListFS.
+     */
+    ListFS( BasicFSListFS const & fs ) :
+        BasicFSListFS(fs) {}
+    /// @endif internal
+  };
+
+
+  typedef BasicListFS< float, internal::gs_tyFloatListType, internal::gs_tyEFloatListType, internal::gs_tyNEFloatListType, internal::gs_tyFloatHeadFeature, internal::gs_tyFloatTailFeature > BasicFloatListFS;
+  /**
+   * A FloatListFS object implements a list of float values.
+   * It is derived from the BasicListFS template interface so all
+   * interesting member functions are derived from BasicListFS.
+   * @see BasicListFS
+   * @see ListFS
+   * @see IntListFS
+   * @see StringListFS
+   */
+  class UIMA_LINK_IMPORTSPEC FloatListFS : public BasicFloatListFS {
+    /// @if internal
+    friend class CAS;
+    friend class FeatureStructure;
+  protected:
+    FloatListFS(lowlevel::TyFS anFS, uima::CAS & cas, bool bDoChecks = true) :
+        BasicFloatListFS(anFS, cas, bDoChecks) {}
+  public:
+    /**
+     * Default CTOR: Creates an invalid ListFS (use CAS::createListFS() instead)
+     */
+    FloatListFS() :
+        BasicFloatListFS() {}
+
+    /**
+     * Upgrade/Conversion CTOR: Creates an ListFS from an existing FeatureStructure.
+     * fs must be of type List.
+     *
+     * @throws FSIsNotListException
+     */
+    explicit FloatListFS( FeatureStructure const & fs ) :
+        BasicFloatListFS(fs) {}
+
+    /**
+     * Upgrade/Conversion CTOR: Creates an ListFS from an existing BasicListFS.
+     */
+    FloatListFS( BasicFloatListFS const & fs ) :
+        BasicFloatListFS(fs) {}
+    /// @endif internal
+  };
+
+  typedef BasicListFS< int, internal::gs_tyIntListType, internal::gs_tyEIntListType, internal::gs_tyNEIntListType, internal::gs_tyIntHeadFeature, internal::gs_tyIntTailFeature > BasicIntListFS;
+  /**
+   * A IntListFS object implements a list of int values.
+   * It is derived from the BasicListFS template interface so all
+   * interesting member functions are derived from BasicListFS.
+   * @see BasicListFS
+   * @see ListFS
+   * @see FloatListFS
+   * @see StringListFS
+   */
+  class UIMA_LINK_IMPORTSPEC IntListFS : public BasicIntListFS {
+    /// @if internal
+    friend class CAS;
+    friend class FeatureStructure;
+  protected:
+    IntListFS(lowlevel::TyFS anFS, uima::CAS & cas, bool bDoChecks = true) :
+        BasicIntListFS(anFS, cas, bDoChecks) {}
+  public:
+    /**
+     * Default CTOR: Creates an invalid ListFS (use CAS::createListFS() instead)
+     */
+    IntListFS() :
+        BasicIntListFS() {}
+
+    /**
+     * Upgrade/Conversion CTOR: Creates an ListFS from an existing FeatureStructure.
+     * fs must be of type List.
+     *
+     * @throws FSIsNotListException
+     */
+    explicit IntListFS( FeatureStructure const & fs ) :
+        BasicIntListFS(fs) {}
+
+    /**
+     * Upgrade/Conversion CTOR: Creates an ListFS from an existing BasicListFS.
+     */
+    IntListFS( BasicIntListFS const & fs ) :
+        BasicIntListFS(fs) {}
+    /// @endif internal
+  };
+
+
+  typedef BasicListFS< UnicodeStringRef, internal::gs_tyStringListType, internal::gs_tyEStringListType, internal::gs_tyNEStringListType, internal::gs_tyStringHeadFeature, internal::gs_tyStringTailFeature > BasicStringListFS;
+  /**
+   * A StringListFS object implements a list of string values.
+   * It is derived from the BasicListFS template interface so all
+   * interesting member functions are derived from BasicListFS.
+   * @see BasicListFS
+   * @see ListFS
+   * @see IntListFS
+   * @see FloatListFS
+   */
+  class UIMA_LINK_IMPORTSPEC StringListFS : public BasicStringListFS {
+    /// @if internal
+    friend class CAS;
+    friend class FeatureStructure;
+  protected:
+    StringListFS(lowlevel::TyFS anFS, uima::CAS & cas, bool bDoChecks = true) :
+        BasicStringListFS(anFS, cas, bDoChecks) {}
+  public:
+    /**
+     * Default CTOR: Creates an invalid ListFS (use CAS::createListFS() instead)
+     */
+    StringListFS() :
+        BasicStringListFS() {}
+
+    /**
+     * Upgrade/Conversion CTOR: Creates an ListFS from an existing FeatureStructure.
+     * fs must be of type List.
+     *
+     * @throws FSIsNotListException
+     */
+    explicit StringListFS( FeatureStructure const & fs ) :
+        BasicStringListFS(fs) {}
+
+    /**
+     * Upgrade/Conversion CTOR: Creates an ListFS from an existing BasicListFS.
+     */
+    StringListFS( BasicStringListFS const & fs ) :
+        BasicStringListFS(fs) {}
+    /// @endif internal
+  };
+
+} // namespace uima
+
+#endif
+/* <EOF> */
+
+

Propchange: incubator/uima/uimacpp/trunk/src/cas/uima/listfs.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/uima/uimacpp/trunk/src/cas/uima/lowlevel_defaultfsiterator.hpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/cas/uima/lowlevel_defaultfsiterator.hpp?view=auto&rev=503249
==============================================================================
--- incubator/uima/uimacpp/trunk/src/cas/uima/lowlevel_defaultfsiterator.hpp (added)
+++ incubator/uima/uimacpp/trunk/src/cas/uima/lowlevel_defaultfsiterator.hpp Sat Feb  3 08:54:50 2007
@@ -0,0 +1,176 @@
+#ifndef UIMA_DEFAULTFSITERATOR_HPP
+#define UIMA_DEFAULTFSITERATOR_HPP
+
+/** \file lowlevel_internal_indexes.hpp .
+-----------------------------------------------------------------------------
+
+
+
+
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+
+-----------------------------------------------------------------------------
+
+   Description:
+
+-----------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------- */
+
+/* ----------------------------------------------------------------------- */
+/*       Include dependencies                                              */
+/* ----------------------------------------------------------------------- */
+#include "uima/pragmas.hpp" // must be first file to be included to get pragmas
+
+#include "uima/lowlevel_index.hpp"
+#include "uima/lowlevel_indexcomparator.hpp"
+#include "uima/lowlevel_indexiterator.hpp"
+#include "uima/lowlevel_fsheap.hpp"
+
+/* ----------------------------------------------------------------------- */
+/*       Constants                                                         */
+/* ----------------------------------------------------------------------- */
+
+/* ----------------------------------------------------------------------- */
+/*       Forward declarations                                              */
+/* ----------------------------------------------------------------------- */
+namespace uima {
+
+  namespace lowlevel {
+    class IndexIterator;
+    class FSHeap;
+  }
+}
+
+/* ----------------------------------------------------------------------- */
+/*       Types / Classes                                                   */
+/* ----------------------------------------------------------------------- */
+
+/**
+ * This file containts all different index types, i.e., any implementation
+ * of single and composite indexes for the falvors "ordered", "set", and "FIFO".
+ */
+namespace uima {
+  namespace lowlevel {
+    /**
+     * An Iterator over featurestructures in the FSHeap
+     * Can only move forward!
+     * 
+     */
+    class UIMA_LINK_IMPORTSPEC DefaultFSIterator : public IndexIterator {
+    private:
+      uima::lowlevel::TypeSystem const & crTypeSystem;
+      uima::lowlevel::FSHeap::TyFSHeap const &  tyTempHeap;  //the fs array segments
+
+      TyFS pEnd;                           // top of heap
+      TyFS iv_it;                          // current position in heap, should be start of an FS
+      uima::lowlevel::TyFSType tyType;      // heap value at iv_it == FS type
+
+      uima::lowlevel::IndexComparator const * iv_cpComparator;
+      uima::lowlevel::FSHeap const & iv_heap;
+
+    public:
+      // DefaultFSIterator( IndexComparator const * cpComparator,
+      //                   uima::lowlevel::FSHeap const & heap)
+
+      DefaultFSIterator(uima::lowlevel::FSHeap const & heap)
+          :  //iv_cpComparator(cpComparator),
+          iv_heap(heap),
+          crTypeSystem(heap.getTypeSystem()),
+          tyTempHeap(heap.iv_clTemporaryHeap) {
+        pEnd = tyTempHeap.getTopOfHeap();
+        iv_it = 1;
+        tyType = tyTempHeap.getHeapValue(iv_it);
+      }
+
+      void moveToFirst() {
+        iv_it = 1;
+        tyType = tyTempHeap.getHeapValue(iv_it);
+        assert( crTypeSystem.isValidType(tyType) );
+        UIMA_TPRINT("  fs type: " << crTypeSystem.getTypeName(tyType) );
+      }
+
+      /**
+       *  same as moveToFirst 
+       */
+      void moveToLast() {
+        moveToFirst();
+      }
+
+      /**
+       *  same as move to first
+       */
+      void moveToPrevious() {
+        moveToNext();
+      }
+
+
+      bool isValid() const {
+        if (iv_it >= pEnd) {
+          return false;
+        }
+        // is valid type?
+        UIMA_TPRINT("  fs type: " << crTypeSystem.getTypeName(tyType) );
+        return crTypeSystem.isValidType(tyType);
+      }
+
+      TyFS get() const {
+          assert(isValid());
+          return iv_it;
+        }
+
+      TyFS getTyFSType() const {
+        assert(isValid());
+        return tyType;
+      }
+
+      void moveToNext() {
+        if ( !isValid() )
+          return;
+        if (crTypeSystem.isArrayType(tyType)) {
+          // get array size
+          iv_it += 2 + tyTempHeap.getHeapValue(iv_it+1);
+        } else {
+          //look up number of features
+          uima::lowlevel::TyFeatureOffset tySize = crTypeSystem.getFeatureNumber(tyType);
+          iv_it += tySize+1;
+        }
+
+        if (!isValid())
+          return;
+        tyType = tyTempHeap.getHeapValue(iv_it);
+        assert( crTypeSystem.isValidType(tyType) );
+        UIMA_TPRINT("  fs type: " << crTypeSystem.getTypeName(tyType) );
+      }
+
+      IndexIterator* clone() const {
+        return new DefaultFSIterator(iv_heap);
+      }
+
+      bool moveTo(TyFS fs) {
+        return false;
+      }
+
+    };
+
+
+  } //namespace lowlevel
+} //namespace uima
+
+#endif

Propchange: incubator/uima/uimacpp/trunk/src/cas/uima/lowlevel_defaultfsiterator.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/uima/uimacpp/trunk/src/cas/uima/lowlevel_fsfilter.hpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/cas/uima/lowlevel_fsfilter.hpp?view=auto&rev=503249
==============================================================================
--- incubator/uima/uimacpp/trunk/src/cas/uima/lowlevel_fsfilter.hpp (added)
+++ incubator/uima/uimacpp/trunk/src/cas/uima/lowlevel_fsfilter.hpp Sat Feb  3 08:54:50 2007
@@ -0,0 +1,76 @@
+#ifndef UIMA_LOWLEVEL_FSFILTER_HPP
+#define UIMA_LOWLEVEL_FSFILTER_HPP
+/** \file lowlevel_fsfilter.hpp .
+-----------------------------------------------------------------------------
+
+
+
+
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+
+-----------------------------------------------------------------------------
+
+   Description:
+
+-----------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------- */
+
+
+/* ----------------------------------------------------------------------- */
+/*       Include dependencies                                              */
+/* ----------------------------------------------------------------------- */
+#include "uima/pragmas.hpp" // must be first file to be included to get pragmas
+#include "uima/lowlevel_typedefs.hpp"
+
+/* ----------------------------------------------------------------------- */
+/*       Constants                                                         */
+/* ----------------------------------------------------------------------- */
+
+/* ----------------------------------------------------------------------- */
+/*       Forward declarations                                              */
+/* ----------------------------------------------------------------------- */
+
+/* ----------------------------------------------------------------------- */
+/*       Types / Classes                                                   */
+/* ----------------------------------------------------------------------- */
+namespace uima {
+  namespace lowlevel {
+
+    /**
+     * Abstract base class for all filters. Create an FSFilter object and pass
+     * it to IndexRepository::createFilteredIterator(). Memory ownership always
+     * stays at creator.
+     */
+    class UIMA_LINK_IMPORTSPEC FSFilter {
+    public:
+      virtual bool isFiltered(TyFS) const = 0;
+    };
+
+  }
+}
+/* ----------------------------------------------------------------------- */
+/*       Implementation                                                    */
+/* ----------------------------------------------------------------------- */
+
+
+/* ----------------------------------------------------------------------- */
+
+
+#endif

Propchange: incubator/uima/uimacpp/trunk/src/cas/uima/lowlevel_fsfilter.hpp
------------------------------------------------------------------------------
    svn:eol-style = native