iipsrv  0.9.9
DSOImage.h
1 
2 /* IIP fcgi server module
3 
4  Copyright (C) 2000-2003 Ruven Pillay.
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20 
21 
22 #ifdef ENABLE_DL
23 
24 #ifndef _DSOIMAGE_H
25 #define _DSOIMAGE_H
26 
27 
28 #include <string>
29 #include "IIPImage.h"
30 
31 
33 
34 
35 class DSOImage : public IIPImage{
36 
37  private:
38 
40  std::string modulePath;
41 
43  std::string description;
44 
46  void *libHandle;
47 
49  void loadLibrary() throw (std::string);
50 
52  void unloadLibrary() throw (std::string);
53 
55  std::string getError();
56 
57 
58  public:
59 
61  DSOImage() : IIPImage() {
62  libHandle = NULL;
63  tile_width = 0; tile_height = 0;
64  numResolutions = 0;
65  };
66 
68 
70  DSOImage( const std::string& s ) : IIPImage( s ) {
71  libHandle = NULL;
72  tile_width = 0; tile_height = 0;
73  numResolutions = 0;
74  };
75 
77 
79  DSOImage( const IIPImage& image ) : IIPImage( image ) {
80  libHandle = NULL;
81  tile_width = 0; tile_height = 0;
82  numResolutions = 0;
83  };
84 
86  ~DSOImage();
87 
88 
90  const std::string& getDescription() { return description; };
91 
93 
95  void Load( const std::string& p ) throw (std::string);
96 
98  void openImage() throw (std::string);
99 
101  void closeImage() throw (std::string);
102 
103 
105 
110  RawTile getTile( int x, int y, int r, int t ) throw (std::string);
111 
112 
113 };
114 
115 
116 #endif
117 
118 #endif