Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
ProtocolReaderABF2.hpp
Go to the documentation of this file.
1//***********************************************************************************************
2//
3// Copyright (c) 2005 Molecular Devices Corporation.
4// All rights reserved.
5// Permission is granted to freely to use, modify and copy the code in this file.
6//
7//***********************************************************************************************
8
9#ifndef INC_ABF2PROTOCOLREADER_H
10#define INC_ABF2PROTOCOLREADER_H
11
12#include "abf2headr.h"
13#include "SimpleStringCache.hpp"
14#include "ProtocolStructs.h" // Struct definitions for actual file contents
17#if (__cplusplus < 201103)
18 #include <boost/shared_ptr.hpp>
19#else
20 #include <memory>
21#endif
22
23//===============================================================================================
25{
26 private:
27 ABF2_FileInfo m_FileInfo;
28 CSimpleStringCache m_Strings; // The string writing object.
29 CFileDescriptor* m_pFI;
30 int nFile;
31#if (__cplusplus < 201103)
32 boost::shared_ptr<ABF2FileHeader> m_pFH;
33#else
34 std::shared_ptr<ABF2FileHeader> m_pFH;
35#endif
36
37 BOOL ReadFileInfo();
38 BOOL ReadProtocolInfo();
39 BOOL ReadADCInfo();
40 BOOL ReadDACInfo();
41 BOOL ReadEpochs();
42 BOOL ReadStats();
43 BOOL ReadUserList();
44 BOOL ReadMathInfo();
45
46 BOOL GetString( UINT uIndex, LPSTR pszText, UINT uBufSize );
47
48 public:
51
52 virtual BOOL Open( LPCTSTR fName );
53 virtual BOOL Close( );
54
55 static BOOL CanOpen( const void *pFirstBlock, UINT uBytes );
56
57 virtual BOOL Read( int* pnError);
58 virtual const ABF2_FileInfo *GetFileInfo() const { return &m_FileInfo; }
59 virtual const ABF2FileHeader* GetFileHeader() const { return m_pFH.get(); }
60 virtual ABF2FileHeader* GetFileHeaderW() { return m_pFH.get(); }
61 virtual int GetFileNumber() const { return nFile; }
62 // virtual BOOL ValidateCRC();
63};
64
65#endif // INC_ABF2PROTOCOLREADER_H
virtual int GetFileNumber() const
static BOOL CanOpen(const void *pFirstBlock, UINT uBytes)
virtual BOOL Close()
virtual const ABF2_FileInfo * GetFileInfo() const
virtual const ABF2FileHeader * GetFileHeader() const
virtual BOOL Read(int *pnError)
virtual ABF2FileHeader * GetFileHeaderW()
virtual BOOL Open(LPCTSTR fName)
virtual ~CABF2ProtocolReader()
int BOOL
Definition unix.h:49
unsigned int UINT
Definition unix.h:47
CHAR * LPSTR
Definition unix.h:93
LPCSTR LPCTSTR
Definition unix.h:130