~zorba-coders/zorba/xqueryx_fulltext

« back to all changes in this revision

Viewing changes to src/api/uri_resolver_wrappers.cpp

  • Committer: Tarmac
  • Author(s): Paul J. Lucas
  • Date: 2011-12-08 18:12:23 UTC
  • mfrom: (10577.1.1 bug-901520)
  • Revision ID: tarmac-20111208181223-9240irrzx5ko8r97
Fixed build. Approved: Matthias Brantner, Paul J. Lucas

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
  // external mappers/resolvers. This can serve as a plain EntityData or
29
29
  // a ThesaurusEntityData. However, when there's another EntityData subclass
30
30
  // in future, this won't work as EntityData becomes an ambiguous base class...
 
31
#ifndef ZORBA_NO_FULL_TEXT
31
32
  class EntityDataWrapper : public ThesaurusEntityData
 
33
#else
 
34
  class EntityDataWrapper : public EntityData
 
35
#endif /* ZORBA_NO_FULL_TEXT */
32
36
  {
33
37
  public:
34
38
    static EntityDataWrapper const* create(internal::EntityData const* aData) {
39
43
        return new EntityDataWrapper(EntityData::MODULE);
40
44
      case internal::EntityData::SCHEMA:
41
45
        return new EntityDataWrapper(EntityData::SCHEMA);
 
46
#ifndef ZORBA_NO_FULL_TEXT
42
47
      case internal::EntityData::THESAURUS:
43
48
      {
44
49
        EntityDataWrapper* retval = new EntityDataWrapper(EntityData::THESAURUS);
48
53
      }
49
54
      case internal::EntityData::STOP_WORDS:
50
55
        return new EntityDataWrapper(EntityData::STOP_WORDS);
 
56
#endif /* ZORBA_NO_FULL_TEXT */
51
57
      case internal::EntityData::COLLECTION:
52
58
        return new EntityDataWrapper(EntityData::COLLECTION);
53
59
      case internal::EntityData::DOCUMENT:
61
67
      return theKind;
62
68
    }
63
69
 
 
70
#ifndef ZORBA_NO_FULL_TEXT
64
71
    virtual zorba::locale::iso639_1::type getLanguage() const {
65
72
      return theThesaurusLang;
66
73
    }
 
74
#endif /* ZORBA_NO_FULL_TEXT */
67
75
 
68
76
  private:
69
77
    EntityDataWrapper(EntityData::Kind aKind)
71
79
    {}
72
80
 
73
81
    EntityData::Kind const theKind;
 
82
#ifndef ZORBA_NO_FULL_TEXT
74
83
    zorba::locale::iso639_1::type theThesaurusLang;
 
84
#endif /* ZORBA_NO_FULL_TEXT */
75
85
  };
76
86
 
77
87
  URIMapperWrapper::URIMapperWrapper(zorba::URIMapper& aUserMapper)
157
167
                                           lUserStream->getStreamReleaser());
158
168
        lUserStream->setStreamReleaser(nullptr);
159
169
      }
 
170
#ifndef ZORBA_NO_FULL_TEXT
160
171
      else {
161
172
        Thesaurus* lUserThesaurus = dynamic_cast<Thesaurus*>(lUserPtr.get());
162
173
        if (lUserThesaurus != NULL) {
170
181
          assert(false);
171
182
        }
172
183
      }
 
184
#endif /* ZORBA_NO_FULL_TEXT */
173
185
    }
174
186
    return lRetval;
175
187
  }