Permalink
Browse files

Fix exporting CharFolder and Lucene shared_ptr factory

  • Loading branch information...
1 parent c6ecc25 commit e28b15b02ff9de2208965e9af8eb80983380cdcd @alanw alanw committed Aug 21, 2011
Showing with 26 additions and 25 deletions.
  1. +6 −6 include/CharFolder.h
  2. +20 −19 include/LuceneFactory.h
View
@@ -12,36 +12,36 @@
namespace Lucene
{
/// Utility class for folding character case.
- class CharFolder : public LuceneObject
+ class LPPAPI CharFolder : public LuceneObject
{
public:
virtual ~CharFolder();
LUCENE_CLASS(CharFolder);
-
+
protected:
static bool lowerCache;
static bool upperCache;
static wchar_t lowerChars[CHAR_MAX - CHAR_MIN + 1];
static wchar_t upperChars[CHAR_MAX - CHAR_MIN + 1];
-
+
public:
static wchar_t toLower(wchar_t ch);
static wchar_t toUpper(wchar_t ch);
-
+
template <class ITER>
static void toLower(ITER first, ITER last)
{
for (; first != last; ++first)
*first = toLower(*first);
}
-
+
template <class ITER>
static void toUpper(ITER first, ITER last)
{
for (; first != last; ++first)
*first = toUpper(*first);
}
-
+
protected:
static bool fillLower();
static bool fillUpper();
View
@@ -8,6 +8,7 @@
#define LUCENEFACTORY_H
#include <boost/make_shared.hpp>
+#include <boost/version.hpp>
namespace Lucene
{
@@ -20,7 +21,7 @@ namespace Lucene
return boost::allocate_shared<T>(Allocator<T>());
#endif
}
-
+
template <class T, class A1>
boost::shared_ptr<T> newInstance(A1 const& a1)
{
@@ -30,7 +31,7 @@ namespace Lucene
return boost::allocate_shared<T>(Allocator<T>(), a1);
#endif
}
-
+
template <class T, class A1, class A2>
boost::shared_ptr<T> newInstance(A1 const& a1, A2 const& a2)
{
@@ -40,7 +41,7 @@ namespace Lucene
return boost::allocate_shared<T>(Allocator<T>(), a1, a2);
#endif
}
-
+
template <class T, class A1, class A2, class A3>
boost::shared_ptr<T> newInstance(A1 const& a1, A2 const& a2, A3 const& a3)
{
@@ -50,7 +51,7 @@ namespace Lucene
return boost::allocate_shared<T>(Allocator<T>(), a1, a2, a3);
#endif
}
-
+
template <class T, class A1, class A2, class A3, class A4>
boost::shared_ptr<T> newInstance(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4)
{
@@ -60,7 +61,7 @@ namespace Lucene
return boost::allocate_shared<T>(Allocator<T>(), a1, a2, a3, a4);
#endif
}
-
+
template <class T, class A1, class A2, class A3, class A4, class A5>
boost::shared_ptr<T> newInstance(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, A5 const& a5)
{
@@ -70,7 +71,7 @@ namespace Lucene
return boost::allocate_shared<T>(Allocator<T>(), a1, a2, a3, a4, a5);
#endif
}
-
+
template <class T, class A1, class A2, class A3, class A4, class A5, class A6>
boost::shared_ptr<T> newInstance(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, A5 const& a5, A6 const& a6)
{
@@ -80,7 +81,7 @@ namespace Lucene
return boost::allocate_shared<T>(Allocator<T>(), a1, a2, a3, a4, a5, a6);
#endif
}
-
+
template <class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
boost::shared_ptr<T> newInstance(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, A5 const& a5, A6 const& a6, A7 const& a7)
{
@@ -90,7 +91,7 @@ namespace Lucene
return boost::allocate_shared<T>(Allocator<T>(), a1, a2, a3, a4, a5, a6, a7);
#endif
}
-
+
template <class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
boost::shared_ptr<T> newInstance(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, A5 const& a5, A6 const& a6, A7 const& a7, A8 const& a8)
{
@@ -100,7 +101,7 @@ namespace Lucene
return boost::allocate_shared<T>(Allocator<T>(), a1, a2, a3, a4, a5, a6, a7, a8);
#endif
}
-
+
template <class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
boost::shared_ptr<T> newInstance(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, A5 const& a5, A6 const& a6, A7 const& a7, A8 const& a8, A9 const& a9)
{
@@ -110,79 +111,79 @@ namespace Lucene
return boost::allocate_shared<T>(Allocator<T>(), a1, a2, a3, a4, a5, a6, a7, a8, a9);
#endif
}
-
+
template <class T>
boost::shared_ptr<T> newLucene()
{
boost::shared_ptr<T> instance(newInstance<T>());
instance->initialize();
return instance;
}
-
+
template <class T, class A1>
boost::shared_ptr<T> newLucene(A1 const& a1)
{
boost::shared_ptr<T> instance(newInstance<T>(a1));
instance->initialize();
return instance;
}
-
+
template <class T, class A1, class A2>
boost::shared_ptr<T> newLucene(A1 const& a1, A2 const& a2)
{
boost::shared_ptr<T> instance(newInstance<T>(a1, a2));
instance->initialize();
return instance;
}
-
+
template <class T, class A1, class A2, class A3>
boost::shared_ptr<T> newLucene(A1 const& a1, A2 const& a2, A3 const& a3)
{
boost::shared_ptr<T> instance(newInstance<T>(a1, a2, a3));
instance->initialize();
return instance;
}
-
+
template <class T, class A1, class A2, class A3, class A4>
boost::shared_ptr<T> newLucene(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4)
{
boost::shared_ptr<T> instance(newInstance<T>(a1, a2, a3, a4));
instance->initialize();
return instance;
}
-
+
template <class T, class A1, class A2, class A3, class A4, class A5>
boost::shared_ptr<T> newLucene(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, A5 const& a5)
{
boost::shared_ptr<T> instance(newInstance<T>(a1, a2, a3, a4, a5));
instance->initialize();
return instance;
}
-
+
template <class T, class A1, class A2, class A3, class A4, class A5, class A6>
boost::shared_ptr<T> newLucene(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, A5 const& a5, A6 const& a6)
{
boost::shared_ptr<T> instance(newInstance<T>(a1, a2, a3, a4, a5, a6));
instance->initialize();
return instance;
}
-
+
template <class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
boost::shared_ptr<T> newLucene(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, A5 const& a5, A6 const& a6, A7 const& a7)
{
boost::shared_ptr<T> instance(newInstance<T>(a1, a2, a3, a4, a5, a6, a7));
instance->initialize();
return instance;
}
-
+
template <class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
boost::shared_ptr<T> newLucene(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, A5 const& a5, A6 const& a6, A7 const& a7, A8 const& a8)
{
boost::shared_ptr<T> instance(newInstance<T>(a1, a2, a3, a4, a5, a6, a7, a8));
instance->initialize();
return instance;
}
-
+
template <class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
boost::shared_ptr<T> newLucene(A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, A5 const& a5, A6 const& a6, A7 const& a7, A8 const& a8, A9 const& a9)
{

0 comments on commit e28b15b

Please sign in to comment.