TIVI-153: Add as dependency for iputils
[profile/ivi/opensp.git] / include / EntityApp.h
1 // Copyright (c) 1996 James Clark
2 // See the file COPYING for copying permission.
3
4 #ifndef EntityApp_INCLUDED
5 #define EntityApp_INCLUDED 1
6
7 #ifdef __GNUG__
8 #pragma interface
9 #endif
10
11 #include "CmdLineApp.h"
12 #include "CharsetInfo.h"
13 #include "Boolean.h"
14 #include "ExtendEntityManager.h"
15
16 #ifdef SP_NAMESPACE
17 namespace SP_NAMESPACE {
18 #endif
19
20 class SP_API EntityApp : public CmdLineApp {
21 public:
22   EntityApp(const char *requiredInternalCode = 0);
23   void processOption(AppChar opt, const AppChar *arg);
24   virtual int processSysid(const StringC &) = 0;
25   int processArguments(int argc, AppChar **files);
26   Boolean makeSystemId(int nFiles, AppChar *const *files, StringC &result);
27   Ptr<ExtendEntityManager> &entityManager();
28 protected:
29   void clearEntityManager();
30 private:
31   Vector<const AppChar *> searchDirs_;
32   Vector<const AppChar *> catalogSysids_;
33   Boolean mapCatalogDocument_;
34   Boolean restrictFileReading_;
35   Ptr<ExtendEntityManager> entityManager_;
36 };
37
38 inline
39 void EntityApp::clearEntityManager()
40 {
41   resetCodingSystemKit();
42   entityManager_.clear();
43 }
44     
45 #ifdef SP_NAMESPACE
46 }
47 #endif
48
49 #endif /* not EntityApp_INCLUDED */