| 1 |
/* --------------------------------------------------------------------- */ |
| 2 |
/* NeuroManager - A spike train analysis tool */ |
| 3 |
/* Copyright (c) 2005-2006 RIKEN, Japan. All rights reserved. */ |
| 4 |
/* http://satellite.sourceforge.jp/ */ |
| 5 |
/* --------------------------------------------------------------------- */ |
| 6 |
/* This program is free software; you can redistribute it and/or */ |
| 7 |
/* modify it under the terms of the GNU General Public License */ |
| 8 |
/* as published by the Free Software Foundation; either version 2 */ |
| 9 |
/* of the License, or (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; see the file COPYING.txt. If not, write */ |
| 18 |
/* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth */ |
| 19 |
/* Floor, Boston, MA 02110-1301, USA. */ |
| 20 |
/* --------------------------------------------------------------------- */ |
| 21 |
|
| 22 |
/* $Id: MCDataManager.h,v 1.6 2006/03/20 09:13:02 orrisroot Exp $ */ |
| 23 |
|
| 24 |
// MCDataManager.h : interface of the CMCDataManager class |
| 25 |
// |
| 26 |
|
| 27 |
#pragma once |
| 28 |
|
| 29 |
#define ID_MCDATAFILE_OPEN_CMD01 48000 |
| 30 |
|
| 31 |
class CMCDataManager |
| 32 |
{ |
| 33 |
private: |
| 34 |
typedef const char *( *mcdata_title_func_t ) (); |
| 35 |
typedef const char *( *mcdata_filter_func_t ) (); |
| 36 |
typedef CMultiChannelData *( *mcdata_create_func_t ) (); |
| 37 |
typedef struct _plugin_info |
| 38 |
{ |
| 39 |
HMODULE library; |
| 40 |
mcdata_title_func_t title_func; |
| 41 |
mcdata_filter_func_t filter_func; |
| 42 |
mcdata_create_func_t create_func; |
| 43 |
sl4_file_t *file; |
| 44 |
} |
| 45 |
plugin_info; |
| 46 |
|
| 47 |
// maximun number of file types |
| 48 |
static int m_iMaxFileTypes; |
| 49 |
|
| 50 |
sl4_array_t *m_arDataType; |
| 51 |
sl4_file_t *m_dirPlugin; |
| 52 |
|
| 53 |
plugin_info *pinfo_new( const char *path ); |
| 54 |
BOOL pinfo_delete( plugin_info *pinfo ); |
| 55 |
|
| 56 |
BOOL CreateDataTypeArray(); |
| 57 |
BOOL DeleteDataTypeArray(); |
| 58 |
BOOL AddDataTypeArray( const char *path ); |
| 59 |
BOOL InitPluginDirectory(); |
| 60 |
BOOL CleanPluginDirectory(); |
| 61 |
BOOL FindDataPlugins(); |
| 62 |
public: |
| 63 |
CMCDataManager(); |
| 64 |
~CMCDataManager(); |
| 65 |
BOOL Initialize(); |
| 66 |
CMultiChannelData *CreateInstance( size_t n ); |
| 67 |
BOOL InstallFileOpenMenu( CMenu *hMenu ); |
| 68 |
BOOL GetPluginTitle( size_t n, char *buf, size_t buflen ); |
| 69 |
|
| 70 |
static int GetMaxFileTypes() |
| 71 |
{ |
| 72 |
return m_iMaxFileTypes; |
| 73 |
} |
| 74 |
}; |