You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by bh...@apache.org on 2010/11/18 17:38:41 UTC

svn commit: r1036522 - /uima/uimacpp/trunk/src/framework/uima/annotator_abase.hpp

Author: bhavani
Date: Thu Nov 18 16:38:41 2010
New Revision: 1036522

URL: http://svn.apache.org/viewvc?rev=1036522&view=rev
Log:
UIMA-1943 provide default implementations for all methods in the Annotator interface

Modified:
    uima/uimacpp/trunk/src/framework/uima/annotator_abase.hpp

Modified: uima/uimacpp/trunk/src/framework/uima/annotator_abase.hpp
URL: http://svn.apache.org/viewvc/uima/uimacpp/trunk/src/framework/uima/annotator_abase.hpp?rev=1036522&r1=1036521&r2=1036522&view=diff
==============================================================================
--- uima/uimacpp/trunk/src/framework/uima/annotator_abase.hpp (original)
+++ uima/uimacpp/trunk/src/framework/uima/annotator_abase.hpp Thu Nov 18 16:38:41 2010
@@ -87,18 +87,18 @@ namespace uima {
 
     /** Call the annotator to initialize itself based on an AnnotatorContext. */
     virtual
-    TyErrorId               initialize(AnnotatorContext & rclAnnotatorContext) = 0;
+    TyErrorId               initialize(AnnotatorContext & rclAnnotatorContext); // = 0;
 
     /**
      * Call the annotator to cache type/feature objects used in subsequent process() calls.
      */
     virtual
-    TyErrorId               typeSystemInit(TypeSystem const &) = 0;
+    TyErrorId               typeSystemInit(TypeSystem const &); // = 0;
 
     /** Call the annotator to deinitialize itself.
      */
     virtual
-    TyErrorId               destroy(void) = 0;
+    TyErrorId               destroy(void); // = 0;
 
     /** Call the annotator to reconfigure itself.(optional method)
      */
@@ -112,7 +112,7 @@ namespace uima {
      * view of the CAS.
      */
     virtual
-    TyErrorId               process(CAS & cas, ResultSpecification const & crResultSpecification) = 0;
+    TyErrorId               process(CAS & cas, ResultSpecification const & crResultSpecification); // = 0;
 
 
     /** Call the annotator to perform a batchProcessComplete operation. */
@@ -164,10 +164,26 @@ namespace uima {
     ;
   }
 
+  inline TyErrorId Annotator::initialize(AnnotatorContext & rclAnnotatorContext) {
+    return (TyErrorId)UIMA_ERR_NONE;
+  }
+
+  inline TyErrorId Annotator::typeSystemInit(TypeSystem const &) {
+    return (TyErrorId)UIMA_ERR_NONE;
+  }
+
+  inline TyErrorId Annotator::destroy() {
+    return (TyErrorId)UIMA_ERR_NONE;
+  }
+
   inline TyErrorId Annotator::reconfigure() {
     return (TyErrorId)UIMA_ERR_NONE;
   }
 
+  inline TyErrorId Annotator::process(CAS & cas, ResultSpecification const & crResultSpecification) {
+    return (TyErrorId) UIMA_ERR_NONE;
+  }
+
   inline TyErrorId Annotator::batchProcessComplete() {
     return (TyErrorId)UIMA_ERR_NONE;
   }