UIMA-1912 updates for gcc 4.3 and moved using namespace statement from header files to cpp files
git-svn-id: https://svn.apache.org/repos/asf/uima/uimacpp/trunk@1027664 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/examples/src/DaveDetector.cpp b/examples/src/DaveDetector.cpp
index 795d295..13a3f84 100644
--- a/examples/src/DaveDetector.cpp
+++ b/examples/src/DaveDetector.cpp
@@ -18,6 +18,7 @@
*/
#include "uima/api.hpp"
+using namespace std;
using namespace uima;
class DaveDetector : public Annotator {
diff --git a/examples/src/ExampleApplication.cpp b/examples/src/ExampleApplication.cpp
index 712fbee..328a722 100644
--- a/examples/src/ExampleApplication.cpp
+++ b/examples/src/ExampleApplication.cpp
@@ -23,6 +23,7 @@
#include "uima/xmlwriter.hpp"
#include <sys/stat.h>
+using namespace std;
using namespace uima;
/**
* An example application that reads documents from files, sends them
diff --git a/examples/src/SofaDataAnnotator.cpp b/examples/src/SofaDataAnnotator.cpp
index e57b5cf..3816b0d 100644
--- a/examples/src/SofaDataAnnotator.cpp
+++ b/examples/src/SofaDataAnnotator.cpp
@@ -18,6 +18,7 @@
*/
#include "uima/api.hpp"
+using namespace std;
using namespace uima;
diff --git a/examples/src/SofaExampleAnnotator.cpp b/examples/src/SofaExampleAnnotator.cpp
index bf94a71..632c223 100644
--- a/examples/src/SofaExampleAnnotator.cpp
+++ b/examples/src/SofaExampleAnnotator.cpp
@@ -18,6 +18,7 @@
*/
#include "uima/api.hpp"
+using namespace std;
using namespace uima;
const UChar * translate(UChar *);
diff --git a/examples/src/SofaExampleApplication.cpp b/examples/src/SofaExampleApplication.cpp
index 5c2bfd0..312635f 100644
--- a/examples/src/SofaExampleApplication.cpp
+++ b/examples/src/SofaExampleApplication.cpp
@@ -34,7 +34,7 @@
#include "uima/api.hpp"
#include "uima/envvars.h"
#include "unicode/ucnv.h"
-
+using namespace std;
using namespace uima;
/* ----------------------------------------------------------------------- */
diff --git a/examples/src/XCasWriterCasConsumer.cpp b/examples/src/XCasWriterCasConsumer.cpp
index 476d822..736caeb 100644
--- a/examples/src/XCasWriterCasConsumer.cpp
+++ b/examples/src/XCasWriterCasConsumer.cpp
@@ -20,7 +20,7 @@
#include "uima/api.hpp"
#include "uima/dirwalk.hpp"
#include "uima/xmlwriter.hpp"
-
+using namespace std;
using namespace uima;
diff --git a/src/cas/cas.cpp b/src/cas/cas.cpp
index 01258dd..8c4edea 100644
--- a/src/cas/cas.cpp
+++ b/src/cas/cas.cpp
@@ -69,7 +69,7 @@
#define BEGIN "begin"
#define END "end"
#define LANGUAGE "language"
-
+using namespace std;
namespace uima {
icu::UnicodeString const CAS::ustrCREATOR_ID_CAS(lowlevel::TypeSystem::ustrCREATOR_ID_SYSTEM);
diff --git a/src/cas/featurestructure.cpp b/src/cas/featurestructure.cpp
index 43d7a4b..db7298a 100644
--- a/src/cas/featurestructure.cpp
+++ b/src/cas/featurestructure.cpp
@@ -55,6 +55,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
+using namespace std;
namespace uima {
/*
diff --git a/src/cas/fsfilterbuilder.cpp b/src/cas/fsfilterbuilder.cpp
index 78b6ee9..afdd989 100644
--- a/src/cas/fsfilterbuilder.cpp
+++ b/src/cas/fsfilterbuilder.cpp
@@ -51,7 +51,7 @@
Here are straightforward implementations of FSFilters.
Nothing exciting.
*/
-
+using namespace std;
namespace uima {
namespace internal {
diff --git a/src/cas/fsindex.cpp b/src/cas/fsindex.cpp
index a88ab38..804b1cb 100644
--- a/src/cas/fsindex.cpp
+++ b/src/cas/fsindex.cpp
@@ -40,7 +40,7 @@
#include "uima/lowlevel_index.hpp"
#include "uima/lowlevel_indexrepository.hpp"
#include "uima/fsfilterbuilder.hpp"
-
+using namespace std;
using namespace uima::internal;
/* ----------------------------------------------------------------------- */
/* Constants */
diff --git a/src/cas/fsindexrepository.cpp b/src/cas/fsindexrepository.cpp
index 65c91f8..014c341 100644
--- a/src/cas/fsindexrepository.cpp
+++ b/src/cas/fsindexrepository.cpp
@@ -53,7 +53,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
UIMA_EXC_CLASSIMPLEMENT(InvalidIndexIDException, CASException);
diff --git a/src/cas/internal_casdeserializer.cpp b/src/cas/internal_casdeserializer.cpp
index 068352a..711fb1d 100644
--- a/src/cas/internal_casdeserializer.cpp
+++ b/src/cas/internal_casdeserializer.cpp
@@ -72,7 +72,7 @@
#else
#define CHECK(x) assert(x)
#endif
-
+using namespace std;
namespace uima {
namespace internal {
diff --git a/src/cas/internal_casserializer.cpp b/src/cas/internal_casserializer.cpp
index f865311..cff20cc 100644
--- a/src/cas/internal_casserializer.cpp
+++ b/src/cas/internal_casserializer.cpp
@@ -60,7 +60,7 @@
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace internal {
diff --git a/src/cas/internal_serializedcas.cpp b/src/cas/internal_serializedcas.cpp
index 85188b4..38e9f1a 100644
--- a/src/cas/internal_serializedcas.cpp
+++ b/src/cas/internal_serializedcas.cpp
@@ -50,7 +50,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace internal {
diff --git a/src/cas/lowlevel_fsheap.cpp b/src/cas/lowlevel_fsheap.cpp
index 501a218..212c24a 100644
--- a/src/cas/lowlevel_fsheap.cpp
+++ b/src/cas/lowlevel_fsheap.cpp
@@ -54,7 +54,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace lowlevel {
diff --git a/src/cas/lowlevel_index.cpp b/src/cas/lowlevel_index.cpp
index 79c82e3..8a3988e 100644
--- a/src/cas/lowlevel_index.cpp
+++ b/src/cas/lowlevel_index.cpp
@@ -57,7 +57,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace lowlevel {
diff --git a/src/cas/lowlevel_indexcomparator.cpp b/src/cas/lowlevel_indexcomparator.cpp
index e80454f..bea89cc 100644
--- a/src/cas/lowlevel_indexcomparator.cpp
+++ b/src/cas/lowlevel_indexcomparator.cpp
@@ -54,7 +54,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace lowlevel {
diff --git a/src/cas/lowlevel_indexdefinition.cpp b/src/cas/lowlevel_indexdefinition.cpp
index 96af303..7826fb0 100644
--- a/src/cas/lowlevel_indexdefinition.cpp
+++ b/src/cas/lowlevel_indexdefinition.cpp
@@ -53,6 +53,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
+using namespace std;
namespace uima {
namespace lowlevel {
diff --git a/src/cas/lowlevel_indexrepository.cpp b/src/cas/lowlevel_indexrepository.cpp
index 083b8c4..c9d25e4 100644
--- a/src/cas/lowlevel_indexrepository.cpp
+++ b/src/cas/lowlevel_indexrepository.cpp
@@ -58,7 +58,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace lowlevel {
diff --git a/src/cas/lowlevel_internal_indexes.cpp b/src/cas/lowlevel_internal_indexes.cpp
index 86fa335..eed8a80 100644
--- a/src/cas/lowlevel_internal_indexes.cpp
+++ b/src/cas/lowlevel_internal_indexes.cpp
@@ -59,6 +59,7 @@
/* Implementation */
/* ----------------------------------------------------------------------- */
+using namespace std;
namespace uima {
namespace lowlevel {
namespace internal {
diff --git a/src/cas/lowlevel_typesystem.cpp b/src/cas/lowlevel_typesystem.cpp
index d3a6fb9..cb92f04 100644
--- a/src/cas/lowlevel_typesystem.cpp
+++ b/src/cas/lowlevel_typesystem.cpp
@@ -51,7 +51,7 @@
/* ----------------------------------------------------------------------- */
/* Constants */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace lowlevel {
icu::UnicodeString const TypeSystem::ustrCREATOR_ID_SYSTEM("System");
diff --git a/src/cas/typenamespace.cpp b/src/cas/typenamespace.cpp
index df98063..b58381b 100644
--- a/src/cas/typenamespace.cpp
+++ b/src/cas/typenamespace.cpp
@@ -51,7 +51,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
TypeNameSpace::TypeNameSpace(uima::TypeSystem const & crTypeSystem, icu::UnicodeString const & crName)
: iv_usName(crName),
diff --git a/src/cas/typesystem.cpp b/src/cas/typesystem.cpp
index e8ac9a3..e4e0f63 100644
--- a/src/cas/typesystem.cpp
+++ b/src/cas/typesystem.cpp
@@ -53,7 +53,7 @@
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
UIMA_EXC_CLASSIMPLEMENT(InvalidFSTypeObjectException, CASException);
UIMA_EXC_CLASSIMPLEMENT(InvalidFSFeatureObjectException, CASException);
diff --git a/src/cas/uima/cas.hpp b/src/cas/uima/cas.hpp
index 6a50205..d876b3d 100644
--- a/src/cas/uima/cas.hpp
+++ b/src/cas/uima/cas.hpp
@@ -220,9 +220,9 @@
// absolute Sofa counter
int iv_sofaCount;
// maps sofaNum to Cas views
- map<int, CAS*> iv_sofa2tcasMap;
+ std::map<int, CAS*> iv_sofa2tcasMap;
// maps sofaNum to index repository
- vector<uima::lowlevel::IndexRepository *> iv_sofa2indexMap;
+ std::vector<uima::lowlevel::IndexRepository *> iv_sofa2indexMap;
// reference to one-and-only base CAS
CAS* iv_baseCas;
// reference to one-and-only initial View
diff --git a/src/cas/uima/fsfilterbuilder.hpp b/src/cas/uima/fsfilterbuilder.hpp
index a0dda2c..f30a0b1 100644
--- a/src/cas/uima/fsfilterbuilder.hpp
+++ b/src/cas/uima/fsfilterbuilder.hpp
@@ -147,17 +147,17 @@
* create a filter which filters all feature structures where the structure
* under the feature path <code>crFeaturePath</code> satisfies <code>pFilter</code>,
*/
- FSFilter * createMatchFilter(vector<Feature> const & crFeaturePath, FSFilter * pFilter) const;
+ FSFilter * createMatchFilter(std::vector<Feature> const & crFeaturePath, FSFilter * pFilter) const;
/**
* create a filter which filters a feature structure if the int value found
* under the feature path <code>crFeaturePath</code> is equal, greater, or less than <code>iVal</code>.
*/
- FSFilter * createIntFeatureFilter(vector<Feature> const & crFeaturePath, EnComparisonOperator enOp, int iVal) const;
+ FSFilter * createIntFeatureFilter(std::vector<Feature> const & crFeaturePath, EnComparisonOperator enOp, int iVal) const;
/**
* create a filter which filters a feature structure if the float value found
* under the feature path <code>crFeaturePath</code> is equal, greater, or less than <code>fVal</code>.
*/
- FSFilter * createFloatFeatureFilter(vector<Feature> const & crFeaturePath, EnComparisonOperator enOp, float fVal) const;
+ FSFilter * createFloatFeatureFilter(std::vector<Feature> const & crFeaturePath, EnComparisonOperator enOp, float fVal) const;
/**
* create a filter which filters a feature structure if the string value found
@@ -165,7 +165,7 @@
* the string stored under <code>cpUTFBuffer</code> with length <code>uiLength</code>.
* The string is copied so the buffer may be invalidated after this call.
*/
- FSFilter * createStringFeatureFilter(vector<Feature> const & crFeaturePath, UChar const * cpUTFBuffer, size_t uiLength) const;
+ FSFilter * createStringFeatureFilter(std::vector<Feature> const & crFeaturePath, UChar const * cpUTFBuffer, size_t uiLength) const;
/**
* create a filter which filters all feature structures whose type
diff --git a/src/cas/uima/fsindex.hpp b/src/cas/uima/fsindex.hpp
index 95b8d6a..1e0af26 100644
--- a/src/cas/uima/fsindex.hpp
+++ b/src/cas/uima/fsindex.hpp
@@ -125,7 +125,7 @@
* @throws InvalidFSTypeObjectException
* @throws IncompatibleTypeForIndexException
*/
- FSIterator typeSetIterator(set<uima::Type> const & crTypes) const;
+ FSIterator typeSetIterator(std::set<uima::Type> const & crTypes) const;
/**
* create an iterator over this index with the filter <code>cpFilter</code>,
diff --git a/src/cas/uima/internal_casdeserializer.hpp b/src/cas/uima/internal_casdeserializer.hpp
index efb2c92..761300d 100644
--- a/src/cas/uima/internal_casdeserializer.hpp
+++ b/src/cas/uima/internal_casdeserializer.hpp
@@ -77,8 +77,8 @@
class UIMA_LINK_IMPORTSPEC CASDeserializer {
protected:
- vector<pair<uima::lowlevel::TyHeapCell*, uima::lowlevel::TyHeapCell*> > vecHeapSegments;
- vector<size_t> segmentStarts, segmentTops;
+ std::vector<std::pair<uima::lowlevel::TyHeapCell*, uima::lowlevel::TyHeapCell*> > vecHeapSegments;
+ std::vector<size_t> segmentStarts, segmentTops;
size_t lastSegmentUsed;
#ifdef BYEBYEPTRS
@@ -123,7 +123,7 @@
uima::CAS & rCAS);
- void deserializeIndexedFSs(vector<SerializedCAS::TyNum> & iv_vecIndexedFSs,
+ void deserializeIndexedFSs(std::vector<SerializedCAS::TyNum> & iv_vecIndexedFSs,
uima::CAS & rCAS);
void deserializeTypeSystem(SerializedCAS const &, CASDefinition &);
@@ -132,8 +132,8 @@
public:
- static void deserializeResultSpecification(vector<SerializedCAS::TyNum> const & types,
- vector<SerializedCAS::TyNum> const & features,
+ static void deserializeResultSpecification(std::vector<SerializedCAS::TyNum> const & types,
+ std::vector<SerializedCAS::TyNum> const & features,
CASDefinition const &,
ResultSpecification & result);
diff --git a/src/cas/uima/internal_casserializer.hpp b/src/cas/uima/internal_casserializer.hpp
index 5cc5588..196072b 100644
--- a/src/cas/uima/internal_casserializer.hpp
+++ b/src/cas/uima/internal_casserializer.hpp
@@ -86,12 +86,12 @@
Timer iv_timerIndexedFSs;
#endif
// for blob serialization
- vector<SerializedCAS::TyNum> iv_vecIndexedFSs;
+ std::vector<SerializedCAS::TyNum> iv_vecIndexedFSs;
CASSerializer(CASSerializer const &);
CASSerializer & operator=(CASSerializer const &);
- typedef map<UChar*, uima::internal::SerializedCAS::TyNum> TyStringMap;
+ typedef std::map<UChar*, uima::internal::SerializedCAS::TyNum> TyStringMap;
SerializedCAS::TyNum adjustString(uima::lowlevel::TyHeapCell tyFeatureCell, TyStringMap &, uima::internal::SerializedCAS & rSerializedCAS);
UnicodeStringRef createString(UChar const *, size_t, uima::internal::SerializedCAS & );
@@ -102,12 +102,12 @@
void serializeFSHeapAndStringHeap(uima::CAS const &, uima::internal::SerializedCAS & rSerializedCAS);
void serializeHeaps(uima::CAS const &, uima::internal::SerializedCAS & rSerializedCAS);
- void serializeIndexedFSs(uima::CAS &, vector<uima::internal::SerializedCAS::TyNum> & iv_vecIndexedFSs);
+ void serializeIndexedFSs(uima::CAS &, std::vector<uima::internal::SerializedCAS::TyNum> & iv_vecIndexedFSs);
public:
static void serializeResultSpec(ResultSpecification const & resultSpec,
- vector<internal::SerializedCAS::TyNum>& resultSpecTypes,
- vector<internal::SerializedCAS::TyNum>& resultSpecFeatures);
+ std::vector<internal::SerializedCAS::TyNum>& resultSpecTypes,
+ std::vector<internal::SerializedCAS::TyNum>& resultSpecFeatures);
CASSerializer(bool bCopyStrings);
diff --git a/src/cas/uima/internal_serializedcas.hpp b/src/cas/uima/internal_serializedcas.hpp
index 50db6e9..989bd3c 100644
--- a/src/cas/uima/internal_serializedcas.hpp
+++ b/src/cas/uima/internal_serializedcas.hpp
@@ -149,30 +149,30 @@
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;
+ std::vector<TyNum> iv_vecTypeInheritanceTable;
+ std::vector<TyNum> iv_vecFeatureDefinitionTable;
+ std::vector<UnicodeStringRef> iv_vecTypeSymbolTable;
+ std::vector<UnicodeStringRef> iv_vecFeatureSymbolTable;
+ std::vector<TyNum> iv_vecFeatureOffsetTable;
+ std::vector<TyNum> iv_vecTypePriorityTable;
- vector<TyNum> iv_stringSubTypes;
- vector<UnicodeStringRef> iv_stringSubTypeValues;
- vector<TyNum> iv_stringSubTypeValuePos;
+ std::vector<TyNum> iv_stringSubTypes;
+ std::vector<UnicodeStringRef> iv_stringSubTypeValues;
+ std::vector<TyNum> iv_stringSubTypeValuePos;
- vector<UnicodeStringRef> iv_vecIndexIDTable;
- vector<TyNum> iv_vecComparatorDefinitionTable;
- vector<TyNum> iv_vecComparatorStartTable;
- vector<TyNum> iv_vecIndexKindTable;
+ std::vector<UnicodeStringRef> iv_vecIndexIDTable;
+ std::vector<TyNum> iv_vecComparatorDefinitionTable;
+ std::vector<TyNum> iv_vecComparatorStartTable;
+ std::vector<TyNum> iv_vecIndexKindTable;
- vector<TyNum> iv_vecFSHeapArray;
- vector<UnicodeStringRef> iv_vecStringSymbolTable;
+ std::vector<TyNum> iv_vecFSHeapArray;
+ std::vector<UnicodeStringRef> iv_vecStringSymbolTable;
- vector<TyNum> iv_vecIndexedFSs;
+ std::vector<TyNum> iv_vecIndexedFSs;
- vector<char> iv_vecByteHeapArray;
- vector<short> iv_vecShortHeapArray;
- vector<INT64> iv_vecLongHeapArray;
+ std::vector<char> iv_vecByteHeapArray;
+ std::vector<short> iv_vecShortHeapArray;
+ std::vector<INT64> iv_vecLongHeapArray;
public:
@@ -181,56 +181,56 @@
~SerializedCAS();
// type system
- vector<TyNum> const & getTypeInheritanceTable() const {
+ std::vector<TyNum> const & getTypeInheritanceTable() const {
return iv_vecTypeInheritanceTable;
}
- vector<TyNum> const & getFeatureDefinitionTable() const {
+ std::vector<TyNum> const & getFeatureDefinitionTable() const {
return iv_vecFeatureDefinitionTable;
}
- vector<UnicodeStringRef> const & getTypeSymbolTable() const {
+ std::vector<UnicodeStringRef> const & getTypeSymbolTable() const {
return iv_vecTypeSymbolTable;
}
- vector<UnicodeStringRef> const & getFeatureSymbolTable() const {
+ std::vector<UnicodeStringRef> const & getFeatureSymbolTable() const {
return iv_vecFeatureSymbolTable;
}
- vector<TyNum> const & getFeatureOffsetTable() const {
+ std::vector<TyNum> const & getFeatureOffsetTable() const {
return iv_vecFeatureOffsetTable;
}
- vector<TyNum> const & getTypePriorityTable() const {
+ std::vector<TyNum> const & getTypePriorityTable() const {
return iv_vecTypePriorityTable;
}
- vector<TyNum> const & getStringSubTypes() const {
+ std::vector<TyNum> const & getStringSubTypes() const {
return iv_stringSubTypes;
}
- vector<UnicodeStringRef> const & getStringSubTypeValues() const {
+ std::vector<UnicodeStringRef> const & getStringSubTypeValues() const {
return iv_stringSubTypeValues;
}
- vector<TyNum> const & getStringSubTypeValuePos() const {
+ std::vector<TyNum> const & getStringSubTypeValuePos() const {
return iv_stringSubTypeValuePos;
}
// index definition
- vector<UnicodeStringRef> const & getIndexIDTable() const {
+ std::vector<UnicodeStringRef> const & getIndexIDTable() const {
return iv_vecIndexIDTable;
}
- vector<TyNum> const & getComparatorDefinitionTable() const {
+ std::vector<TyNum> const & getComparatorDefinitionTable() const {
return iv_vecComparatorDefinitionTable;
}
- vector<TyNum> const & getComparatorStartTable() const {
+ std::vector<TyNum> const & getComparatorStartTable() const {
return iv_vecComparatorStartTable;
}
- vector<TyNum> const & getIndexKindTable() const {
+ std::vector<TyNum> const & getIndexKindTable() const {
return iv_vecIndexKindTable;
}
@@ -240,33 +240,33 @@
}
// fsheap
- vector<TyNum> const & getFSHeapArray() const {
+ std::vector<TyNum> const & getFSHeapArray() const {
return iv_vecFSHeapArray;
}
// 8bit heap
- vector<char> const & getByteHeapArray() const {
+ std::vector<char> const & getByteHeapArray() const {
return iv_vecByteHeapArray;
}
// 16bit heap
- vector<short> const & getShortHeapArray() const {
+ std::vector<short> const & getShortHeapArray() const {
return iv_vecShortHeapArray;
}
// 8bit heap
- vector<INT64> const & getLongHeapArray() const {
+ std::vector<INT64> const & getLongHeapArray() const {
return iv_vecLongHeapArray;
}
- vector<UnicodeStringRef> const & getStringSymbolTable() const {
+ std::vector<UnicodeStringRef> const & getStringSymbolTable() const {
return iv_vecStringSymbolTable;
}
// indexes
- vector<TyNum> const & getIndexedFSs() const {
+ std::vector<TyNum> const & getIndexedFSs() const {
return iv_vecIndexedFSs;
}
@@ -286,7 +286,7 @@
return iv_vecStringSymbolTable.size() + 64;
}
- void print(ostream &) const;
+ void print(std::ostream &) const;
};
}
diff --git a/src/cas/uima/lowlevel_fsheap.hpp b/src/cas/uima/lowlevel_fsheap.hpp
index 2900753..3bc926d 100644
--- a/src/cas/uima/lowlevel_fsheap.hpp
+++ b/src/cas/uima/lowlevel_fsheap.hpp
@@ -626,14 +626,14 @@
/**
* print an FS.
*/
- void printFS(ostream&, TyFS) const;
+ void printFS(std::ostream&, TyFS) const;
//#ifndef NDEBUG
// debug methods
TyHeapCell* getHeapStart() const;
bool debugIsValidHeapCell(TyHeapCell) const;
bool debugIsConsistent() const;
- void print(ostream&) const;
+ void print(std::ostream&) const;
//#endif
};
diff --git a/src/cas/uima/lowlevel_index.hpp b/src/cas/uima/lowlevel_index.hpp
index b856d1c..28210d3 100644
--- a/src/cas/uima/lowlevel_index.hpp
+++ b/src/cas/uima/lowlevel_index.hpp
@@ -117,7 +117,7 @@
* Precondition: All types must be subsumed by the type of this index
* (i.e. <code>getType()</code>.
*/
- virtual IndexIterator* createTypeSetIterator(set<uima::lowlevel::TyFSType> const & crTypes) const = 0;
+ virtual IndexIterator* createTypeSetIterator(std::set<uima::lowlevel::TyFSType> const & crTypes) const = 0;
/**
* create a filtered iterator over this index which filter
@@ -133,7 +133,7 @@
* A value != NULL is returned _only_ if the implementing class actually
* uses a vector internally to store the FSs.
*/
- virtual vector<uima::lowlevel::TyFS> const * getVector() const {
+ virtual std::vector<uima::lowlevel::TyFS> const * getVector() const {
return NULL;
}
diff --git a/src/cas/uima/lowlevel_indexcomparator.hpp b/src/cas/uima/lowlevel_indexcomparator.hpp
index dad52a7..bdbf651 100644
--- a/src/cas/uima/lowlevel_indexcomparator.hpp
+++ b/src/cas/uima/lowlevel_indexcomparator.hpp
@@ -85,10 +85,10 @@
IndexDefinition const & iv_indexDefinition;
TyFSType iv_tyType;
- vector<TyFSFeature> iv_features;
- vector<TyFeatureOffset> iv_offsets;
- vector<EnBuiltinTypes> iv_appropTypes;
- vector<EnKeyFeatureComp> iv_comparators;
+ std::vector<TyFSFeature> iv_features;
+ std::vector<TyFeatureOffset> iv_offsets;
+ std::vector<EnBuiltinTypes> iv_appropTypes;
+ std::vector<EnKeyFeatureComp> iv_comparators;
public:
IndexComparator(IndexDefinition const & iv_indexDefinition,
TyFSType tyType);
@@ -98,7 +98,7 @@
*/
IndexComparator(IndexDefinition const & iv_indexDefinition,
TyFSType tyType,
- vector<TyFSFeature> const & crKeyFeatures);
+ std::vector<TyFSFeature> const & crKeyFeatures);
void addKey(TyFSFeature tyFeat, EnKeyFeatureComp tyComp);
@@ -118,11 +118,11 @@
return iv_tyType;
}
- vector<EnKeyFeatureComp> const & getComparisonOps() const {
+ std::vector<EnKeyFeatureComp> const & getComparisonOps() const {
return iv_comparators;
}
- vector<TyFSFeature> const & getKeyFeatures() const {
+ std::vector<TyFSFeature> const & getKeyFeatures() const {
return iv_features;
}
diff --git a/src/cas/uima/lowlevel_indexdefinition.hpp b/src/cas/uima/lowlevel_indexdefinition.hpp
index cca1941..e24a25a 100644
--- a/src/cas/uima/lowlevel_indexdefinition.hpp
+++ b/src/cas/uima/lowlevel_indexdefinition.hpp
@@ -84,14 +84,14 @@
private:
TypeSystem const & iv_crTypeSystem;
// maps ids to index factories
- map<TyIndexID, internal::IndexFactory*> iv_mapFactories;
+ std::map<TyIndexID, internal::IndexFactory*> iv_mapFactories;
// iv_mapIndexTypes[i] is the type of the index with ID i
- map<TyIndexID, TyFSType> iv_mapIndexTypes;
+ std::map<TyIndexID, TyFSType> iv_mapIndexTypes;
// iv_mapIsPermanentFlags[i] is true if index with ID i contains permanent feature structures
- map<TyIndexID, bool> iv_mapIsPermanentFlags;
- vector<uima::lowlevel::IndexComparator*> iv_vecComparators;
+ std::map<TyIndexID, bool> iv_mapIsPermanentFlags;
+ std::vector<uima::lowlevel::IndexComparator*> iv_vecComparators;
bool iv_bIsCommitted;
@@ -101,8 +101,8 @@
*/
bool isCompatibleIndexDefinition(EnIndexKind enIxKind,
TyFSType tyType,
- vector<uima::lowlevel::TyFSFeature> const & crKeyFeatures,
- vector<uima::lowlevel::IndexComparator::EnKeyFeatureComp> const & crComparators,
+ std::vector<uima::lowlevel::TyFSFeature> const & crKeyFeatures,
+ std::vector<uima::lowlevel::IndexComparator::EnKeyFeatureComp> const & crComparators,
TyIndexID const & crID,
bool ) const;
/**
@@ -148,8 +148,8 @@
*/
void defineIndex(EnIndexKind enIxKind,
TyFSType tyType,
- vector<uima::lowlevel::TyFSFeature> const & crKeyFeatures,
- vector<uima::lowlevel::IndexComparator::EnKeyFeatureComp> const & crComparators,
+ std::vector<uima::lowlevel::TyFSFeature> const & crKeyFeatures,
+ std::vector<uima::lowlevel::IndexComparator::EnKeyFeatureComp> const & crComparators,
TyIndexID const & id,
bool bIsPermanent = false);
@@ -191,12 +191,12 @@
*/
TyFSType getTypeForIndex(TyIndexID const & crID) const {
//assert( isValidIndexId(crID) );
- map<TyIndexID, TyFSType>::const_iterator cit = iv_mapIndexTypes.find(crID);
+ std::map<TyIndexID, TyFSType>::const_iterator cit = iv_mapIndexTypes.find(crID);
return (*cit).second;
}
uima::lowlevel::internal::IndexFactory const * getFactory(TyIndexID const & crID) const {
- map<TyIndexID, internal::IndexFactory*>::const_iterator cit = iv_mapFactories.find(crID);
+ std::map<TyIndexID, internal::IndexFactory*>::const_iterator cit = iv_mapFactories.find(crID);
if (cit == iv_mapFactories.end()) {
return NULL;
}
@@ -207,7 +207,7 @@
* get the IDs of all indexes.
* @param rResult output parameter
*/
- void getAllIndexIDs(vector<TyIndexID>& rResult) const;
+ void getAllIndexIDs(std::vector<TyIndexID>& rResult) const;
void reset();
diff --git a/src/cas/uima/lowlevel_indexrepository.hpp b/src/cas/uima/lowlevel_indexrepository.hpp
index 2608ab7..c4b4ea6 100644
--- a/src/cas/uima/lowlevel_indexrepository.hpp
+++ b/src/cas/uima/lowlevel_indexrepository.hpp
@@ -86,29 +86,29 @@
CAS & iv_cas;
// iv_indexes[t][i] is the ith index registered for type t.
- vector<vector<internal::SingleIndex*> > iv_indexes;
+ std::vector<std::vector<internal::SingleIndex*> > iv_indexes;
// idMaximalTypeMapping[t][id] is the position of the index with id
// at indexes[t]
- vector<map<IndexDefinition::TyIndexID, size_t> > iv_idMaximalTypeMapping;
+ std::vector<std::map<IndexDefinition::TyIndexID, size_t> > iv_idMaximalTypeMapping;
// idNonMaximalTypeIndexes[t][i] is the composite index for a nonmaximal type
// with id
- vector<map<IndexDefinition::TyIndexID, internal::CompositeIndex*> > iv_idNonMaximalTypeIndexes;
+ std::vector<std::map<IndexDefinition::TyIndexID, internal::CompositeIndex*> > iv_idNonMaximalTypeIndexes;
// iv_cacheDirtyFlags[t] contains all composite indexes which do
// not have to be updated. If a new FS of type t is added to the index
// iv_cacheDirtyFlags[t] is cleared.
- vector<set<IndexABase const *> > iv_cacheDirtyFlags;
+ std::vector<std::set<IndexABase const *> > iv_cacheDirtyFlags;
// iv_isUsed[t] indicates if index for this type has something in it
// iv_usedIndexes is list of indexes with something in it
- vector<bool> iv_isUsed;
- vector<int> iv_usedIndexes;
+ std::vector<bool> iv_isUsed;
+ std::vector<int> iv_usedIndexes;
//constains FSs which have been added to the IndexRepository but
//do not have an index definition in this CAS.
- vector<TyFS> iv_undefinedindex;
+ std::vector<TyFS> iv_undefinedindex;
bool iv_bIsInitialized;
@@ -123,7 +123,7 @@
internal::SingleIndex* getSingleIndexForFS(TyFS fs, IndexDefinition::TyIndexID const & crID);
internal::SingleIndex* getSingleIndexForType(TyFSType tyType, IndexDefinition::TyIndexID const & crID);
- vector<internal::SingleIndex*> const & getAllSingleIndexesForType(TyFSType tyType) const;
+ std::vector<internal::SingleIndex*> const & getAllSingleIndexesForType(TyFSType tyType) const;
void createIndex(TyFSType t, internal::IndexFactory* fac, IndexDefinition::TyIndexID const & id, bool bIsPermanent);
@@ -158,13 +158,13 @@
return iv_rFSHeap;
}
- void getUsedIndexes(vector<TyFSType>& fillit);
+ void getUsedIndexes(std::vector<TyFSType>& fillit);
//only used for serialization
- void getIndexedFSs(vector<TyFS>& fillit);
+ void getIndexedFSs(std::vector<TyFS>& fillit);
#ifndef NDEBUG
- void print(ostream&) const;
+ void print(std::ostream&) const;
#endif
/**
@@ -240,8 +240,8 @@
inline internal::SingleIndex* IndexRepository::getSingleIndexForType(TyFSType tyType, IndexDefinition::TyIndexID const & crID) {
assert( iv_bIsInitialized );
assert( tyType < iv_idMaximalTypeMapping.size() );
- map<IndexDefinition::TyIndexID, size_t> const & aMap = iv_idMaximalTypeMapping[tyType];
- map<IndexDefinition::TyIndexID, size_t>::const_iterator it = aMap.find(crID);
+ std::map<IndexDefinition::TyIndexID, size_t> const & aMap = iv_idMaximalTypeMapping[tyType];
+ std::map<IndexDefinition::TyIndexID, size_t>::const_iterator it = aMap.find(crID);
assert( it != iv_idMaximalTypeMapping[tyType].end() );
size_t idIndex = (*it).second;
assert( idIndex < iv_indexes[tyType].size() );
@@ -255,7 +255,7 @@
return getSingleIndexForType(type, crID);
}
- inline vector<internal::SingleIndex*> const & IndexRepository::getAllSingleIndexesForType(TyFSType tyType) const {
+ inline std::vector<internal::SingleIndex*> const & IndexRepository::getAllSingleIndexesForType(TyFSType tyType) const {
assert( iv_bIsInitialized );
assert( tyType < iv_idMaximalTypeMapping.size() );
assert( iv_rFSHeap.getTypeSystem().isValidType(tyType) );
@@ -268,9 +268,9 @@
TyFSType type = iv_rFSHeap.getType(fs);
UIMA_TPRINT("Removing fs of type " << iv_rFSHeap.getTypeSystem().getTypeName(type) << ": " << (int) fs);
assert( type < iv_indexes.size() );
- vector<internal::SingleIndex*>& typeIndexes = iv_indexes[type];
+ std::vector<internal::SingleIndex*>& typeIndexes = iv_indexes[type];
- vector<internal::SingleIndex*>::iterator it;
+ std::vector<internal::SingleIndex*>::iterator it;
for (it = typeIndexes.begin(); it != typeIndexes.end(); ++it) {
assert( (*it)->getType() == type );
(*it)->remove(fs);
diff --git a/src/cas/uima/lowlevel_internal_heap.hpp b/src/cas/uima/lowlevel_internal_heap.hpp
index b877297..afeb69f 100644
--- a/src/cas/uima/lowlevel_internal_heap.hpp
+++ b/src/cas/uima/lowlevel_internal_heap.hpp
@@ -93,11 +93,11 @@
// end of current allocated heap segment
T* iv_pTLastHeapCell;
// all starts of all used segments so far (most recently allocated first)
- vector<T*> iv_vecUsedSegments;
+ std::vector<T*> iv_vecUsedSegments;
// all ends of all used segments so far (most recently allocated first)
- vector<T*> iv_vecUsedSegmentEnds;
+ std::vector<T*> iv_vecUsedSegmentEnds;
// all tops of all used segments so far (most recently allocated first)
- vector<T*> iv_vecUsedSegmentTops;
+ std::vector<T*> iv_vecUsedSegmentTops;
// next available cell on heap
WORD32 iv_topOfHeap;
diff --git a/src/cas/uima/lowlevel_internal_indexes.hpp b/src/cas/uima/lowlevel_internal_indexes.hpp
index 59330cb..f7c9594 100644
--- a/src/cas/uima/lowlevel_internal_indexes.hpp
+++ b/src/cas/uima/lowlevel_internal_indexes.hpp
@@ -38,6 +38,7 @@
/* ----------------------------------------------------------------------- */
#include "uima/pragmas.hpp" // must be first file to be included to get pragmas
#include <algorithm>
+#include <memory>
#include <set>
#include "uima/lowlevel_index.hpp"
@@ -90,7 +91,7 @@
*/
virtual bool contains(TyFS) const;
- virtual IndexIterator* createTypeSetIterator(set<uima::lowlevel::TyFSType> const & crType) const {
+ virtual IndexIterator* createTypeSetIterator(std::set<uima::lowlevel::TyFSType> const & crType) const {
assert( crType.size() <= 1 );
if (crType.size() == 1) {
assert( *(crType.begin()) == getType() );
@@ -124,7 +125,7 @@
*/
class UIMA_LINK_IMPORTSPEC OrderedSingleIndex : public ComparatorSingleIndex {
public:
- typedef vector<TyFS> TyStructures;
+ typedef std::vector<TyFS> TyStructures;
private:
TyStructures iv_tyStructures;
protected:
@@ -143,7 +144,7 @@
IndexIterator* createIterator() const;
TyFS find(TyFS fs) const;
- vector<TyFS> const * getVector() const {
+ std::vector<TyFS> const * getVector() const {
return & iv_tyStructures;
}
#ifndef NDEBUG
@@ -157,7 +158,7 @@
* comparator.
* @see SetSingleIndex
*/
- class UIMA_LINK_IMPORTSPEC IndexComparatorLess : public binary_function<TyFS, TyFS, bool> {
+ class UIMA_LINK_IMPORTSPEC IndexComparatorLess : public std::binary_function<TyFS, TyFS, bool> {
private:
IndexComparator const * iv_cpclComparator;
FSHeap const * iv_heap;
@@ -189,7 +190,7 @@
*/
class UIMA_LINK_IMPORTSPEC SetSingleIndex : public ComparatorSingleIndex {
public:
- typedef set<TyFS, IndexComparatorLess> TyStructures;
+ typedef std::set<TyFS, IndexComparatorLess> TyStructures;
private:
// the set is allocated on the heap due to template problems with the Solaris compiler
TyStructures * iv_pStructures;
@@ -236,7 +237,7 @@
*/
class UIMA_LINK_IMPORTSPEC FIFOSingleIndex : public SingleIndex {
public:
- typedef vector<TyFS> TyStructures;
+ typedef std::vector<TyFS> TyStructures;
private:
TyStructures iv_tyFIFO;
protected:
@@ -273,7 +274,7 @@
IndexIterator* createIterator() const;
- vector<TyFS> const * getVector() const {
+ std::vector<TyFS> const * getVector() const {
return & iv_tyFIFO;
}
@@ -290,7 +291,7 @@
*/
class UIMA_LINK_IMPORTSPEC CompositeIndex : public IndexABase {
public:
- typedef vector<SingleIndex*> TyComponents;
+ typedef std::vector<SingleIndex*> TyComponents;
protected:
TyComponents iv_tyComponents;
void add(TyFS /*fs*/) {
@@ -311,7 +312,7 @@
/**
* get all the components for the respective types.
*/
- void getComponentsForTypes(set<uima::lowlevel::TyFSType> const & crTypes, TyComponents & crResult) const;
+ void getComponentsForTypes(std::set<uima::lowlevel::TyFSType> const & crTypes, TyComponents & crResult) const;
public:
void addComponent(SingleIndex* pclIndex) {
assert( iv_crTypeSystem.subsumes( getType(), pclIndex->getType() ) );
@@ -345,7 +346,7 @@
TyComponents::const_iterator cit;
for (cit = iv_tyComponents.begin(); cit != iv_tyComponents.end(); ++cit) {
SingleIndex const * index = (*cit);
- auto_ptr<IndexIterator> apit( index->createIterator() );
+ std::auto_ptr<IndexIterator> apit( index->createIterator() );
for (apit->moveToFirst(); apit->isValid(); apit->moveToNext()) {
iv_cache.insert(iv_cache.end(), apit->get() );
}
@@ -353,7 +354,7 @@
}
public:
IndexIterator* createIterator() const;
- IndexIterator* createTypeSetIterator(set<uima::lowlevel::TyFSType> const & crTypes) const;
+ IndexIterator* createTypeSetIterator(std::set<uima::lowlevel::TyFSType> const & crTypes) const;
IndexComparator const * getComparator() const {
return iv_comparator;
@@ -366,7 +367,7 @@
* A composite ordered index. The iterator is different than the one
* of the superclass in that a different comparison scheme is used.
*/
- class OrderedCompositeIndex : public CachedCompositeIndex<vector<TyFS> > {
+ class OrderedCompositeIndex : public CachedCompositeIndex<std::vector<TyFS> > {
protected:
void clearAndFillCache();
public:
@@ -382,7 +383,7 @@
/**
* A composite set index.
*/
- class SetCompositeIndex : public CachedCompositeIndex<set<TyFS> > {
+ class SetCompositeIndex : public CachedCompositeIndex<std::set<TyFS> > {
protected:
public:
SetCompositeIndex(IndexRepository const & aIndexRepository,
@@ -391,7 +392,7 @@
};
- class FIFOCompositeIndex : public CachedCompositeIndex<vector<TyFS> > {
+ class FIFOCompositeIndex : public CachedCompositeIndex<std::vector<TyFS> > {
protected:
public:
FIFOCompositeIndex(IndexRepository const & crIndexRepository,
diff --git a/src/cas/uima/lowlevel_typesystem.hpp b/src/cas/uima/lowlevel_typesystem.hpp
index e412304..2e30dbf 100644
--- a/src/cas/uima/lowlevel_typesystem.hpp
+++ b/src/cas/uima/lowlevel_typesystem.hpp
@@ -86,47 +86,48 @@
// for building the hierarchy
// tree[t] are the daughters of type t
- vector<vector<TyFSType> > iv_vecTree;
+
+ std::vector<std::vector<TyFSType> > iv_vecTree;
// introducedFeatures[t] are the features introduced at type t
- vector<vector<TyFSFeature> > iv_vecIntroducedFeatures;
+ std::vector<std::vector<TyFSFeature> > iv_vecIntroducedFeatures;
// useful map to parents of type t
- vector<TyFSType> iv_vecParents;
+ std::vector<TyFSType> iv_vecParents;
// iv_vecRangeTypes[f] is the range type for feature f
- vector<TyFSType> iv_vecRangeTypes;
+ std::vector<TyFSType> iv_vecRangeTypes;
// iv_vecMultiRefs[f] is the multipleReferencesAllowed property for feature f
- vector<bool> iv_vecMultiRefs;
+ std::vector<bool> iv_vecMultiRefs;
// names of types and features
- vector<icu::UnicodeString> iv_vecTypeNames;
- vector<icu::UnicodeString> iv_vecTypeCreatorIDs;
- vector<icu::UnicodeString> iv_vecFeatureBaseNames;
- vector<icu::UnicodeString> iv_vecFeatureCreatorIDs;
+ std::vector<icu::UnicodeString> iv_vecTypeNames;
+ std::vector<icu::UnicodeString> iv_vecTypeCreatorIDs;
+ std::vector<icu::UnicodeString> iv_vecFeatureBaseNames;
+ std::vector<icu::UnicodeString> iv_vecFeatureCreatorIDs;
// string sub types
- vector<vector<icu::UnicodeString> > iv_enumStrings;
- map<TyFSType, TyFeatureOffset> iv_stringSubtypeToStringSet;
+ std::vector<std::vector<icu::UnicodeString> > iv_enumStrings;
+ std::map<TyFSType, TyFeatureOffset> iv_stringSubtypeToStringSet;
// list of priority pairs
- vector< pair<TyFSType, TyFSType> > iv_typePriorityList;
+ std::vector< std::pair<TyFSType, TyFSType> > iv_typePriorityList;
// the next fields are computed during commit()
// featureNumber[t] is the number of features of type t
- vector<TyFeatureOffset> iv_vecFeatureNumber;
+ std::vector<TyFeatureOffset> iv_vecFeatureNumber;
// featureOffset[f] is the offset of feature f
- vector< TyFeatureOffset > iv_vecFeatureOffset;
+ std::vector< TyFeatureOffset > iv_vecFeatureOffset;
// iv_vecTypeFeatureOffsetMapping[t][o] is the feature appropriate
// for type t with offset o
- vector< vector<TyFSFeature> > iv_vecTypeFeatureOffsetMapping;
+ std::vector< std::vector<TyFSFeature> > iv_vecTypeFeatureOffsetMapping;
// approp[t][f] is true if feature f is appropriate for type t
- vector< vector< bool > > iv_vecApprop;
+ std::vector< std::vector< bool > > iv_vecApprop;
// the total order embedding the user defined type priorities
- map<TyFSType, size_t> iv_mapTypePriority;
+ std::map<TyFSType, size_t> iv_mapTypePriority;
// use to avoid calling expensive routine if no custom priorities defined
bool iv_customTypePrioritySet;
@@ -221,10 +222,10 @@
#ifndef NDEBUG
bool debugIsTreeConsistent() const;
- void printTree(int, TyFSType, ostream&) const;
+ void printTree(int, TyFSType, std::ostream&) const;
#endif
// These two are used in test_cas when built debug
- void print(ostream&) const;
+ void print(std::ostream&) const;
bool debugIsConsistent() const;
/**
@@ -257,7 +258,7 @@
*/
TyFSType createType(TyFSType tyParent, icu::UnicodeString const & crName, icu::UnicodeString const & crusCreatorID);
- TyFSType createStringSubtype(icu::UnicodeString const & crName, vector<icu::UnicodeString> const & crStrings, icu::UnicodeString const & crusCreatorID);
+ TyFSType createStringSubtype(icu::UnicodeString const & crName, std::vector<icu::UnicodeString> const & crStrings, icu::UnicodeString const & crusCreatorID);
/**
* create a feature on <code>tyIntro</code> with value type <code>tyValueType</code>
@@ -360,13 +361,13 @@
return iv_vecFeatureBaseNames.size() - 1;
}
- vector<icu::UnicodeString> const & getStringsForStringSubtype(TyFSType type) const;
+ std::vector<icu::UnicodeString> const & getStringsForStringSubtype(TyFSType type) const;
/**
* get a list of all the types in the type system.
* @param rvecResult output parameter
*/
- void getAllTypes(vector<TyFSType>& rvecResult) const {
+ void getAllTypes(std::vector<TyFSType>& rvecResult) const {
rvecResult.clear();
TyFSType i;
for (i=1; i<iv_vecTypeNames.size(); ++i) {
@@ -378,7 +379,7 @@
* get a list of all the features in the type system.
* @param rvecResult output parameter
*/
- void getAllFeatures(vector<TyFSFeature>& rvecResult) const {
+ void getAllFeatures(std::vector<TyFSFeature>& rvecResult) const {
rvecResult.clear();
TyFSFeature i;
for (i=1; i<iv_vecFeatureBaseNames.size(); ++i) {
@@ -449,9 +450,9 @@
* all features introduced by <code>tyType</code> or one of its ancestors.
* @param rResult output parameter
*/
- void getAppropriateFeatures(TyFSType tyType, vector<TyFSFeature>& rResult) const;
+ void getAppropriateFeatures(TyFSType tyType, std::vector<TyFSFeature>& rResult) const;
- void getDirectSubTypes(TyFSType tyType, vector<TyFSType> & rResult) const;
+ void getDirectSubTypes(TyFSType tyType, std::vector<TyFSType> & rResult) const;
/**
* get the range of the feature, i.e., the value type <code>tyFeature</code>
@@ -496,7 +497,7 @@
* get all subsumed types of <code>tyType</code>.
* @param rResult output parameter
*/
- void getSubsumedTypes(TyFSType tyType, vector<TyFSType>& rResult) const;
+ void getSubsumedTypes(TyFSType tyType, std::vector<TyFSType>& rResult) const;
/**
* get the parent type of <code>tyType</code>.
diff --git a/src/cas/uima/typenamespace.hpp b/src/cas/uima/typenamespace.hpp
index b9095d6..87ead4b 100644
--- a/src/cas/uima/typenamespace.hpp
+++ b/src/cas/uima/typenamespace.hpp
@@ -94,7 +94,7 @@
icu::UnicodeString const & getName() const;
/// Return a container with type objects for all types in this namespace
- void getAllTypes(vector<Type> & rResult) const;
+ void getAllTypes(std::vector<Type> & rResult) const;
/// Return the typesystem this namespace lives in
TypeSystem const & getTypeSystem() const;
@@ -111,7 +111,7 @@
*/
class UIMA_LINK_IMPORTSPEC TypeNameSpaceImport {
private:
- vector<TypeNameSpace> iv_vecImports;
+ std::vector<TypeNameSpace> iv_vecImports;
uima::TypeSystem const * iv_cpTypeSystem;
public:
/**
@@ -138,7 +138,7 @@
* Return a container with type objects for all types of all namespace
* that have been added to this TypeNameSpaceImport object
*/
- void getAllTypes(vector<Type> & rResult) const;
+ void getAllTypes(std::vector<Type> & rResult) const;
/// Return the typesystem this TypeNameSpaceImport object lives in
TypeSystem const & getTypeSystem() const;
diff --git a/src/cas/uima/xcasdeserializer_handler.hpp b/src/cas/uima/xcasdeserializer_handler.hpp
index 041a672..1037162 100644
--- a/src/cas/uima/xcasdeserializer_handler.hpp
+++ b/src/cas/uima/xcasdeserializer_handler.hpp
@@ -78,9 +78,9 @@
class UIMA_LINK_IMPORTSPEC FSInfo {
public:
int addr;
- vector<int>* indexRep;
+ std::vector<int>* indexRep;
- FSInfo(int addr, vector<int>* indexRep) {
+ FSInfo(int addr, std::vector<int>* indexRep) {
this->addr = addr;
this->indexRep = indexRep;
}
@@ -159,18 +159,18 @@
int sofaTypeCode;
// Store IndexRepositories in a vector;
- vector<uima::lowlevel::IndexRepository *> indexRepositories;
+ std::vector<uima::lowlevel::IndexRepository *> indexRepositories;
// Store CAS Views in a vector
- vector<CAS*> tcasInstances;
+ std::vector<CAS*> tcasInstances;
//store FS information for end of document processing
- map<int, FSInfo*> fsTree;
- vector<FSInfo*> idLess;
+ std::map<int, FSInfo*> fsTree;
+ std::vector<FSInfo*> idLess;
//maps for deserializing v1.x format XCAS documents
- vector<int> sofaRefMap;
- vector<int> indexMap;
+ std::vector<int> sofaRefMap;
+ std::vector<int> indexMap;
int nextIndex;
diff --git a/src/cas/uima/xmideserializer_handler.hpp b/src/cas/uima/xmideserializer_handler.hpp
index 9a4bb6d..c6de6d4 100644
--- a/src/cas/uima/xmideserializer_handler.hpp
+++ b/src/cas/uima/xmideserializer_handler.hpp
@@ -148,10 +148,10 @@
int sofaTypeCode;
// Store IndexRepositories in a vector;
- vector<uima::lowlevel::IndexRepository *> indexRepositories;
+ std::vector<uima::lowlevel::IndexRepository *> indexRepositories;
// Store CAS Views in a vector
- vector<CAS*> tcasInstances;
+ std::vector<CAS*> tcasInstances;
int nextIndex;
@@ -159,29 +159,29 @@
int createByteArray(UnicodeString& currentArrayElements, int currentArrayId);
void remapFSListHeads(int addr);
- void tokenize(UnicodeString&, vector<string>&);
- int createIntList( vector<string>& featVal);
- int createFloatList( vector<string>& featVal);
- int createStringList( vector<string>& featVal);
- int createFSList( vector<string>& featVal);
+ void tokenize(UnicodeString&, std::vector<std::string>&);
+ int createIntList( std::vector<std::string>& featVal);
+ int createFloatList( std::vector<std::string>& featVal);
+ int createStringList( std::vector<std::string>& featVal);
+ int createFSList( std::vector<std::string>& featVal);
void addArrayElement(lowlevel::TyFS addr,lowlevel::TyFSType arrayType,
- int arrayPos, string & buffer);
+ int arrayPos, std::string & buffer);
void handleFeature(lowlevel::TyFS addr, UnicodeString & featName,
- vector<string> & featVal);
+ std::vector<std::string> & featVal);
void handleFeature(lowlevel::TyFS addr, lowlevel::TyFSFeature featCode,
- lowlevel::TyFSType rangeTypeCode,vector<string> & featVal);
+ lowlevel::TyFSType rangeTypeCode,std::vector<std::string> & featVal);
int createArray( lowlevel::TyFSType typeCode,
- vector<string>& featVal, int xmiID);
+ std::vector<std::string>& featVal, int xmiID);
void processView(int sofaXmiId, UnicodeString & membersString) ;
int getFsAddrForXmiId(int xmiId);
void addToOutOfTypeSystemData(XmlElementName * xmlElementName, const Attributes & attrs);
void addOutOfTypeSystemFeature(OotsElementData * ootsElem,
- UnicodeString & featName, vector<UnicodeString> & featVals);
+ UnicodeString & featName, std::vector<UnicodeString> & featVals);
// container for data shared between the XmiCasSerialier and
// XmiDeserializer, to support things such as consistency of IDs across
@@ -195,15 +195,15 @@
// Store address of every FS we've deserialized, since we need to back
// and apply fix-ups afterwards.
- vector<int> deserializedFsAddrs;
+ std::vector<int> deserializedFsAddrs;
// map from namespace prefixes to URIs.
- map<UnicodeString, UnicodeString> nsPrefixToUriMap;
+ std::map<UnicodeString, UnicodeString> nsPrefixToUriMap;
// map from xmi namespace to uima namespace
- map<UnicodeString, UnicodeString> xmiNamespaceToUimaNamespaceMap;
+ std::map<UnicodeString, UnicodeString> xmiNamespaceToUimaNamespaceMap;
//typename - values
- map<UnicodeString, vector<UnicodeString>* > multiValuedFeatures;
+ std::map<UnicodeString, std::vector<UnicodeString>* > multiValuedFeatures;
int ignoreDepth;
// The type of the most recently created FS. Needed for arrays, also
@@ -223,7 +223,7 @@
// from multivalued properties.
// These are special because their "head" feature needs remapping but their "tail" feature
// doesn't.
- vector<int> fsListNodesFromMultivaluedProperties;
+ std::vector<int> fsListNodesFromMultivaluedProperties;
bool lenient;
static char const * XMI_ID_ATTR_NAME;
diff --git a/src/cas/uima/xmishareddata.hpp b/src/cas/uima/xmishareddata.hpp
index b63a750..50782d7 100644
--- a/src/cas/uima/xmishareddata.hpp
+++ b/src/cas/uima/xmishareddata.hpp
@@ -47,7 +47,6 @@
#include "uima/msg.h"
#include "uima/exceptions.hpp"
-using namespace std;
/* ----------------------------------------------------------------------- */
/* Constants */
/* ----------------------------------------------------------------------- */
@@ -64,10 +63,10 @@
class XmlElementName {
public:
- string nsUri;
- string shortName;
- string qualifiedName;
- XmlElementName(string ns, string sname, string qname) :
+ std::string nsUri;
+ std::string shortName;
+ std::string qualifiedName;
+ XmlElementName(std::string ns, std::string sname, std::string qname) :
nsUri(ns), shortName(sname), qualifiedName(qname) {}
};
@@ -76,14 +75,14 @@
*/
class XmlAttribute {
public:
- string name;
- string value;
+ std::string name;
+ std::string value;
XmlAttribute(UnicodeString name, UnicodeString value) {
this->name = ((UnicodeStringRef)name).asUTF8();
this->value = ((UnicodeStringRef)value).asUTF8();
}
- XmlAttribute(string name, string value) {
+ XmlAttribute(std::string name, std::string value) {
this->name = name;
this->value = value;
}
@@ -108,14 +107,14 @@
/**
* List of XmlAttribute objects each holding name and value of an attribute.
*/
- vector<XmlAttribute*> attributes;
+ std::vector<XmlAttribute*> attributes;
/**
* Map qualified name of an attribute to a list of strings that contain
* the values of the element. Use to store the
* child elements representing features of this out-of-typesystem element.
*/
- map<string, vector<string>* > childElements;
+ std::map<std::string, std::vector<std::string>* > childElements;
OotsElementData() : elementName(0) {}
@@ -129,7 +128,7 @@
delete attributes.at(i);
}
}
- map<string, vector<string>* >::iterator ite;
+ std::map<std::string, std::vector<std::string>* >::iterator ite;
for (ite=childElements.begin(); ite != childElements.end();ite++) {
if (ite->second != NULL) {
delete ite->second;
@@ -165,39 +164,39 @@
* A map from FeatureStructure address to XMI ID. This is built during deserialization, then used
* by the next serialization to ensure consistent IDs.
*/
- map<int, int> fsAddrToXmiIdMap;
+ std::map<int, int> fsAddrToXmiIdMap;
/**
* A map from xmi:id to FeatureStructure address. This is populated whenever
* an XMI element is serialized or deserialized. It is used by the
* getFsAddrForXmiId() method, necessary to support merging multiple XMI
* CASes into the same CAS object.
**/
- map<int,int> xmiIdToFsAddrMap;
+ std::map<int,int> xmiIdToFsAddrMap;
/**
* List of OotsElementData objects, each of which captures information about
* incoming XMI elements that did not correspond to any type in the type system.
*/
- vector<OotsElementData*> ootsFs;
+ std::vector<OotsElementData*> ootsFs;
/**
* Map that from the xmi:id Sofa to a List of xmi:id's for
* the out-of-typesystem FSs that are members of that Sofa's view.
*/
- map<int,vector<int>*> ootsViewMembers;
+ std::map<int,std::vector<int>*> ootsViewMembers;
/** Map from Feature Structure address (Integer) to OotsElementData object, capturing information
* about out-of-typesystem features that were part of an in-typesystem FS. These include both
* features not defined in the typesystem and features that are references to out-of-typesystem
* elements. This information needs to be included when the FS is subsequently serialized.
*/
- map<int, OotsElementData*> ootsFeatures;
+ std::map<int, OotsElementData*> ootsFeatures;
/** Map from Feature Structure address (Integer) of an FSArray to a list of
* {@link XmiArrayElement} objects, each of which holds an index and an xmi:id
* for an out-of-typesystem array element.
*/
- map<int,vector<XmiArrayElement*>*> ootsArrayElements;
+ std::map<int,std::vector<XmiArrayElement*>*> ootsArrayElements;
/**
@@ -215,10 +214,10 @@
}
}
- map<int,vector<XmiArrayElement*>*>::iterator ite;
+ std::map<int,std::vector<XmiArrayElement*>*>::iterator ite;
for (ite = ootsArrayElements.begin(); ite != ootsArrayElements.end();ite++) {
if (ite->second != NULL) {
- vector<XmiArrayElement*>* vec = ite->second;
+ std::vector<XmiArrayElement*>* vec = ite->second;
for (size_t i=0; i < vec->size(); i++) {
if (vec->at(i) != NULL) {
delete vec->at(i);
@@ -228,14 +227,14 @@
}
}
- map<int,vector<int>*>::iterator viewite;
+ std::map<int,std::vector<int>*>::iterator viewite;
for (viewite = ootsViewMembers.begin();
viewite != ootsViewMembers.end();viewite++) {
if (viewite->second != NULL) {
delete viewite->second;
}
}
- map<int, OotsElementData*>::iterator featite;
+ std::map<int, OotsElementData*>::iterator featite;
for (featite = ootsFeatures.begin();
featite != ootsFeatures.end();featite++) {
if (featite->second != NULL) {
@@ -253,7 +252,7 @@
int getXmiId(int fsAddr) {
// see if we already have a mapping
- map<int,int>::iterator ite = fsAddrToXmiIdMap.find(fsAddr);
+ std::map<int,int>::iterator ite = fsAddrToXmiIdMap.find(fsAddr);
if (ite != fsAddrToXmiIdMap.end()) {
return ite->second;
} else { // no mapping for this FS. Generate a unique ID
@@ -273,7 +272,7 @@
* xmi:id, -1 if none.
*/
int getFsAddrForXmiId(int xmiId) {
- map<int,int>::iterator ite = xmiIdToFsAddrMap.find(xmiId);
+ std::map<int,int>::iterator ite = xmiIdToFsAddrMap.find(xmiId);
if (ite != xmiIdToFsAddrMap.end() )
return ite->second;
else {
@@ -310,7 +309,7 @@
* incoming XMI element that did not correspond to a Type in the TypeSystem.
* @return List of {@link OotsElementData} objects
*/
- vector<OotsElementData *> & getOutOfTypeSystemElements() {
+ std::vector<OotsElementData *> & getOutOfTypeSystemElements() {
return this->ootsFs;
}
@@ -322,10 +321,10 @@
* a member of the view for the given Sofa
*/
void addOutOfTypeSystemViewMember(int sofaXmiId, int memberXmiId) {
- vector<int> * memberList = 0;
- map<int,vector<int>* >::iterator ite = this->ootsViewMembers.find(sofaXmiId);
+ std::vector<int> * memberList = 0;
+ std::map<int,std::vector<int>* >::iterator ite = this->ootsViewMembers.find(sofaXmiId);
if (ite == ootsViewMembers.end() ) {
- memberList = new vector<int>;
+ memberList = new std::vector<int>;
ootsViewMembers[sofaXmiId] = memberList;
} else {
memberList = ite->second;
@@ -339,9 +338,9 @@
* @param sofaXmiId xmi:id of a Sofa
* @return List of xmi:id's of members of the view for the given Sofa.
*/
- void getOutOfTypeSystemViewMembers(int sofaXmiId, vector<int>& tofill) {
- map<int, vector<int> *>::iterator ite = this->ootsViewMembers.find(sofaXmiId);
- vector<int> * memberList = NULL;
+ void getOutOfTypeSystemViewMembers(int sofaXmiId, std::vector<int>& tofill) {
+ std::map<int, std::vector<int> *>::iterator ite = this->ootsViewMembers.find(sofaXmiId);
+ std::vector<int> * memberList = NULL;
if (ite != ootsViewMembers.end()) {
memberList = ite->second;
for (size_t i=0;i < memberList->size();i++) {
@@ -358,8 +357,8 @@
* @param featName name of the feature
* @param featVal value of the feature, as a string
*/
- void addOutOfTypeSystemAttribute(int addr, string featName, string featVal) {
- map<int, OotsElementData*>::iterator ite = this->ootsFeatures.find(addr);
+ void addOutOfTypeSystemAttribute(int addr, std::string featName, std::string featVal) {
+ std::map<int, OotsElementData*>::iterator ite = this->ootsFeatures.find(addr);
OotsElementData * oed = NULL;
if (ite != ootsFeatures.end() )
oed = ite->second;
@@ -384,8 +383,8 @@
* @param featName name of the feature (element tag name)
* @param featVal values of the feature, as a List of strings
*/
- void addOutOfTypeSystemChildElements(int addr, string featName, vector<string> featVals) {
- map<int, OotsElementData*>::iterator ite = this->ootsFeatures.find(addr);
+ void addOutOfTypeSystemChildElements(int addr, std::string featName, std::vector<std::string> featVals) {
+ std::map<int, OotsElementData*>::iterator ite = this->ootsFeatures.find(addr);
OotsElementData * oed = NULL;
if (ite != ootsFeatures.end() )
oed = ite->second;
@@ -394,10 +393,10 @@
this->ootsFeatures[addr] = oed;
}
- map<string, vector<string>*>::iterator ite2 = oed->childElements.find(featName);
- vector<string> * pVals = NULL;
+ std::map<std::string, std::vector<std::string>*>::iterator ite2 = oed->childElements.find(featName);
+ std::vector<std::string> * pVals = NULL;
if (ite2 == oed->childElements.end() ) {
- pVals = new vector<string>;
+ pVals = new std::vector<std::string>;
oed->childElements[featName] = pVals;
} else {
pVals = ite2->second;
@@ -417,7 +416,7 @@
* (both attributes and child elements)
*/
OotsElementData * getOutOfTypeSystemFeatures(int addr) {
- map<int, OotsElementData*>::iterator ite = this->ootsFeatures.find(addr);
+ std::map<int, OotsElementData*>::iterator ite = this->ootsFeatures.find(addr);
if (ite != this->ootsFeatures.end())
return ite->second;
else return NULL;
@@ -427,8 +426,8 @@
* Get all FS Addresses that have been added to the id map.
* @return an array containing all the FS addresses
*/
- void getAllFsAddressesInIdMap( vector<int> & tofill) {
- map<int,int>::iterator ite;
+ void getAllFsAddressesInIdMap( std::vector<int> & tofill) {
+ std::map<int,int>::iterator ite;
for (ite = this->fsAddrToXmiIdMap.begin(); ite != fsAddrToXmiIdMap.end();ite++) {
tofill.push_back(ite->first);
}
@@ -441,8 +440,8 @@
* holds the index and xmi:id of an array element that is a
* reference to an out-of-typesystem FS.
*/
- vector<XmiArrayElement*> * getOutOfTypeSystemArrayElements(int addr) {
- map<int, vector<XmiArrayElement*>*>::iterator ite=this->ootsArrayElements.find(addr);
+ std::vector<XmiArrayElement*> * getOutOfTypeSystemArrayElements(int addr) {
+ std::map<int, std::vector<XmiArrayElement*>*>::iterator ite=this->ootsArrayElements.find(addr);
if (ite != ootsArrayElements.end())
return ite->second;
else return NULL;
@@ -456,12 +455,12 @@
* @param xmiId xmi:id of the out-of-typesystem element that is the value at the given index
*/
void addOutOfTypeSystemArrayElement(int addr, int index, int xmiId) {
- map<int, vector<XmiArrayElement*>* >::iterator ite = this->ootsArrayElements.find(addr);
- vector<XmiArrayElement*> * oed = NULL;
+ std::map<int, std::vector<XmiArrayElement*>* >::iterator ite = this->ootsArrayElements.find(addr);
+ std::vector<XmiArrayElement*> * oed = NULL;
if (ite != ootsArrayElements.end() )
oed = ite->second;
else {
- oed = new vector<XmiArrayElement*>;
+ oed = new std::vector<XmiArrayElement*>;
this->ootsArrayElements[addr] = oed;
}
oed->push_back(new XmiArrayElement(index, xmiId));
@@ -475,13 +474,13 @@
}
void print() {
- map<int,OotsElementData *>::iterator ite;
+ std::map<int,OotsElementData *>::iterator ite;
for (size_t i=0; i < ootsFs.size() ;i++ ) {
OotsElementData * oed = ootsFs.at(i);
- cout << "**OotsFS " << i << oed->elementName->qualifiedName << endl;
- cout << "NUM CHILDELEMENTS " << oed->childElements.size() << endl;
+ std::cout << "**OotsFS " << i << oed->elementName->qualifiedName << std::endl;
+ std::cout << "NUM CHILDELEMENTS " << oed->childElements.size() << std::endl;
for (size_t i=0; i < oed->attributes.size();i++) {
- cout << oed->attributes.at(i)->name << " " << oed->attributes.at(i)->value << endl;
+ std::cout << oed->attributes.at(i)->name << " " << oed->attributes.at(i)->value << std::endl;
}
}
}
diff --git a/src/cas/uima/xmiwriter.hpp b/src/cas/uima/xmiwriter.hpp
index 6e6ffbe..8e3966e 100644
--- a/src/cas/uima/xmiwriter.hpp
+++ b/src/cas/uima/xmiwriter.hpp
@@ -104,33 +104,33 @@
Type iv_sofaType;
bool isBCCas;
- map<int, vector<int>*> enqueuedFS;
+ std::map<int, std::vector<int>*> enqueuedFS;
int sofa;
- void writeFeatureValue(ostream & os, FeatureStructure const & fs, Feature const & f);
- void writeFSFlat(ostream & os, FeatureStructure const & fs, vector<int>* indexInfo);
+ void writeFeatureValue(std::ostream & os, FeatureStructure const & fs, Feature const & f);
+ void writeFSFlat(std::ostream & os, FeatureStructure const & fs, std::vector<int>* indexInfo);
void findReferencedFSs(FeatureStructure const & fs, bool check=true);
bool isReferenceType(Type const & t) const;
bool enqueueIndexed(FeatureStructure const &fs, int sofa);
bool enqueueUnindexed(FeatureStructure const &fs);
bool enqueueUnindexed(int id);
void initTypeAndNamespaceMappings();
- void writeViews(ostream & os, CAS const & crCAS);
- void writeView(ostream & os,int sofaXmiId, vector<lowlevel::TyFS>& members);
+ void writeViews(std::ostream & os, CAS const & crCAS);
+ void writeView(std::ostream & os,int sofaXmiId, std::vector<lowlevel::TyFS>& members);
XmlElementName * uimaTypeName2XmiElementName(UnicodeStringRef & uimaTypeName);
int getXmiId(int addr);
- void writeArray(ostream & os, FeatureStructure const & array, char const * tag, int xmiid);
- void writeBooleanArray(ostream & os, BooleanArrayFS const & array, char const * tag, int xmiid);
- void writeStringArray(ostream & os, StringArrayFS const & array, char const * tag, int xmiid);
- string arrayToString(FeatureStructure const & fs, char const * tag);
- string listToString(FeatureStructure const & fs, char const * tag);
+ void writeArray(std::ostream & os, FeatureStructure const & array, char const * tag, int xmiid);
+ void writeBooleanArray(std::ostream & os, BooleanArrayFS const & array, char const * tag, int xmiid);
+ void writeStringArray(std::ostream & os, StringArrayFS const & array, char const * tag, int xmiid);
+ std::string arrayToString(FeatureStructure const & fs, char const * tag);
+ std::string listToString(FeatureStructure const & fs, char const * tag);
void enqueueIncoming();
- void serializeOutOfTypeSystemElements(ostream & os);
+ void serializeOutOfTypeSystemElements(std::ostream & os);
void enqueueFSListElements(FeatureStructure const & fs);
- vector<XmlElementName*> xmiTypeNames; // array, indexed by type code,
+ std::vector<XmlElementName*> xmiTypeNames; // array, indexed by type code,
// giving XMI names for each type
- map<string, string> nsUriToPrefixMap;
- set<string> nsPrefixesUsed;
+ std::map<std::string, std::string> nsUriToPrefixMap;
+ std::set<std::string> nsPrefixesUsed;
XmiSerializationSharedData * sharedData;
static char const * XMI_NS_URI;
@@ -150,7 +150,7 @@
XmiWriter(CAS const & crCAS, bool bAddDocBuffer, XmiSerializationSharedData * );
~XmiWriter();
- virtual void write(ostream& os);
+ virtual void write(std::ostream& os);
};
}
diff --git a/src/cas/uima/xmlwriter.hpp b/src/cas/uima/xmlwriter.hpp
index e04e42c..761ba6c 100644
--- a/src/cas/uima/xmlwriter.hpp
+++ b/src/cas/uima/xmlwriter.hpp
@@ -113,13 +113,13 @@
lowlevel::TyFSFeature iv_tyEndPosFeature;
icu::UnicodeString getTab(int tab) const;
- void writeFS(int tab, ostream& os, lowlevel::TyFS, bool bWriteShortStyle) const;
- void writeArray(int iTab, ostream& os, lowlevel::TyFSFeature & tyFeat, lowlevel::TyFS & tyValue, lowlevel::TyFSType tyRange, icu::UnicodeString & newTab) const;
+ void writeFS(int tab, std::ostream& os, lowlevel::TyFS, bool bWriteShortStyle) const;
+ void writeArray(int iTab, std::ostream& os, lowlevel::TyFSFeature & tyFeat, lowlevel::TyFS & tyValue, lowlevel::TyFSType tyRange, icu::UnicodeString & newTab) const;
public:
XMLDumpWriter(CAS const & crCAS, bool bAddDocBuffer);
~XMLDumpWriter();
- virtual void write(ostream& os);
+ virtual void write(std::ostream& os);
};
@@ -146,20 +146,20 @@
Type iv_sofaType;
bool isBCCas;
- map<int, vector<int>*> enqueuedFS;
+ std::map<int, std::vector<int>*> enqueuedFS;
- void writeFeatureValue(ostream & os, FeatureStructure const & fs, Feature const & f);
- void writeFSFlat(ostream & os, FeatureStructure const & fs, vector<int>* indexInfo);
+ void writeFeatureValue(std::ostream & os, FeatureStructure const & fs, Feature const & f);
+ void writeFSFlat(std::ostream & os, FeatureStructure const & fs, std::vector<int>* indexInfo);
void findReferencedFSs(FeatureStructure const & fs, bool check=true);
bool isReferenceType(Type const & t) const;
bool enqueueIndexed(FeatureStructure const &fs, int sofa);
bool enqueueUnindexed(FeatureStructure const &fs);
- void writeStringArray(ostream & os, StringArrayFS const & array, char const * tag);
+ void writeStringArray(std::ostream & os, StringArrayFS const & array, char const * tag);
public:
XCASWriter(CAS const & crCAS, bool bAddDocBuffer);
~XCASWriter();
- virtual void write(ostream& os);
+ virtual void write(std::ostream& os);
};
}
diff --git a/src/cas/xcasdeserializer.cpp b/src/cas/xcasdeserializer.cpp
index dffab6a..13679b0 100644
--- a/src/cas/xcasdeserializer.cpp
+++ b/src/cas/xcasdeserializer.cpp
@@ -67,7 +67,7 @@
/* ----------------------------------------------------------------------- */
/* Types / Classes */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
XCASDeserializer::XCASDeserializer() {}
diff --git a/src/cas/xmideserializer.cpp b/src/cas/xmideserializer.cpp
index e55f5eb..82e16c2 100644
--- a/src/cas/xmideserializer.cpp
+++ b/src/cas/xmideserializer.cpp
@@ -67,7 +67,7 @@
/* ----------------------------------------------------------------------- */
/* Types / Classes */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
XmiDeserializer::XmiDeserializer() {}
diff --git a/src/cas/xmideserializer_handler.cpp b/src/cas/xmideserializer_handler.cpp
index 1f02eac..6de49a0 100644
--- a/src/cas/xmideserializer_handler.cpp
+++ b/src/cas/xmideserializer_handler.cpp
@@ -839,10 +839,9 @@
break;
}
case internal::gs_tyStringType: {
-
- // if (featVal.length() > 0) {
+ // if (featVal.length() > 0) {
fs.setStringValue(feat, featVal);
- // }
+ //}
break;
}
case internal::gs_tyByteType: {
diff --git a/src/cas/xmiwriter.cpp b/src/cas/xmiwriter.cpp
index 1b556b0..6f8cb7b 100644
--- a/src/cas/xmiwriter.cpp
+++ b/src/cas/xmiwriter.cpp
@@ -60,7 +60,7 @@
/* Types / Classes */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
////////////////////////////////////////////////////////////////////////
@@ -350,6 +350,7 @@
f.getRangeType(t);
assert( t.isValid() );
if ( t == iv_stringType || t.isStringSubType() ) {
+ if (!fs.isUntouchedFSValue(f) ) {
UnicodeStringRef ref = fs.getStringValue(f);
if (ref.getBuffer() != NULL) {
icu::UnicodeString us;
@@ -357,6 +358,7 @@
os << " " << f.getName() << "=\"";
os << us << "\"";
}
+ }
} else if (t == iv_integerType) {
os << " " << f.getName() << "=\"";
os << fs.getIntValue(f) << "\"";
diff --git a/src/cas/xmlwriter.cpp b/src/cas/xmlwriter.cpp
index 432aeea..2b47c46 100644
--- a/src/cas/xmlwriter.cpp
+++ b/src/cas/xmlwriter.cpp
@@ -65,7 +65,7 @@
/* ----------------------------------------------------------------------- */
/* Types / Classes */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
XMLWriterABase::XMLWriterABase(CAS const & crCAS, bool bAddDocBuffer)
: CASWriterABase(crCAS, bAddDocBuffer) {}
diff --git a/src/framework/annotator.cpp b/src/framework/annotator.cpp
index 7da8b8c..e4ba553 100644
--- a/src/framework/annotator.cpp
+++ b/src/framework/annotator.cpp
@@ -65,6 +65,8 @@
#define UIMA_ANNOTATOR_DEFAULT_UNSPECIFIED_TERRITORY true
#define UIMA_CONFIG_ANNOTATOR_PROCESS_UNSPECIFIED_TERRITORIES _TEXT("ProcessUnspecifiedTerritories")
+
+using namespace std;
/***
#ifndef NDEBUG
#define UIMA_ANNOTATOR_INDICATE_PROCESS_FILE_EXTENSION _TEXT(".ind")
diff --git a/src/framework/annotator_context.cpp b/src/framework/annotator_context.cpp
index 7ba8d3e..8e3dcc6 100644
--- a/src/framework/annotator_context.cpp
+++ b/src/framework/annotator_context.cpp
@@ -34,6 +34,7 @@
#include "uima/taespecifierbuilder.hpp"
#include "uima/internal_casimpl.hpp"
+using namespace std;
namespace uima {
#define CTX_DEFAULT_TEXT_SOFA_NAME "_DefaultTextSofaName"
diff --git a/src/framework/annotator_mgr.cpp b/src/framework/annotator_mgr.cpp
index 2f207da..04c5229 100644
--- a/src/framework/annotator_mgr.cpp
+++ b/src/framework/annotator_mgr.cpp
@@ -77,7 +77,7 @@
/* ----------------------------------------------------------------------- */
/* Private Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace internal {
diff --git a/src/framework/casdefinition.cpp b/src/framework/casdefinition.cpp
index 925d16b..ad6ea2c 100644
--- a/src/framework/casdefinition.cpp
+++ b/src/framework/casdefinition.cpp
@@ -60,6 +60,7 @@
#include "uima/taespecifierbuilder.hpp"
#include "uima/xmlerror_handler.hpp"
+using namespace std;
/* ----------------------------------------------------------------------- */
/* Constants */
/* ----------------------------------------------------------------------- */
diff --git a/src/framework/caspool.cpp b/src/framework/caspool.cpp
index e4f9931..78e966e 100644
--- a/src/framework/caspool.cpp
+++ b/src/framework/caspool.cpp
@@ -34,7 +34,7 @@
#include "uima/err_ids.h"
#include "uima/msg.h"
-
+using namespace std;
namespace uima {
diff --git a/src/framework/config_param.cpp b/src/framework/config_param.cpp
index 278096f..a524c84 100644
--- a/src/framework/config_param.cpp
+++ b/src/framework/config_param.cpp
@@ -39,7 +39,7 @@
#include "uima/msg.h"
#include <vector>
-
+using namespace std;
namespace uima {
UIMA_EXC_CLASSIMPLEMENT(ConfigException, Exception);
diff --git a/src/framework/consoleui.cpp b/src/framework/consoleui.cpp
index 8c645fa..eae2c23 100644
--- a/src/framework/consoleui.cpp
+++ b/src/framework/consoleui.cpp
@@ -46,7 +46,7 @@
/* ----------------------------------------------------------------------- */
/* Types / Classes */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace util {
diff --git a/src/framework/cp2ucnvrt.cpp b/src/framework/cp2ucnvrt.cpp
index 8d45389..ac90200 100644
--- a/src/framework/cp2ucnvrt.cpp
+++ b/src/framework/cp2ucnvrt.cpp
@@ -58,7 +58,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
CodePage2UnicodeConverter::CodePage2UnicodeConverter( const char * crConverterName) :
diff --git a/src/framework/engine.cpp b/src/framework/engine.cpp
index 435554f..8b142ff 100644
--- a/src/framework/engine.cpp
+++ b/src/framework/engine.cpp
@@ -70,7 +70,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
UIMA_EXC_CLASSIMPLEMENT(UnknownTypeException, Exception);
diff --git a/src/framework/internal_aggregate_engine.cpp b/src/framework/internal_aggregate_engine.cpp
index c898c26..c0ca218 100644
--- a/src/framework/internal_aggregate_engine.cpp
+++ b/src/framework/internal_aggregate_engine.cpp
@@ -55,7 +55,7 @@
/* ----------------------------------------------------------------------- */
/* Constants */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace internal {
diff --git a/src/framework/internal_engine_base.cpp b/src/framework/internal_engine_base.cpp
index e94db79..2c27cc7 100644
--- a/src/framework/internal_engine_base.cpp
+++ b/src/framework/internal_engine_base.cpp
@@ -193,7 +193,7 @@
clTrace.dump("Unexpected UIMACPP exception");
clTrace.dump(rclException.asString().c_str());
assertWithMsg(false, _TEXT("Unexpected UIMACPP exception in engine destructor")); //lint !e506: Constant value Boolean
- } catch (exception & rclException) {
+ } catch (std::exception & rclException) {
clTrace.dump("ANSI C++ exception");
clTrace.dump(rclException.what());
assertWithMsg(false, _TEXT("Unexpected ANSI C++ exception in engine destructor")); //lint !e506: Constant value Boolean
diff --git a/src/framework/internal_jedii_engine.cpp b/src/framework/internal_jedii_engine.cpp
index 9b52c51..3dada9b 100644
--- a/src/framework/internal_jedii_engine.cpp
+++ b/src/framework/internal_jedii_engine.cpp
@@ -67,7 +67,7 @@
consult some book or go to
http://java.sun.com/j2se/1.3/docs/guide/jni/spec/jniTOC.doc.html
*/
-
+using namespace std;
namespace uima {
namespace internal {
diff --git a/src/framework/internal_primitive_engine.cpp b/src/framework/internal_primitive_engine.cpp
index ddc7341..a68f783 100644
--- a/src/framework/internal_primitive_engine.cpp
+++ b/src/framework/internal_primitive_engine.cpp
@@ -61,7 +61,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
namespace internal {
diff --git a/src/framework/language.cpp b/src/framework/language.cpp
index 4aed52c..77bf025 100644
--- a/src/framework/language.cpp
+++ b/src/framework/language.cpp
@@ -38,7 +38,7 @@
/* ----------------------------------------------------------------------- */
/* Constants */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
char const * Language::INVALID = "??";
diff --git a/src/framework/log.cpp b/src/framework/log.cpp
index 140faa9..a408b78 100644
--- a/src/framework/log.cpp
+++ b/src/framework/log.cpp
@@ -51,7 +51,7 @@
const size_t UIMA_LOG_STATIC_CONVERSION_BUFSIZE = 1024;
static apr_pool_t * logPool=0;
static apr_thread_mutex_t * logMutex=0;
-
+using namespace std;
/* ----------------------------------------------------------------------- */
/* Forward declarations */
/* ----------------------------------------------------------------------- */
@@ -64,7 +64,7 @@
/* Private Implementation */
/* ----------------------------------------------------------------------- */
namespace uima {
- FileLogger::FileLogger(string filename) : iv_logfile(0) {
+ FileLogger::FileLogger(std::string filename) : iv_logfile(0) {
iv_logfile = fopen(filename.c_str(),"a");
if (iv_logfile == NULL) { //Need to handle this better
//cerr << "Could not open the log file " << cpszLogFile << endl;
diff --git a/src/framework/resmgr.cpp b/src/framework/resmgr.cpp
index ae9cb32..c1a566a 100644
--- a/src/framework/resmgr.cpp
+++ b/src/framework/resmgr.cpp
@@ -95,7 +95,7 @@
/* ----------------------------------------------------------------------- */
/* Types / Classes */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
/*
diff --git a/src/framework/taespecifier.cpp b/src/framework/taespecifier.cpp
index 9f8f321..0b118c9 100644
--- a/src/framework/taespecifier.cpp
+++ b/src/framework/taespecifier.cpp
@@ -43,7 +43,7 @@
#include "uima/config_param.hpp"
#include "uima/taespecifier.hpp"
#include "uima/caswriter_abase.hpp"
-
+using namespace std;
namespace uima {
UIMA_EXC_CLASSIMPLEMENT(ConfigParamLookupException, ConfigException);
diff --git a/src/framework/taespecifierbuilder.cpp b/src/framework/taespecifierbuilder.cpp
index 463e8ee..19fe940 100644
--- a/src/framework/taespecifierbuilder.cpp
+++ b/src/framework/taespecifierbuilder.cpp
@@ -66,7 +66,7 @@
#include "uima/msg.h"
#define MAXXMLCHBUFF 512
-
+using namespace std;
namespace uima {
UIMA_EXC_CLASSIMPLEMENT(InvalidXMLException, uima::Exception);
diff --git a/src/framework/timedatetools.cpp b/src/framework/timedatetools.cpp
index ae22c48..119cfd7 100644
--- a/src/framework/timedatetools.cpp
+++ b/src/framework/timedatetools.cpp
@@ -25,7 +25,7 @@
#include "uima/strtools.hpp"
#include "uima/strconvert.hpp"
#include "uima/text.h"
-
+using namespace std;
namespace uima {
diff --git a/src/framework/token_properties.cpp b/src/framework/token_properties.cpp
index 9d13c8a..d79f6e4 100644
--- a/src/framework/token_properties.cpp
+++ b/src/framework/token_properties.cpp
@@ -47,7 +47,7 @@
/* ----------------------------------------------------------------------- */
/* Types / Classes */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
TokenProperties::TokenProperties(
diff --git a/src/framework/typesystemdescription.cpp b/src/framework/typesystemdescription.cpp
index b88ce90..4ce8158 100644
--- a/src/framework/typesystemdescription.cpp
+++ b/src/framework/typesystemdescription.cpp
@@ -32,6 +32,7 @@
#include "uima/taespecifierbuilder.hpp"
#include <memory>
#include "uima/msg.h"
+using namespace std;
namespace uima {
TypeDescription::TypeDescription(const TypeDescription & crOther) {
diff --git a/src/framework/u2cpcnvrt.cpp b/src/framework/u2cpcnvrt.cpp
index 9419adc..1a5fe2a 100644
--- a/src/framework/u2cpcnvrt.cpp
+++ b/src/framework/u2cpcnvrt.cpp
@@ -61,7 +61,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
Unicode2CodePageConverter::Unicode2CodePageConverter(const char * crConverterName) :
diff --git a/src/framework/uima/annotator.hpp b/src/framework/uima/annotator.hpp
index 003b058..f34c68d 100644
--- a/src/framework/uima/annotator.hpp
+++ b/src/framework/uima/annotator.hpp
@@ -144,7 +144,7 @@
/** Return the complete filename of this annotator. */
const util::Filename & getFilename(void) const;
/** Return the name of the annotator. */
- const string & getSymbolicName(void) const {
+ const std::string & getSymbolicName(void) const {
return(iv_strSymbolicName);
}
/** Return the detailed error message if the load() fails. */
@@ -254,7 +254,7 @@
/* --- functions --- */
private:
util::Filename iv_clFilename;
- string iv_strSymbolicName;
+ std::string iv_strSymbolicName;
/** const uima::internal::AnnotatorFile **/
util::DllProcLoaderFile * iv_cpclFile;
bool iv_bProcessUnspecifiedTerritories;
diff --git a/src/framework/uima/annotator_context.hpp b/src/framework/uima/annotator_context.hpp
index cd24699..b202f3d 100644
--- a/src/framework/uima/annotator_context.hpp
+++ b/src/framework/uima/annotator_context.hpp
@@ -95,9 +95,8 @@
*/
class UIMA_LINK_IMPORTSPEC AnnotatorContext {
public:
- typedef map < icu::UnicodeString, AnnotatorContext * > TyMapDelegateAnCs;
- //BSI
- typedef map < icu::UnicodeString, SofaID * > TyMapSofaMappings;
+ typedef std::map < icu::UnicodeString, AnnotatorContext * > TyMapDelegateAnCs;
+ typedef std::map < icu::UnicodeString, SofaID * > TyMapSofaMappings;
@@ -129,13 +128,13 @@
/** returns string parameter values as UTF-8 string
* Caller assumes ownership of objects in the vector
*/
- TyErrorId extractValue(const icu::UnicodeString & paramName, vector<std::string*> & returnValues) const;
+ TyErrorId extractValue(const icu::UnicodeString & paramName, std::vector<std::string*> & returnValues) const;
TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, std::string & value) const;
/** returns string parameter values as UTF-8 string
* Caller assumes ownership of objects in the vector
*/
- TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, vector<std::string*> & returnValues) const;
+ TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, std::vector<std::string*> & returnValues) const;
/** @} */
@@ -214,24 +213,24 @@
**/
/*@{*/
TyErrorId extractValue(const icu::UnicodeString & paramName, bool & value) const;
- TyErrorId extractValue(const icu::UnicodeString & paramName, vector<bool> & returnValues) const;
+ TyErrorId extractValue(const icu::UnicodeString & paramName, std::vector<bool> & returnValues) const;
TyErrorId extractValue(const icu::UnicodeString & paramName, int & value) const;
TyErrorId extractValue(const icu::UnicodeString & paramName, size_t & value) const;
- TyErrorId extractValue(const icu::UnicodeString & paramName, vector<int> & returnValues) const;
+ TyErrorId extractValue(const icu::UnicodeString & paramName, std::vector<int> & returnValues) const;
TyErrorId extractValue(const icu::UnicodeString & paramName, float & value) const;
- TyErrorId extractValue(const icu::UnicodeString & paramName, vector<float> & returnValues) const;
+ TyErrorId extractValue(const icu::UnicodeString & paramName, std::vector<float> & returnValues) const;
TyErrorId extractValue(const icu::UnicodeString & paramName, icu::UnicodeString & value) const;
- TyErrorId extractValue(const icu::UnicodeString & paramName, vector<icu::UnicodeString> & returnValues) const;
+ TyErrorId extractValue(const icu::UnicodeString & paramName, std::vector<icu::UnicodeString> & returnValues) const;
TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, bool & value) const;
- TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, vector<bool> & returnValues) const;
+ TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, std::vector<bool> & returnValues) const;
TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, int & value) const;
TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, size_t & value) const;
- TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, vector<int> & returnValues) const;
+ TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, std::vector<int> & returnValues) const;
TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, float & value) const;
- TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, vector<float> & returnValues) const;
+ TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, std::vector<float> & returnValues) const;
TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, icu::UnicodeString & value) const;
- TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, vector<icu::UnicodeString> & returnValues) const;
+ TyErrorId extractValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, std::vector<icu::UnicodeString> & returnValues) const;
/** @} */
/** Release contents of string container filled by extractValue.
@@ -243,7 +242,7 @@
* Useful when caller and callee use different heaps,
* e.g. when debug code uses a release library.
*/
- void release(vector<std::string*> & returnValues) const;
+ void release(std::vector<std::string*> & returnValues) const;
/**
* Returns true iff the parameter paramName is defined for this
@@ -321,7 +320,7 @@
* In this case, no group names of any parents will be included in the result,
* as <code>extractValue</code> on this AnC with these group names would fail.
**/
- const set <icu::UnicodeString> getGroupNamesForParameter(const icu::UnicodeString & paramName) const;
+ const std::set <icu::UnicodeString> getGroupNamesForParameter(const icu::UnicodeString & paramName) const;
@@ -339,41 +338,41 @@
/*@{*/
TyErrorId assignValue(const icu::UnicodeString & paramName, const bool & value);
- TyErrorId assignValue(const icu::UnicodeString & paramName, const vector< bool > & value);
+ TyErrorId assignValue(const icu::UnicodeString & paramName, const std::vector< bool > & value);
TyErrorId assignValue(const icu::UnicodeString & paramName, const size_t & value);
- TyErrorId assignValue(const icu::UnicodeString & paramName, const vector< size_t > & value);
+ TyErrorId assignValue(const icu::UnicodeString & paramName, const std::vector< size_t > & value);
TyErrorId assignValue(const icu::UnicodeString & paramName, const int & value);
- TyErrorId assignValue(const icu::UnicodeString & paramName, const vector< int > & value);
+ TyErrorId assignValue(const icu::UnicodeString & paramName, const std::vector< int > & value);
TyErrorId assignValue(const icu::UnicodeString & paramName, const float & value);
- TyErrorId assignValue(const icu::UnicodeString & paramName, const vector< float > & value);
+ TyErrorId assignValue(const icu::UnicodeString & paramName, const std::vector< float > & value);
TyErrorId assignValue(const icu::UnicodeString & paramName, const double & value);
- TyErrorId assignValue(const icu::UnicodeString & paramName, const vector< double > & value);
+ TyErrorId assignValue(const icu::UnicodeString & paramName, const std::vector< double > & value);
TyErrorId assignValue(const icu::UnicodeString & paramName, const icu::UnicodeString & value);
- TyErrorId assignValue(const icu::UnicodeString & paramName, const vector< icu::UnicodeString > & value);
+ TyErrorId assignValue(const icu::UnicodeString & paramName, const std::vector< icu::UnicodeString > & value);
TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const bool & value);
- TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const vector< bool > & value);
+ TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const std::vector< bool > & value);
TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const int & value);
- TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const vector< int > & value);
+ TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const std::vector< int > & value);
TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const size_t & value);
- TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const vector< size_t > & value);
+ TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const std::vector< size_t > & value);
TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const float & value);
- TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const vector< float > & value);
+ TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const std::vector< float > & value);
TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const double & value);
- TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const vector< double > & value);
+ TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const std::vector< double > & value);
TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const icu::UnicodeString & value);
- TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const vector< icu::UnicodeString > & value);
+ TyErrorId assignValue(const icu::UnicodeString & groupName, const icu::UnicodeString & paramName, const std::vector< icu::UnicodeString > & value);
/** @} */
@@ -488,7 +487,7 @@
inline
TyErrorId AnnotatorContext::extractValue(const icu::UnicodeString & paramName,
- vector<bool> & returnValues) const {
+ std::vector<bool> & returnValues) const {
NameValuePair const * pResult = findNameValuePair(paramName);
if (pResult != NULL) {// a value has been found
returnValues = pResult->extractBoolValues();
@@ -521,7 +520,7 @@
inline
TyErrorId AnnotatorContext::extractValue(const icu::UnicodeString & paramName,
- vector<int> & returnValues) const {
+ std::vector<int> & returnValues) const {
NameValuePair const * pResult = findNameValuePair(paramName);
if (pResult != NULL) {// a value has been found
returnValues = pResult->extractIntValues();
@@ -543,7 +542,7 @@
inline
TyErrorId AnnotatorContext::extractValue(const icu::UnicodeString & paramName,
- vector<float> & returnValues) const {
+ std::vector<float> & returnValues) const {
NameValuePair const * pResult = findNameValuePair(paramName);
if (pResult != NULL) {// a value has been found
returnValues = pResult->extractFloatValues();
@@ -565,7 +564,7 @@
inline
TyErrorId AnnotatorContext::extractValue(const icu::UnicodeString & paramName,
- vector<icu::UnicodeString> & returnValues) const {
+ std::vector<icu::UnicodeString> & returnValues) const {
NameValuePair const * pResult = findNameValuePair(paramName);
if (pResult != NULL) {// a value has been found
returnValues = pResult->extractStringValues();
@@ -590,7 +589,7 @@
inline
TyErrorId AnnotatorContext::extractValue(const icu::UnicodeString & groupName,
const icu::UnicodeString & paramName,
- vector<bool> & returnValues) const {
+ std::vector<bool> & returnValues) const {
NameValuePair const * pResult =
findNameValuePair(groupName, paramName, iv_pTaeSpecifier->getSearchStrategy());
if (pResult != NULL) {// a value has been found
@@ -629,7 +628,7 @@
inline
TyErrorId AnnotatorContext::extractValue(const icu::UnicodeString & groupName,
const icu::UnicodeString & paramName,
- vector<int> & returnValues) const {
+ std::vector<int> & returnValues) const {
NameValuePair const * pResult =
findNameValuePair(groupName, paramName, iv_pTaeSpecifier->getSearchStrategy());
if (pResult != NULL) {// a value has been found
@@ -655,7 +654,7 @@
inline
TyErrorId AnnotatorContext::extractValue(const icu::UnicodeString & groupName,
const icu::UnicodeString & paramName,
- vector<float> & returnValues) const {
+ std::vector<float> & returnValues) const {
NameValuePair const * pResult =
findNameValuePair(groupName, paramName, iv_pTaeSpecifier->getSearchStrategy());
if (pResult != NULL) {// a value has been found
@@ -681,7 +680,7 @@
inline
TyErrorId AnnotatorContext::extractValue(const icu::UnicodeString & groupName,
const icu::UnicodeString & paramName,
- vector<icu::UnicodeString> & returnValues) const {
+ std::vector<icu::UnicodeString> & returnValues) const {
NameValuePair const * pResult =
findNameValuePair(groupName, paramName, iv_pTaeSpecifier->getSearchStrategy());
if (pResult != NULL) {// a value has been found
@@ -709,7 +708,7 @@
inline
TyErrorId AnnotatorContext::extractValue(const icu::UnicodeString & groupName,
const icu::UnicodeString & paramName,
- vector<std::string*> & returnValues) const {
+ std::vector<std::string*> & returnValues) const {
NameValuePair const * pResult =
findNameValuePair(groupName, paramName, iv_pTaeSpecifier->getSearchStrategy());
if (pResult != NULL) {// a value has been found
@@ -732,7 +731,7 @@
inline
TyErrorId AnnotatorContext::extractValue(const icu::UnicodeString & paramName,
- vector<std::string*> & returnValues) const {
+ std::vector<std::string*> & returnValues) const {
NameValuePair const * pResult = findNameValuePair(paramName);
if (pResult != NULL) {// a value has been found
pResult->extractSingleByteStringValues(returnValues);
diff --git a/src/framework/uima/annotator_mgr.hpp b/src/framework/uima/annotator_mgr.hpp
index e265203..9519f58 100644
--- a/src/framework/uima/annotator_mgr.hpp
+++ b/src/framework/uima/annotator_mgr.hpp
@@ -241,7 +241,7 @@
static bool shouldEngineBeCalled(internal::CapabilityContainer const &,
ResultSpecification const & rResultSpec,
Language const &,
- vector<TypeOrFeature>&) ;
+ std::vector<TypeOrFeature>&) ;
/* COPY CONSTRUCTOR NOT SUPPORTED */
AnnotatorManager(const AnnotatorManager & ); //lint !e1704
diff --git a/src/framework/uima/capability.hpp b/src/framework/uima/capability.hpp
index 3db8a8b..754efb5 100644
--- a/src/framework/uima/capability.hpp
+++ b/src/framework/uima/capability.hpp
@@ -57,9 +57,9 @@
**/
class UIMA_LINK_IMPORTSPEC Capability :public MetaDataObject {
public:
- typedef vector <icu::UnicodeString > TyVecCapabilityTofs;
- typedef vector <icu::UnicodeString > TyVecCapabilityLanguages;
- typedef vector <icu::UnicodeString > TyVecCapabilitySofas;
+ typedef std::vector <icu::UnicodeString > TyVecCapabilityTofs;
+ typedef std::vector <icu::UnicodeString > TyVecCapabilityLanguages;
+ typedef std::vector <icu::UnicodeString > TyVecCapabilitySofas;
enum EnTypeStyle {
INPUT, OUTPUT, INPUTSOFA, OUTPUTSOFA
@@ -86,7 +86,7 @@
break;
default:
//TBD: error handling
- cerr << "Wrong output type " << typeStyle << endl;
+ std::cerr << "Wrong output type " << typeStyle << std::endl;
break;
}
diff --git a/src/framework/uima/caspool.hpp b/src/framework/uima/caspool.hpp
index bd09160..208b1ca 100644
--- a/src/framework/uima/caspool.hpp
+++ b/src/framework/uima/caspool.hpp
@@ -44,7 +44,7 @@
/* ----------------------------------------------------------------------- */
namespace uima {
class AnalysisEngineDescription;
- class internal::CASDefinition;
+ //class internal::CASDefinition;
}
@@ -63,8 +63,8 @@
class UIMA_LINK_IMPORTSPEC CASPool {
private:
- vector<CAS *> iv_vecAllInstances;
- vector<CAS *> iv_vecFreeInstances;
+ std::vector<CAS *> iv_vecAllInstances;
+ std::vector<CAS *> iv_vecFreeInstances;
size_t iv_numInstances;
uima::internal::CASDefinition * iv_pCasDef;
diff --git a/src/framework/uima/caswriter_abase.hpp b/src/framework/uima/caswriter_abase.hpp
index 02c5d4e..961b285 100644
--- a/src/framework/uima/caswriter_abase.hpp
+++ b/src/framework/uima/caswriter_abase.hpp
@@ -74,7 +74,7 @@
CASWriterABase(CAS const & crCAS, bool bAddDocument);
virtual ~CASWriterABase();
- virtual void write(ostream& os) = 0;
+ virtual void write(std::ostream& os) = 0;
};
@@ -85,7 +85,7 @@
XMLWriterABase(CAS const & crCAS, bool bAddDocBuffer);
virtual ~XMLWriterABase();
- virtual void write(ostream& os) = 0;
+ virtual void write(std::ostream& os) = 0;
};
}
diff --git a/src/framework/uima/config_param.hpp b/src/framework/uima/config_param.hpp
index 56026ff..f552377 100644
--- a/src/framework/uima/config_param.hpp
+++ b/src/framework/uima/config_param.hpp
@@ -220,22 +220,22 @@
TyErrorId addValue(const icu::UnicodeString & value);
bool extractBoolValue() const;
- vector<bool> const & extractBoolValues() const;
+ std::vector<bool> const & extractBoolValues() const;
int extractIntValue() const;
- vector<int> const & extractIntValues() const;
+ std::vector<int> const & extractIntValues() const;
float extractFloatValue() const;
- vector<float> const & extractFloatValues() const;
+ std::vector<float> const & extractFloatValues() const;
icu::UnicodeString const & extractStringValue() const;
- vector<icu::UnicodeString> const & extractStringValues() const;
+ std::vector<icu::UnicodeString> const & extractStringValues() const;
//Returns a UTF-8 string
std::string extractSingleByteStringValue() const;
//converts array of values from UTF-16 to UTF-8
//Caller assumes memory ownership of string objects in vector
- void extractSingleByteStringValues( vector<std::string*> & values) const;
+ void extractSingleByteStringValues( std::vector<std::string*> & values) const;
private:
@@ -266,7 +266,7 @@
~ConfigurationGroup();
void commit() {
- map<icu::UnicodeString, ConfigurationParameter *>::iterator entries;
+ std::map<icu::UnicodeString, ConfigurationParameter *>::iterator entries;
for (entries = iv_configParams.begin(); entries != iv_configParams.end(); entries++) {
entries->second->commit();
}
@@ -288,7 +288,7 @@
* returns TRUE iff a configuration parameter<code>paramName</code>exists in this group.
**/
bool hasConfigurationParameter(const icu::UnicodeString & paramName) const {
- map<icu::UnicodeString, ConfigurationParameter *>::const_iterator ite = iv_configParams.find(paramName);
+ std::map<icu::UnicodeString, ConfigurationParameter *>::const_iterator ite = iv_configParams.find(paramName);
return(ite != iv_configParams.end());
}
@@ -297,7 +297,7 @@
* if no such parameter is found.
**/
const ConfigurationParameter * getConfigurationParameter(const icu::UnicodeString & paramName) const {
- map<icu::UnicodeString, ConfigurationParameter *>::const_iterator ite = iv_configParams.find(paramName);
+ std::map<icu::UnicodeString, ConfigurationParameter *>::const_iterator ite = iv_configParams.find(paramName);
if (ite != iv_configParams.end()) {
return ite->second;
} else {
@@ -305,10 +305,10 @@
}
}
- const vector <const ConfigurationParameter *> getConfigurationParameters() const;
+ const std::vector <const ConfigurationParameter *> getConfigurationParameters() const;
private:
- map<icu::UnicodeString, ConfigurationParameter *> iv_configParams;
+ std::map<icu::UnicodeString, ConfigurationParameter *> iv_configParams;
};
@@ -321,7 +321,7 @@
:MetaDataObject(), iv_nameValuePairs() {}
~SettingsForGroup() {
- map<icu::UnicodeString, NameValuePair *>::iterator entries = iv_nameValuePairs.begin();
+ std::map<icu::UnicodeString, NameValuePair *>::iterator entries = iv_nameValuePairs.begin();
while (entries != iv_nameValuePairs.end()) {
delete (*entries).second;
entries++;
@@ -350,7 +350,7 @@
* Returns the<code>NameValuePair</code>whose name equals<code>paramName</code>or NULL if no such object can be found.
**/
NameValuePair * getNameValuePair(const icu::UnicodeString & paramName) const {
- map<icu::UnicodeString, NameValuePair *>::const_iterator ite = iv_nameValuePairs.find(paramName);
+ std::map<icu::UnicodeString, NameValuePair *>::const_iterator ite = iv_nameValuePairs.find(paramName);
if (ite == iv_nameValuePairs.end()) {
return NULL;
} else {
@@ -358,10 +358,10 @@
}
}
- vector<NameValuePair const *> getNameValuePairs() const;
+ std::vector<NameValuePair const *> getNameValuePairs() const;
private:
- map<icu::UnicodeString, NameValuePair *> iv_nameValuePairs;
+ std::map<icu::UnicodeString, NameValuePair *> iv_nameValuePairs;
};
diff --git a/src/framework/uima/config_tools.hpp b/src/framework/uima/config_tools.hpp
index b2bcc6f..fa40b10 100644
--- a/src/framework/uima/config_tools.hpp
+++ b/src/framework/uima/config_tools.hpp
@@ -170,7 +170,7 @@
// required value not there: return error we got from config
return utErrId;
}
- convertFromString((string)crclOptionInfo.cpszDefaultValueAsString, rclTargetVariable);
+ convertFromString((std::string)crclOptionInfo.cpszDefaultValueAsString, rclTargetVariable);
// we used the provided default: this is not an error so we return OK
utErrId = UIMA_ERR_NONE;
}
@@ -285,9 +285,9 @@
#endif
#if defined(__SUNPRO_CC)
- vector<ContainerType::value_type> elements;
+ std::vector<ContainerType::value_type> elements;
#else
- vector<ElementType> elements;
+ std::vector<ElementType> elements;
#endif
if (EXISTS(cpclConfigGroup)) {
@@ -306,10 +306,10 @@
// required value not there: return error we got from config
return utErrId;
}
- vector< string > vecTmpStrings;
+ std::vector< std::string > vecTmpStrings;
delimitedString2Vector(
vecTmpStrings,
- (string)crclOptionInfo.cpszDefaultValueAsString,
+ (std::string)crclOptionInfo.cpszDefaultValueAsString,
",",
true, // trim strings
false // insert empty strings
diff --git a/src/framework/uima/configure.h b/src/framework/uima/configure.h
index df1c927..98a3ff2 100644
--- a/src/framework/uima/configure.h
+++ b/src/framework/uima/configure.h
@@ -68,7 +68,6 @@
#ifdef __cplusplus
#include <string>
-using namespace std;
#endif
#ifndef U_OVERRIDE_CXX_ALLOCATION
diff --git a/src/framework/uima/consoleui.hpp b/src/framework/uima/consoleui.hpp
index a7a2fa3..d8dd7da 100644
--- a/src/framework/uima/consoleui.hpp
+++ b/src/framework/uima/consoleui.hpp
@@ -102,8 +102,8 @@
iv_bQuiet = bQuiet;
}
- ostream & getOutputStream(void) const {
- return cout;
+ std::ostream & getOutputStream(void) const {
+ return std::cout;
}
/** display a field and a value with padding so value starts at col 40
@@ -222,13 +222,13 @@
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::formatHeader(const char * cpszMsg) const {
if (iv_bQuiet) return;
- cout << endl << " " << cpszMsg << "\n " << gs_cpszLine+2;
+ std::cout << std::endl << " " << cpszMsg << "\n " << gs_cpszLine+2;
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::header(const char * cpszMsg) const {
if (iv_bQuiet) return;
- cout << endl << " " << gs_cpszLine+2 << iv_szProcessName << ": " << cpszMsg << endl;
+ std::cout << std::endl << " " << gs_cpszLine+2 << iv_szProcessName << ": " << cpszMsg << std::endl;
}
/* ----------------------------------------------------------------------- */
@@ -236,88 +236,88 @@
if (iv_bQuiet) return;
int len = strlen(cpszMsg);
if ( len > gi_maxlen ) len = gi_maxlen;
- cout << " " << cpszMsg << gs_cpszFiller+len; // Pad out to col 40
+ std::cout << " " << cpszMsg << gs_cpszFiller+len; // Pad out to col 40
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::format(const char * cpszField, const char * cpszValue) const {
if (iv_bQuiet) return;
format(cpszField);
- cout << cpszValue << endl;
+ std::cout << cpszValue << std::endl;
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::format(const char * cpszField, long lValue) const {
if (iv_bQuiet) return;
format(cpszField);
- cout << lValue << endl;
+ std::cout << lValue << std::endl;
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::format(const char * cpszField, unsigned long ulValue) const {
if (iv_bQuiet) return;
format(cpszField);
- cout << ulValue << endl;
+ std::cout << ulValue << std::endl;
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::formatBool(const char * cpszField, bool bValue) const {
if (iv_bQuiet) return;
format(cpszField);
- cout << (bValue ? "YES" : "NO") << endl;
+ std::cout << (bValue ? "YES" : "NO") << std::endl;
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::horizontalBar(void) const {
if (iv_bQuiet) return;
- cout << gs_cpszLine << endl;
+ std::cout << gs_cpszLine << std::endl;
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::newline(void) const {
if (iv_bQuiet) return;
- cout << endl;
+ std::cout << std::endl;
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::displayUsage(void) const {
- cout << endl << "Usage: " << iv_szProcessName << endl
+ std::cout << std::endl << "Usage: " << iv_szProcessName << std::endl
<< iv_cpszUsage[0] << iv_cpszUsage[1] << BEEP;
::exit(1);
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::displayHelp(void) const {
- cout << endl << "Help: " << iv_cpszHelp;
+ std::cout << std::endl << "Help: " << iv_cpszHelp;
::exit(1);
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::info(const char * cpszMsg) const {
if (iv_bQuiet) return;
- cout << endl << gs_cpszLine << iv_szProcessName << ": " << cpszMsg << endl;
+ std::cout << std::endl << gs_cpszLine << iv_szProcessName << ": " << cpszMsg << std::endl;
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::warning(const char * cpszMsg1, const char * cpszMsg2) const {
- cerr << "WARNING: " << cpszMsg1;
+ std::cerr << "WARNING: " << cpszMsg1;
if ( cpszMsg2 != NULL )
- cerr << cpszMsg2;
- cerr << endl;
+ std::cerr << cpszMsg2;
+ std::cerr << std::endl;
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::error(const char * cpszMsg) const {
- cerr << "ERROR: " << cpszMsg << endl;
+ std::cerr << "ERROR: " << cpszMsg << std::endl;
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::fatal(int iErrcode, const char * cpszMsg1 , const char * cpszMsg2) const {
- cerr << "FATAL ERROR: " << iErrcode << " " << cpszMsg1;
+ std::cerr << "FATAL ERROR: " << iErrcode << " " << cpszMsg1;
if ( cpszMsg2 != NULL )
- cerr << cpszMsg2;
- cerr << endl;
+ std::cerr << cpszMsg2;
+ std::cerr << std::endl;
::exit((int) iErrcode);
}
@@ -377,13 +377,13 @@
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::progressStep(void) {
if (iv_bQuiet) return;
- cout << gs_progressChars[iv_uiProgressInd++ % 4];
+ std::cout << gs_progressChars[iv_uiProgressInd++ % 4];
}
/* ----------------------------------------------------------------------- */
inline void ConsoleUI::progressStop(void) const {
if (iv_bQuiet) return;
- cout << "\r \r";
+ std::cout << "\r \r";
}
diff --git a/src/framework/uima/ftools.hpp b/src/framework/uima/ftools.hpp
index 920a517..fe29f82 100644
--- a/src/framework/uima/ftools.hpp
+++ b/src/framework/uima/ftools.hpp
@@ -62,7 +62,7 @@
UIMA_LINK_IMPORTSPEC size_t
ftool_ReadFileToString(
const uima::util::Filename& rclFileName,
- string& rsData
+ std::string& rsData
);
/**
diff --git a/src/framework/uima/internal_capability_container.hpp b/src/framework/uima/internal_capability_container.hpp
index 8215a1b..c839d9e 100644
--- a/src/framework/uima/internal_capability_container.hpp
+++ b/src/framework/uima/internal_capability_container.hpp
@@ -79,7 +79,7 @@
/**
* initialize from the string-based description derived from configuration XML file
*/
- void init( vector<Capability*> const & vecCap, TypeSystem const & typeSystem, EnMatchPolicy enMatchPolicy = enStrictThenLooseMatch);
+ void init( std::vector<Capability*> const & vecCap, TypeSystem const & typeSystem, EnMatchPolicy enMatchPolicy = enStrictThenLooseMatch);
/**
* Return the container of all output types/features that are defined
* for a given language lang using match policy enMatchPolicy
diff --git a/src/framework/uima/internal_jedii_engine.hpp b/src/framework/uima/internal_jedii_engine.hpp
index 7064e2e..6b34295 100644
--- a/src/framework/uima/internal_jedii_engine.hpp
+++ b/src/framework/uima/internal_jedii_engine.hpp
@@ -97,7 +97,7 @@
// temporary string pool for deserialized strings
- vector<icu::UnicodeString> iv_stringPool;
+ std::vector<icu::UnicodeString> iv_stringPool;
// 0: not set, 1: primitive, 2: aggregate
int iv_isPrimitive;
@@ -125,19 +125,19 @@
void checkForUnexpectedJNIException();
// functions to convert C++ data structures to the Java equivalent
- jintArray createJIntArray(vector<uima::internal::SerializedCAS::TyNum> const & v);
- jbyteArray createJByteArray(vector<char> const & v);
- jshortArray createJShortArray(vector<short> const & v);
- jlongArray createJLongArray(vector<INT64> const & v);
+ jintArray createJIntArray(std::vector<uima::internal::SerializedCAS::TyNum> const & v);
+ jbyteArray createJByteArray(std::vector<char> const & v);
+ jshortArray createJShortArray(std::vector<short> const & v);
+ jlongArray createJLongArray(std::vector<INT64> const & v);
- jobjectArray createJStringArray(vector<UnicodeStringRef> const & v);
+ jobjectArray createJStringArray(std::vector<UnicodeStringRef> const & v);
jstring createJString(UnicodeStringRef const & ref);
- void createIntVector(jintArray ar, vector<uima::internal::SerializedCAS::TyNum>& result);
- void createStringVector(jobjectArray ar, vector<UnicodeStringRef>& result, vector<icu::UnicodeString> & pool);
- void createByteVector(jbyteArray ar, vector<char>& result);
- void createShortVector(jshortArray ar, vector<short>& result);
- void createLongVector(jlongArray ar, vector<long>& result);
+ void createIntVector(jintArray ar, std::vector<uima::internal::SerializedCAS::TyNum>& result);
+ void createStringVector(jobjectArray ar, std::vector<UnicodeStringRef>& result, std::vector<icu::UnicodeString> & pool);
+ void createByteVector(jbyteArray ar,std:: vector<char>& result);
+ void createShortVector(jshortArray ar, std::vector<short>& result);
+ void createLongVector(jlongArray ar, std::vector<long>& result);
// initialize a Java VM to iv_obj
void initializeJavaVM();
// destroy the Java VM
diff --git a/src/framework/uima/internal_primitive_engine.hpp b/src/framework/uima/internal_primitive_engine.hpp
index 163fd07..b54b99d 100644
--- a/src/framework/uima/internal_primitive_engine.hpp
+++ b/src/framework/uima/internal_primitive_engine.hpp
@@ -93,7 +93,7 @@
TyErrorId destroyImpl();
- virtual const string & getSymbolicName(void) const {
+ virtual const std::string & getSymbolicName(void) const {
assert( EXISTS(iv_pAnnotator) );
return iv_pAnnotator->getSymbolicName();
}
diff --git a/src/framework/uima/language.hpp b/src/framework/uima/language.hpp
index 4022b3e..cfd3737 100644
--- a/src/framework/uima/language.hpp
+++ b/src/framework/uima/language.hpp
@@ -370,7 +370,7 @@
_initFromString(crclString);
}
- inline string
+ inline std::string
Language::asString( void ) const {
return (iv_locale);
}
diff --git a/src/framework/uima/location.hpp b/src/framework/uima/location.hpp
index dfe905b..50d77e2 100644
--- a/src/framework/uima/location.hpp
+++ b/src/framework/uima/location.hpp
@@ -137,7 +137,7 @@
if (envVar.hasValue())
path = apr_pstrcat(locPool, envVar.getValue(), "/", NULL );
else
- path = "./";
+ path = (char*)"./";
}
/* ----------------------------------------------------------------------- */
@@ -181,7 +181,7 @@
apr_status_t rv;
rv = apr_dir_make(path, APR_OS_DEFAULT , locPool);
if (rv != APR_SUCCESS) {
- cout << "Error creating dir " << path << endl;
+ std::cout << "Error creating dir " << path << std::endl;
//TODO throw exception
UIMA_EXC_THROW_NEW(Exception,
UIMA_ERR_APR_FAILURE ,
diff --git a/src/framework/uima/log.hpp b/src/framework/uima/log.hpp
index 6521f1f..4f0e56f 100644
--- a/src/framework/uima/log.hpp
+++ b/src/framework/uima/log.hpp
@@ -125,9 +125,9 @@
virtual ~Logger() { }
virtual void log(LogStream::EnEntryType entrytype,
- string classname,
- string methodname,
- string message,
+ std::string classname,
+ std::string methodname,
+ std::string message,
long errorCode) =0;
};
@@ -140,19 +140,19 @@
*/
class UIMA_LINK_IMPORTSPEC FileLogger : public Logger {
public:
- FileLogger(string filename);
+ FileLogger(std::string filename);
~FileLogger() {fclose(iv_logfile);}
virtual void log(LogStream::EnEntryType entrytype,
- string classname,
- string methodname,
- string message,
+ std::string classname,
+ std::string methodname,
+ std::string message,
long errorCode) ;
private:
/** Format the log message */
std::string format(LogStream::EnEntryType enType,
- const string & cpszMsg,
+ const std::string & cpszMsg,
long lUserCode) ;
FILE * iv_logfile;
@@ -266,7 +266,7 @@
ErrorInfo iv_errInfo;
LogStream iv_logStream;
LogStream::EnEntryType iv_logLevel;
- vector<Logger*> & vecLoggers;
+ std::vector<Logger*> & vecLoggers;
/* --- functions --- */
TyMessageId getTypeAsMessageId(LogStream::EnEntryType enType) const;
diff --git a/src/framework/uima/resmgr.hpp b/src/framework/uima/resmgr.hpp
index 8f893d8..79699a2 100644
--- a/src/framework/uima/resmgr.hpp
+++ b/src/framework/uima/resmgr.hpp
@@ -250,7 +250,7 @@
*/
void unregisterLogger(Logger *);
- vector<Logger*> & getLoggers();
+ std::vector<Logger*> & getLoggers();
/*@}*/
protected:
@@ -262,16 +262,16 @@
////bool iv_bIgnoreAnnotatorPathSpec;
- typedef vector<ResourceABase *> TyResourceList;
- typedef map<icu::UnicodeString, TyResourceList > TyResources;
+ typedef std::vector<ResourceABase *> TyResourceList;
+ typedef std::map<icu::UnicodeString, TyResourceList > TyResources;
TyResources iv_resources;
- typedef map<icu::UnicodeString, ResourceFactoryABase *> TyResourceFactories;
+ typedef std::map<icu::UnicodeString, ResourceFactoryABase *> TyResourceFactories;
TyResourceFactories iv_resourceFactories;
- typedef map<std::string, util::Filename *> TyURIStreamHandlers;
- map<std::string, util::Filename*> iv_streamhandlers;
+ typedef std::map<std::string, util::Filename *> TyURIStreamHandlers;
+ std::map<std::string, util::Filename*> iv_streamhandlers;
util::Location iv_locationWork;
@@ -281,7 +281,7 @@
TCHAR schemaInfo[1024];
//Logging
- vector<Logger *> iv_loggers; //registered loggers
+ std::vector<Logger *> iv_loggers; //registered loggers
FileLogger * iv_fileLogger; //created if UIMACPP_LOGFILE env variable is set.
LogStream::EnEntryType iv_logLevel; // minimum level for message to be logged
diff --git a/src/framework/uima/result_specification.hpp b/src/framework/uima/result_specification.hpp
index daa0d25..84f0045 100644
--- a/src/framework/uima/result_specification.hpp
+++ b/src/framework/uima/result_specification.hpp
@@ -133,8 +133,8 @@
}
- void print(ostream & os) const {
- os << "ResultSpecification: " << endl;
+ void print(std::ostream & os) const {
+ os << "ResultSpecification: " << std::endl;
ResultSpecification::TyTypeOrFeatureSTLSet const & crTOFSet = getTypeOrFeatureSTLSet();
ResultSpecification::TyTypeOrFeatureSTLSet::const_iterator cit;
for (cit = crTOFSet.begin(); cit != crTOFSet.end(); ++cit) {
@@ -144,7 +144,7 @@
assert( crTOF.isValid() );
assert( contains( crTOF ) );
- os << " TOF Name: " << crTOF.getName() << endl;
+ os << " TOF Name: " << crTOF.getName() << std::endl;
}
}
diff --git a/src/framework/uima/stltools.hpp b/src/framework/uima/stltools.hpp
index f262bc6..d31d2fc 100644
--- a/src/framework/uima/stltools.hpp
+++ b/src/framework/uima/stltools.hpp
@@ -59,7 +59,6 @@
# include <ext/hash_set>
# include <ext/hash_map>
# if (__GNUC_MINOR__ > 0)
-using namespace __gnu_cxx;
# endif
# else // gcc 2.9
# include <hash_set>
@@ -385,7 +384,7 @@
//add an element with count 0 to the count list if not already there
//(if element is already there, it's count is unchanged)
bool create(const Element& element) {
- pair<typename CountContainer::iterator, bool> pairItBool;
+ std::pair<typename CountContainer::iterator, bool> pairItBool;
pairItBool = insert(typename CountContainer::value_type(element, 0));
if (pairItBool.second) { //if not yet there
m_sortByCountMap.push_back(pairItBool.first);
@@ -397,7 +396,7 @@
//increase the count of element by 1
//(if element is not there already, it is created with a count of 1)
bool increase_count(const Element& element) {
- pair<typename CountContainer::iterator, bool> pairItBool;
+ std::pair<typename CountContainer::iterator, bool> pairItBool;
pairItBool = insert(typename CountContainer::value_type(element, 1));
if (pairItBool.second) { //if not yet there
m_sortByCountMap.push_back(pairItBool.first);
@@ -479,7 +478,7 @@
const char* cpszDelimiter
) {
//? ostream_iterator<typename Container::value_type> itOut(rclOut, cpszDelimiter);
- ostream_iterator<
+ std::ostream_iterator<
// typename must not be used for some GNU versions
#if ( ((GCC_VERSION < 30000) || (GCC_VERSION > 30203)) || defined(__xlC__) )
typename
@@ -518,7 +517,7 @@
std::ostream& rclOut,
const char* cpszDelimiter
) {
- ostream_iterator<
+ std::ostream_iterator<
// typename must not be used for some GNU versions
#if ( ((GCC_VERSION < 30000) || (GCC_VERSION > 30203)) || defined(__xlC__) )
typename
@@ -533,7 +532,7 @@
*/
template <class T1, class T2>
inline std::pair<T1, T2> make_non_const_pair(T1& x, T2& y) {
- return pair<T1, T2>(x, y);
+ return std::pair<T1, T2>(x, y);
}
/**
@@ -541,7 +540,7 @@
*/
template <class T1, class T2>
inline std::pair<const T1, T2> make_const_pair(const T1& x, T2& y) {
- return pair<const T1, T2>(x, y);
+ return std::pair<const T1, T2>(x, y);
}
/**
@@ -549,7 +548,7 @@
*/
template <class T1, class T2>
inline std::pair<const T1, T2> make_double_const_pair(const T1& x, const T2& y) {
- return pair<const T1, const T2>(x, y);
+ return std::pair<const T1, const T2>(x, y);
}
@@ -637,7 +636,7 @@
// find the index of the value in vec
// if it is nout foun, -1 is returned
template <class T>
- int findIndex(vector<T> const & vec, T const & value) {
+ int findIndex(std::vector<T> const & vec, T const & value) {
size_t i;
for (i=0; i<vec.size(); ++i) {
if (vec[i] == value) {
diff --git a/src/framework/uima/strtools.hpp b/src/framework/uima/strtools.hpp
index 1b95088..2e922d6 100644
--- a/src/framework/uima/strtools.hpp
+++ b/src/framework/uima/strtools.hpp
@@ -56,7 +56,7 @@
*/
# define STRING_NPOS NPOS
#else
-# define STRING_NPOS string::npos
+# define STRING_NPOS std::string::npos
#endif
//defines for defining basic string template functions with OS/AE STl implementations
@@ -667,7 +667,7 @@
bool toLower,
bool trim
) {
- ifstream inStream(filename);
+ std::ifstream inStream(filename);
if (inStream.fail()) {
return false;
}
@@ -1902,7 +1902,7 @@
const BASIC_STRING_TEMPLATE & delimiters
) {
BASIC_STRING_TEMPLATE s;
- typename vector< BASIC_STRING_TEMPLATE >::const_iterator it;
+ typename std::vector< BASIC_STRING_TEMPLATE >::const_iterator it;
for (it = v.begin(); it != v.end(); ++it) {
s += *it;
diff --git a/src/framework/uima/taespecifier.hpp b/src/framework/uima/taespecifier.hpp
index d51f7c3..766e912 100644
--- a/src/framework/uima/taespecifier.hpp
+++ b/src/framework/uima/taespecifier.hpp
@@ -156,7 +156,7 @@
**/
class UIMA_LINK_IMPORTSPEC FSIndexDescription : public MetaDataObject {
public:
- typedef vector < FSIndexKeyDescription * > TyVecpFSIndexKeys;
+ typedef std::vector < FSIndexKeyDescription * > TyVecpFSIndexKeys;
enum EnIndexKind {
SORTED, BAG, SET
};
@@ -261,7 +261,7 @@
* <code>node</code> must uniquely identify an annotator.
**/
virtual EnFlowType const & getFlowConstraintsType()=0;
- virtual vector < icu::UnicodeString > const & getNodes() const = 0;
+ virtual std::vector < icu::UnicodeString > const & getNodes() const = 0;
virtual TyErrorId addNode(const icu::UnicodeString & node)=0;
};
@@ -290,12 +290,12 @@
return UIMA_ERR_NONE;
}
- vector < icu::UnicodeString > const & getNodes() const {
+ std::vector < icu::UnicodeString > const & getNodes() const {
return(iv_nodes);
}
private:
EnFlowType iv_type;
- vector<icu::UnicodeString> iv_nodes;
+ std::vector<icu::UnicodeString> iv_nodes;
};
class UIMA_LINK_IMPORTSPEC CapabilityLanguageFlow : public FlowConstraints {
@@ -316,12 +316,12 @@
return UIMA_ERR_NONE;
}
- vector < icu::UnicodeString > const & getNodes() const {
+ std::vector < icu::UnicodeString > const & getNodes() const {
return(iv_nodes);
}
private:
EnFlowType iv_type;
- vector<icu::UnicodeString> iv_nodes;
+ std::vector<icu::UnicodeString> iv_nodes;
};
@@ -351,15 +351,15 @@
NONE, DEFAULT_FALLBACK, LANGUAGE_FALLBACK
};
- typedef vector <Capability *> TyVecpCapabilities;
- typedef vector <FSIndexDescription *> TyVecpFSIndexDescriptions;
- typedef vector<TypePriority *> TyVecpTypePriorities;
+ typedef std::vector <Capability *> TyVecpCapabilities;
+ typedef std::vector <FSIndexDescription *> TyVecpFSIndexDescriptions;
+ typedef std::vector<TypePriority *> TyVecpTypePriorities;
- typedef vector<ImportDescription *> TyVecpFSIndexImportDescriptions;
- typedef vector<ImportDescription *> TyVecpTypePriorityImportDescriptions;
+ typedef std::vector<ImportDescription *> TyVecpFSIndexImportDescriptions;
+ typedef std::vector<ImportDescription *> TyVecpTypePriorityImportDescriptions;
- typedef map <icu::UnicodeString, ConfigurationGroup> TyConfigGroup;
- typedef map <icu::UnicodeString, SettingsForGroup> TyConfigSettings;
+ typedef std::map <icu::UnicodeString, ConfigurationGroup> TyConfigGroup;
+ typedef std::map <icu::UnicodeString, SettingsForGroup> TyConfigSettings;
AnalysisEngineMetaData()
@@ -699,7 +699,7 @@
* @return The names of all groups in this specifier that define <code>paramName</code>.
* May contain duplicate group names.
**/
- const vector < icu::UnicodeString > getGroupNamesForParameter(const icu::UnicodeString & paramName) const;
+ const std::vector < icu::UnicodeString > getGroupNamesForParameter(const icu::UnicodeString & paramName) const;
private:
@@ -749,7 +749,7 @@
**/
void generateFallbackGroups(const icu::UnicodeString & groupName,
EnSearchStrategy strategy,
- vector < icu::UnicodeString> & fallbackGroups);
+ std::vector < icu::UnicodeString> & fallbackGroups);
/**
* Adds a configuration group named <code>groupName</code>.
@@ -808,7 +808,7 @@
* These parameters will be added explicitly in the calls to <code>getConfigurationParameters</code>.
*
**/
- const vector <icu::UnicodeString> getConfigurationGroupNames() const;
+ const std::vector <icu::UnicodeString> getConfigurationGroupNames() const;
/**
* @return All <code>ConfigurationParameter</code>s defined for <code>groupName</code>.
@@ -816,7 +816,7 @@
* as well.
* Returns an empty vector if <code>groupName</code> does not exist.
**/
- const vector <const ConfigurationParameter *> getConfigurationParameters(const icu::UnicodeString & groupName) const;
+ const std::vector <const ConfigurationParameter *> getConfigurationParameters(const icu::UnicodeString & groupName) const;
//internally, we store configuration parameters and settings always in groups
@@ -867,7 +867,7 @@
friend class CasDefinition;
typedef std::map<icu::UnicodeString, AnalysisEngineDescription *> TyMapDelegateSpecs;
- typedef vector <SofaMapping *> TyVecpSofaMappings;
+ typedef std::vector <SofaMapping *> TyVecpSofaMappings;
enum EnFrameworkImplName {
CPLUSPLUS, JAVA
diff --git a/src/framework/uima/taespecifierbuilder.hpp b/src/framework/uima/taespecifierbuilder.hpp
index 158bfd3..7a619cb 100644
--- a/src/framework/uima/taespecifierbuilder.hpp
+++ b/src/framework/uima/taespecifierbuilder.hpp
@@ -206,14 +206,14 @@
void buildTypePriorityFromImportLocation(AnalysisEngineMetaData & aeDesc,
icu::UnicodeString const & fileName,
icu::UnicodeString const & lastFileName,
- vector<icu::UnicodeString> & alreadyImported);
+ std::vector<icu::UnicodeString> & alreadyImported);
void buildFSIndexFromImportLocation(AnalysisEngineMetaData &aeMetaData,
icu::UnicodeString const & importfn,
- vector<icu::UnicodeString> & alreadyImported,
+ std::vector<icu::UnicodeString> & alreadyImported,
icu::UnicodeString const & lastFileName);
void buildFSIndexCollection(AnalysisEngineMetaData & aeMetaData,
DOMElement * specElem,
- vector<icu::UnicodeString> & alreadyImported,
+ std::vector<icu::UnicodeString> & alreadyImported,
icu::UnicodeString const & lastFileName);
FSIndexDescription * buildFSIndexDesc(DOMElement * specElem);
FSIndexKeyDescription * buildFSIndexKeyDesc(DOMElement * specElem);
@@ -244,7 +244,7 @@
void buildTypePriorities(AnalysisEngineMetaData & aeMetaData,
DOMElement * specElem,
icu::UnicodeString const & lastFileName,
- vector<icu::UnicodeString> & alreadyImported);
+ std::vector<icu::UnicodeString> & alreadyImported);
void buildFSIndexes(AnalysisEngineMetaData & aeDesc, DOMElement * specElem);
void buildFSIndexes(AnalysisEngineMetaData::TyVecpFSIndexDescriptions & desc, DOMElement * specElem);
@@ -425,7 +425,7 @@
/**@deprecated*/
void buildConfigParamSettings(AnalysisEngineMetaData & aeDesc, DOMElement * specElem);
/**@deprecated*/
- void buildTypePriorities(AnalysisEngineMetaData & aeDesc, DOMElement * specElem, icu::UnicodeString const & xmlFileLoc, vector<icu::UnicodeString> & alreadyImported);
+ void buildTypePriorities(AnalysisEngineMetaData & aeDesc, DOMElement * specElem, icu::UnicodeString const & xmlFileLoc, std::vector<icu::UnicodeString> & alreadyImported);
/**@deprecated*/
void buildTypePriorities(AnalysisEngineMetaData::TyVecpTypePriorities & typePriorityDesc, DOMElement * specElem);
/**@deprecated*/
diff --git a/src/framework/uima/token_properties.hpp b/src/framework/uima/token_properties.hpp
index fcb6737..fa29a30 100644
--- a/src/framework/uima/token_properties.hpp
+++ b/src/framework/uima/token_properties.hpp
@@ -175,7 +175,7 @@
Character position N - 1 corresponds to bit position 0.
Subsequent decreasing character positions correspond to increasing
bit positions. */
- string to_string( void ) const;
+ std::string to_string( void ) const;
/// Returns the integral value corresponding to the bits in *this.
unsigned long to_ulong( void ) const;
diff --git a/src/framework/uima/typesystemdescription.hpp b/src/framework/uima/typesystemdescription.hpp
index 844842a..f97b343 100644
--- a/src/framework/uima/typesystemdescription.hpp
+++ b/src/framework/uima/typesystemdescription.hpp
@@ -192,8 +192,8 @@
class UIMA_LINK_IMPORTSPEC TypeDescription :public MetaDataObject {
public:
- typedef vector<FeatureDescription *> TyVecpFeatureDescriptions;
- typedef vector<AllowedValue *> TyVecpAllowedValues;
+ typedef std::vector<FeatureDescription *> TyVecpFeatureDescriptions;
+ typedef std::vector<AllowedValue *> TyVecpAllowedValues;
TypeDescription()
:MetaDataObject(), iv_typeName(), iv_superTypeName(), iv_description(),
@@ -332,12 +332,12 @@
return UIMA_ERR_NONE;
}
- const vector <icu::UnicodeString> & getTypeOrder() const {
+ const std::vector <icu::UnicodeString> & getTypeOrder() const {
return iv_vecTypeOrder;
}
private:
- vector <icu::UnicodeString> iv_vecTypeOrder;
+ std::vector <icu::UnicodeString> iv_vecTypeOrder;
};
/**
@@ -346,8 +346,8 @@
**/
class UIMA_LINK_IMPORTSPEC TypeSystemDescription :public MetaDataObject {
public:
- typedef vector<TypeDescription *> TyVecpTypeDescriptions;
- typedef vector<ImportDescription *> TyVecpImportDescriptions;
+ typedef std::vector<TypeDescription *> TyVecpTypeDescriptions;
+ typedef std::vector<ImportDescription *> TyVecpImportDescriptions;
TypeSystemDescription()
@@ -366,7 +366,7 @@
void commit() {
iv_bIsModifiable = false;
- vector<icu::UnicodeString> alreadyImportedLocations;
+ std::vector<icu::UnicodeString> alreadyImportedLocations;
resolveImports(alreadyImportedLocations);
size_t i;
for (i=0; i < iv_vecpTypeDescriptions.size(); i++) {
diff --git a/src/framework/unistrref.cpp b/src/framework/unistrref.cpp
index bcdf69c..32598ae 100644
--- a/src/framework/unistrref.cpp
+++ b/src/framework/unistrref.cpp
@@ -36,7 +36,7 @@
/* ----------------------------------------------------------------------- */
/* Types / Classes */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
diff --git a/src/jni/jni.cpp b/src/jni/jni.cpp
index 6045f68..931a1b1 100644
--- a/src/jni/jni.cpp
+++ b/src/jni/jni.cpp
@@ -80,7 +80,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
/********************************************************************
***** JNILogger
diff --git a/src/jni/jni_string.cpp b/src/jni/jni_string.cpp
index 1427ff9..40b0701 100644
--- a/src/jni/jni_string.cpp
+++ b/src/jni/jni_string.cpp
@@ -62,7 +62,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
//CosClCCSID::CosEnCCSID JNIUString::iv_enSystemCCSID = CosClCCSID::getSystemCCSID();
JNIStringABase::JNIStringABase(JNIEnv* jeEnv, jstring jsString) :
diff --git a/src/jni/jni_utils.cpp b/src/jni/jni_utils.cpp
index 1126643..cb8b296 100644
--- a/src/jni/jni_utils.cpp
+++ b/src/jni/jni_utils.cpp
@@ -56,7 +56,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
jfieldID JNIUtils::getFieldID(JNIEnv* jeEnv, jobject jo, char const * sig, char const * cpszFieldID) {
jclass clazz = jeEnv->GetObjectClass(jo);
ASSERT_NO_JNI_EXCEPTION(jeEnv);
diff --git a/src/jni/uima/jni.hpp b/src/jni/uima/jni.hpp
index 19afedc..5b58c83 100644
--- a/src/jni/uima/jni.hpp
+++ b/src/jni/uima/jni.hpp
@@ -75,15 +75,15 @@
JNILogger(JNIEnv * env);
virtual void log(uima::LogStream::EnEntryType entrytype,
- string classname,
- string methodname,
- string message,
+ std::string classname,
+ std::string methodname,
+ std::string message,
long errorCode) ;
private:
/** Format the log message */
std::string format(uima::LogStream::EnEntryType enType,
- const string & cpszMsg,
+ const std::string & cpszMsg,
long lUserCode) const;
JavaVM * iv_jvm;
jclass cv_clazz ; //proxy class on java side
diff --git a/src/jni/uima/jni_string.hpp b/src/jni/uima/jni_string.hpp
index f1419ca..95fe8fa 100644
--- a/src/jni/uima/jni_string.hpp
+++ b/src/jni/uima/jni_string.hpp
@@ -95,7 +95,7 @@
return uima::UnicodeStringRef( (UChar const *) iv_cpjcData, iv_ulLength );
}
- void convertToSystemCodePage(string& rsResult);
+ void convertToSystemCodePage(std::string& rsResult);
};
diff --git a/src/jni/uima/jni_utils.hpp b/src/jni/uima/jni_utils.hpp
index 7dd5d84..28214ed 100644
--- a/src/jni/uima/jni_utils.hpp
+++ b/src/jni/uima/jni_utils.hpp
@@ -82,17 +82,17 @@
static JNIUString getStringField(JNIEnv* jeEnv, jobject jo, char const * cpszFieldName);
*/
- static jobjectArray createStringArray(JNIEnv* jeEnv, vector<uima::UnicodeStringRef> const & crVec);
- static jintArray createIntArray(JNIEnv* jeEnv, vector<uima::internal::SerializedCAS::TyNum> const & crVec);
- static jbyteArray createByteArray(JNIEnv* jeEnv, vector<char> const & crVec);
- static jshortArray createShortArray(JNIEnv* jeEnv, vector<short> const & crVec);
- static jlongArray createLongArray(JNIEnv* jeEnv, vector<INT64> const & crVec);
+ static jobjectArray createStringArray(JNIEnv* jeEnv, std::vector<uima::UnicodeStringRef> const & crVec);
+ static jintArray createIntArray(JNIEnv* jeEnv, std::vector<uima::internal::SerializedCAS::TyNum> const & crVec);
+ static jbyteArray createByteArray(JNIEnv* jeEnv, std::vector<char> const & crVec);
+ static jshortArray createShortArray(JNIEnv* jeEnv, std::vector<short> const & crVec);
+ static jlongArray createLongArray(JNIEnv* jeEnv, std::vector<INT64> const & crVec);
- static void createStringVector(JNIEnv* jeEnv, jobjectArray, vector<uima::UnicodeStringRef> & rResult, vector<icu::UnicodeString> & );
- static void createIntVector(JNIEnv* jeEnv, jintArray, vector<uima::internal::SerializedCAS::TyNum> & rResult);
- static void createByteVector(JNIEnv* jeEnv, jbyteArray, vector<char> & rResult);
- static void createShortVector(JNIEnv* jeEnv, jshortArray, vector<short> & rResult);
- static void createLongVector(JNIEnv* jeEnv, jlongArray, vector<INT64> & rResult);
+ static void createStringVector(JNIEnv* jeEnv, jobjectArray, std::vector<uima::UnicodeStringRef> & rResult, std::vector<icu::UnicodeString> & );
+ static void createIntVector(JNIEnv* jeEnv, jintArray, std::vector<uima::internal::SerializedCAS::TyNum> & rResult);
+ static void createByteVector(JNIEnv* jeEnv, jbyteArray, std::vector<char> & rResult);
+ static void createShortVector(JNIEnv* jeEnv, jshortArray, std::vector<short> & rResult);
+ static void createLongVector(JNIEnv* jeEnv, jlongArray, std::vector<INT64> & rResult);
static void throwNewInternalException(JNIEnv* jeEnv,
diff --git a/src/test/src/MeetingAnnotator.cpp b/src/test/src/MeetingAnnotator.cpp
index 9290329..4f91cd0 100644
--- a/src/test/src/MeetingAnnotator.cpp
+++ b/src/test/src/MeetingAnnotator.cpp
@@ -20,7 +20,7 @@
#include "uima/api.hpp"
using namespace uima;
-
+using namespace std;
class MeetingAnnotator : public Annotator {
private:
//config param window size
diff --git a/src/test/src/SimpleTextSegmenter.cpp b/src/test/src/SimpleTextSegmenter.cpp
index ddc45d8..6264f85 100644
--- a/src/test/src/SimpleTextSegmenter.cpp
+++ b/src/test/src/SimpleTextSegmenter.cpp
@@ -23,7 +23,7 @@
#include <stdio.h>
#include "uima/api.hpp"
using namespace uima;
-
+using namespace std;
class SimpleTextSegmenter : public Annotator {
private:
diff --git a/src/test/src/TextSegmentConsumer.cpp b/src/test/src/TextSegmentConsumer.cpp
index 51e2bc3..9628073 100644
--- a/src/test/src/TextSegmentConsumer.cpp
+++ b/src/test/src/TextSegmentConsumer.cpp
@@ -21,7 +21,7 @@
#include "uima/api.hpp"
-
+using namespace std;
using namespace uima;
diff --git a/src/test/src/conui.cpp b/src/test/src/conui.cpp
index 4335b62..fd801c8 100644
--- a/src/test/src/conui.cpp
+++ b/src/test/src/conui.cpp
@@ -47,7 +47,7 @@
/* ----------------------------------------------------------------------- */
/* Implementation */
/* ----------------------------------------------------------------------- */
-
+using namespace std;
namespace uima {
diff --git a/src/test/src/test_cas.cpp b/src/test/src/test_cas.cpp
index 2b94e3b..6721a33 100644
--- a/src/test/src/test_cas.cpp
+++ b/src/test/src/test_cas.cpp
@@ -69,7 +69,7 @@
using namespace uima;
using namespace uima::internal;
-
+using namespace std;
/* ----------------------------------------------------------------------- */
/* Constants */
/* ----------------------------------------------------------------------- */
diff --git a/src/test/src/test_casserializer.cpp b/src/test/src/test_casserializer.cpp
index 6f362f9..d87db9f 100644
--- a/src/test/src/test_casserializer.cpp
+++ b/src/test/src/test_casserializer.cpp
@@ -37,6 +37,7 @@
#include "uima/internal_casdeserializer.hpp"
#include <sys/stat.h>
+using namespace std;
using namespace uima;
/* ----------------------------------------------------------------------- */
/* Constants */
diff --git a/src/test/src/test_iterators.cpp b/src/test/src/test_iterators.cpp
index e490b31..539295a 100644
--- a/src/test/src/test_iterators.cpp
+++ b/src/test/src/test_iterators.cpp
@@ -54,7 +54,7 @@
/* Types / Classes */
/* ----------------------------------------------------------------------- */
using namespace uima;
-
+using namespace std;
bool checkIndex(AnnotationFS const & anFS, ANIndex const & ix) {
ANIterator it = ix.iterator();
diff --git a/src/test/src/test_primitivetypes.cpp b/src/test/src/test_primitivetypes.cpp
index 4b96307..c8c92bb 100644
--- a/src/test/src/test_primitivetypes.cpp
+++ b/src/test/src/test_primitivetypes.cpp
@@ -34,15 +34,17 @@
#include "xercesc/util/Base64.hpp"
#include <fstream>
XERCES_CPP_NAMESPACE_USE
+using namespace std;
#ifndef NDEBUG
#define ASSERT_OR_THROWEXCEPTION(x) assert(x)
#else
-#define ASSERT_OR_THROWEXCEPTION(x) if (!(x)) { cerr << __FILE__ << ": Error in line " << __LINE__ << endl; exit(1); }
+#define ASSERT_OR_THROWEXCEPTION(x) if (!(x)) { std::cerr << __FILE__ << ": Error in line " << __LINE__ << std::endl; exit(1); }
#endif
#define LOG(x) cout << __FILE__ << __LINE__ << ": " << x << endl
using namespace uima;
+
icu::UnicodeString str1("string1");
icu::UnicodeString str2("string2");
icu::UnicodeString str3("string3");
diff --git a/src/test/src/test_sofa.cpp b/src/test/src/test_sofa.cpp
index 08cdefd..1bb0698 100644
--- a/src/test/src/test_sofa.cpp
+++ b/src/test/src/test_sofa.cpp
@@ -39,7 +39,7 @@
#define LOG(x) cout << __FILE__ << __LINE__ << ": " << x << endl
using namespace uima;
-
+using namespace std;
/* ----------------------------------------------------------------------- */
/* Main routine */
diff --git a/src/test/src/test_typepriority.cpp b/src/test/src/test_typepriority.cpp
index 42087bf..6b17331 100644
--- a/src/test/src/test_typepriority.cpp
+++ b/src/test/src/test_typepriority.cpp
@@ -41,6 +41,7 @@
#define LOG(x) cout << __FILE__ << __LINE__ << ": " << x << endl
using namespace uima;
+using namespace std;
/* ----------------------------------------------------------------------- */
/* Forward declarations */
/* ----------------------------------------------------------------------- */
diff --git a/src/test/src/test_xcasdeserialization.cpp b/src/test/src/test_xcasdeserialization.cpp
index 6b693f0..b872c1c 100644
--- a/src/test/src/test_xcasdeserialization.cpp
+++ b/src/test/src/test_xcasdeserialization.cpp
@@ -29,7 +29,7 @@
#include "uima/xmiwriter.hpp"
#include <fstream>
-
+using namespace std;
#ifndef NDEBUG
#define ASSERT_OR_THROWEXCEPTION(x) assert(x)
#else
diff --git a/src/test/src/test_xmideserialization.cpp b/src/test/src/test_xmideserialization.cpp
index 6e21b42..edaffbd 100644
--- a/src/test/src/test_xmideserialization.cpp
+++ b/src/test/src/test_xmideserialization.cpp
@@ -41,6 +41,8 @@
#define LOG(x) cout << __FILE__ << __LINE__ << ": " << x << endl
using namespace uima;
+using namespace std;
+
icu::UnicodeString str1("string1");
icu::UnicodeString str2("string2");
icu::UnicodeString str3("string3");
@@ -78,7 +80,6 @@
bool val = false;
UnicodeString ustr("this beer is good");
UnicodeString ustrWithXmlEscapeChars("TestingXmlEscapeChars'\"&><\r\n");
-icu::UnicodeString ustrEmptyString("");
int begin = 1;
int end = 5;
char * viewName = "EnglishDocument";
@@ -268,108 +269,6 @@
}
-void doTestSetToEmptyString(internal::CASDefinition * casDef, bool settoemptystring) {
-
- ErrorInfo errInfo;
- XmiSerializationSharedData sharedData;
-
- CAS * cas = uima::Framework::createCAS(*casDef, errInfo);
- ASSERT_OR_THROWEXCEPTION( EXISTS(cas) );
- CAS * view = cas->createView("AView");
- view->setDocumentText(UnicodeString("sample text for AView"));
-
- Type testType = view->getTypeSystem().getType("test.primitives.Example");
- ASSERT_OR_THROWEXCEPTION( testType.isValid() );
- Feature stringF = testType.getFeatureByBaseName("stringFeature");
- ASSERT_OR_THROWEXCEPTION( stringF.isValid() );
- Feature beginF = testType.getFeatureByBaseName("begin");
- ASSERT_OR_THROWEXCEPTION( beginF.isValid() );
- Feature endF = testType.getFeatureByBaseName("end");
- ASSERT_OR_THROWEXCEPTION( endF.isValid() );
- Feature stringArrayF = testType.getFeatureByBaseName("stringArrayFeatureMultiRef");
- ASSERT_OR_THROWEXCEPTION( stringArrayF.isValid() );
- Feature otherF = testType.getFeatureByBaseName("otherAnnotation");
- ASSERT_OR_THROWEXCEPTION( otherF.isValid() );
- Type annotType = cas->getTypeSystem().getType(CAS::TYPE_NAME_ANNOTATION);
-
- //get index repository
- FSIndexRepository & indexRep = view->getIndexRepository();
-
- //create FS
- FeatureStructure fs = view->createFS(testType);
- ASSERT_OR_THROWEXCEPTION( fs.isValid() );
- //set value of string fs to emptystring if specified
- if (settoemptystring)
- fs.setStringValue(stringF, ustrEmptyString);
- indexRep.addFS(fs);
-
- // Serialize Xmi
- ofstream outputStream;
- outputStream.open("emptytemp.xmi");
- ASSERT_OR_THROWEXCEPTION(outputStream.is_open());
- XmiWriter xmiwriter(*cas, false);
- xmiwriter.write(outputStream);
- outputStream.close();
-
- // deserialize XMI into another CAS
- CAS * cas1 = uima::Framework::createCAS(*casDef, errInfo);
- ASSERT_OR_THROWEXCEPTION( EXISTS(cas1) );
- XmiDeserializer::deserialize("emptytemp.xmi",*cas1, sharedData);
-
- CAS * view1 = cas1->getView("AView");
- // compare
- ASSERT_OR_THROWEXCEPTION(view1->getAnnotationIndex().getSize() == view->getAnnotationIndex().getSize());
- ANIterator iter = view1->getAnnotationIndex().iterator();
- ASSERT_OR_THROWEXCEPTION(iter.isValid());
- FeatureStructure fs1;
- fs1 = (FeatureStructure) iter.get(); //document annotation
- ASSERT_OR_THROWEXCEPTION(fs1.isValid());
- iter.moveToNext();
- fs1 = (FeatureStructure) iter.get(); //example fs
- ASSERT_OR_THROWEXCEPTION(fs1.isValid());
- ASSERT_OR_THROWEXCEPTION(fs1.getIntValue(beginF) == fs.getIntValue(beginF));
- ASSERT_OR_THROWEXCEPTION(fs1.isUntouchedFSValue(stringF) == fs.isUntouchedFSValue(stringF));
- if (settoemptystring) {
- ASSERT_OR_THROWEXCEPTION( 0==fs1.getStringValue(stringF).compare(fs.getStringValue(stringF)));
- } else {
- ASSERT_OR_THROWEXCEPTION(fs1.getStringValue(stringF).getBuffer() == fs.getStringValue(stringF).getBuffer());
- }
-
- //reserialize
- outputStream.open("temp.xmi");
- ASSERT_OR_THROWEXCEPTION(outputStream.is_open());
- XmiWriter xmiwriter1(*cas1, false);
- xmiwriter1.write(outputStream);
- outputStream.close();
-
- //deserialize again
- CAS * cas2 = uima::Framework::createCAS(*casDef, errInfo);
- ASSERT_OR_THROWEXCEPTION( EXISTS(cas2) );
- XmiDeserializer::deserialize("temp.xmi",*cas2, sharedData);
- // compare
- CAS * view2 = cas2->getView("AView");
- ASSERT_OR_THROWEXCEPTION(view2->getAnnotationIndex().getSize() == view->getAnnotationIndex().getSize());
- ANIterator iter2 = view2->getAnnotationIndex().iterator();
- ASSERT_OR_THROWEXCEPTION(iter2.isValid());
- FeatureStructure fs2;
- fs2 = (FeatureStructure) iter2.get(); //document annotation
- ASSERT_OR_THROWEXCEPTION(fs2.isValid());
- iter2.moveToNext();
- fs2 = (FeatureStructure) iter2.get(); //example fs
- ASSERT_OR_THROWEXCEPTION(fs2.isValid());
- ASSERT_OR_THROWEXCEPTION(fs2.getIntValue(beginF) == fs.getIntValue(beginF));
- ASSERT_OR_THROWEXCEPTION(fs2.isUntouchedFSValue(stringF) == fs.isUntouchedFSValue(stringF));
- if (settoemptystring) {
- ASSERT_OR_THROWEXCEPTION( fs1.getStringValue(stringF).compare(fs.getStringValue(stringF)) == 0 );
- } else {
- ASSERT_OR_THROWEXCEPTION(fs2.getStringValue(stringF).getBuffer() == fs.getStringValue(stringF).getBuffer());
- }
- delete cas;
- delete cas1;
- delete cas2;
-
-}
-
void testMultipleSofas(internal::CASDefinition * casDef) {
try {
@@ -796,6 +695,7 @@
doTestXmlEscapeChars(casDef);
LOG("UIMACPP_XMITEST doTestXmlEscapeChars Finished");
+
//test OOTS Missing Type 1
TypeSystemDescription * baseTSDesc = new TypeSystemDescription();
TypeSystem * baseTS = Framework::createTypeSystem(*baseTSDesc,"base",errorInfo);
@@ -808,12 +708,6 @@
internal::CASDefinition * primitivesCasDef =
internal::CASDefinition::createCASDefinition(*primitivests);
- //test string feature set to empty string
- LOG("UIMACPP_XMITEST doTestSetToEmptyString Start");
- doTestSetToEmptyString(primitivesCasDef, true);
- doTestSetToEmptyString(primitivesCasDef, false);
- LOG("UIMACPP_XMITEST doTestSetToEmptyString Finished");
-
LOG("UIMACPP_XMITEST OOTS new primitives missing type Start");
UnicodeString newpxcasFile("ExampleCas/newprimitives.xcas");
UnicodeString newpxcasfn = ResourceManager::resolveFilename(newpxcasFile, newpxcasFile);
diff --git a/src/test/src/uima/annotator_dump.hpp b/src/test/src/uima/annotator_dump.hpp
index 66121b7..ce2e001 100644
--- a/src/test/src/uima/annotator_dump.hpp
+++ b/src/test/src/uima/annotator_dump.hpp
@@ -37,7 +37,7 @@
#include "uima/filename.hpp"
using namespace uima;
-
+using namespace std;
/* ----------------------------------------------------------------------- */
/* Forward declarations */
/* ----------------------------------------------------------------------- */
diff --git a/src/utils/ActiveMQAnalysisEngineService.hpp b/src/utils/ActiveMQAnalysisEngineService.hpp
index 5466148..3d990d6 100644
--- a/src/utils/ActiveMQAnalysisEngineService.hpp
+++ b/src/utils/ActiveMQAnalysisEngineService.hpp
@@ -33,7 +33,7 @@
#include "time.h"
#include <apr_thread_proc.h>
-
+using namespace std;
using namespace cms;
using namespace uima;
diff --git a/src/utils/deployCppService.cpp b/src/utils/deployCppService.cpp
index dc4b228..a2596ab 100644
--- a/src/utils/deployCppService.cpp
+++ b/src/utils/deployCppService.cpp
@@ -25,7 +25,7 @@
#include "deployCppService.hpp"
#include <activemq/core/ActiveMQConsumer.h>
using namespace activemq::exceptions;
-
+using namespace std;
int shutdown_service;
//===================================================
//Main
diff --git a/src/utils/deployCppService.hpp b/src/utils/deployCppService.hpp
index b8a7a9f..a8ff1dd 100644
--- a/src/utils/deployCppService.hpp
+++ b/src/utils/deployCppService.hpp
@@ -32,7 +32,7 @@
#include <apr_thread_cond.h>
#include <apr_signal.h>
#include <apr_portable.h>
-
+using namespace std;
class SocketLogger;
class Monitor;
class AMQAnalysisEngineService;
@@ -86,7 +86,7 @@
cout << asString() << endl;
}
- string ServiceParameters::asString() {
+ string asString() {
stringstream str;
str << "AE descriptor " << iv_aeDescriptor
<< " Initial FSHeap size " << this->iv_initialfsheapsize
diff --git a/src/utils/runAECpp.cpp b/src/utils/runAECpp.cpp
index afdf96c..3c39174 100644
--- a/src/utils/runAECpp.cpp
+++ b/src/utils/runAECpp.cpp
@@ -47,7 +47,7 @@
#include <apr_portable.h>
#include <apr_thread_proc.h>
using namespace uima;
-
+using namespace std;
/* ----------------------------------------------------------------------- */
/* Implementation */