[sword-cvs] sword/bindings/swig swmgr.i,1.4,1.5

sword@www.crosswire.org sword@www.crosswire.org
Sun, 23 Feb 2003 23:59:18 -0700


Update of /usr/local/cvsroot/sword/bindings/swig
In directory www:/tmp/cvs-serv12030

Modified Files:
	swmgr.i 
Log Message:
improved swmgr.i a bit

Index: swmgr.i
===================================================================
RCS file: /usr/local/cvsroot/sword/bindings/swig/swmgr.i,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** swmgr.i	27 Nov 2002 21:20:35 -0000	1.4
--- swmgr.i	24 Feb 2003 06:59:15 -0000	1.5
***************
*** 11,16 ****
  public:
  //member data
- //  static bool debug;
- //  static const char *globalConfPath;
    static void findConfig (char *configType, char **prefixPath, char **configPath);
  
--- 11,14 ----
***************
*** 23,28 ****
  //member functions
    SWMgr (SWConfig* iconfig = 0, SWConfig* isysconfig = 0, bool autoload = true, SWFilterMgr* filterMgr = 0);
! //  SWMgr (SWFilterMgr *filterMgr);
! //  SWMgr (const char *iConfigPath, bool autoload = true, SWFilterMgr *filterMgr = 0);
    virtual ~SWMgr();
  
--- 21,25 ----
  //member functions
    SWMgr (SWConfig* iconfig = 0, SWConfig* isysconfig = 0, bool autoload = true, SWFilterMgr* filterMgr = 0);
!   SWMgr(const char *iConfigPath, bool autoload = true, SWFilterMgr *filterMgr = 0);
    virtual ~SWMgr();
  
***************
*** 34,42 ****
    virtual OptionsList getGlobalOptionValues (const char *option);
    virtual signed char setCipherKey (const char *modName, const char *key);
! 
  %extend {
!   SWModule* module(const char* modulename) {
!   	return self->Modules[modulename];
!   };
! }
  };
--- 31,59 ----
    virtual OptionsList getGlobalOptionValues (const char *option);
    virtual signed char setCipherKey (const char *modName, const char *key);
! 	
!   SWModule *getModule(const char *modName);
!   virtual void InstallScan(const char *dir);
!   
  %extend {
! 	const int moduleCount() {
! 		return self->Modules.size();
! 	}
! 	
! 	SWModule* getModuleAt( const int pos ) {
! 		if (pos < 0 || pos > self->Modules.size() )
! 			return 0;
! 	
! 		ModMap::iterator it = self->Modules.begin(); 
! 		
! 		for (int i = 0; i < pos; ++i) {
! 			it++;
! 		}
! 
! 		if ( it != self->Modules.end() ) {
! 			return (*it).second;
! 		}
! 		
! 		return 0;
! 	}
! } 
  };