Emotiv EPOC plugin 1.0

D:/SVN/Scol/trunk/plugins/Epoc/src/Profile.h

00001 //###################################################################################
00002 //#                                                             Definition Of Class Profile                                                                         #
00003 //#                                               Used to create a binary handle to handle a user profile             #
00004 //#                                                                       Author :                                                                            #
00005 //#                                                                   Aymeric SUTEAU                                                                                    #
00006 //#                                                                    LISA - ANGERS                                                                                    #
00007 //###################################################################################
00008 
00009 
00010 // Includes for streams (input and output)
00011 #include <fstream>
00012 #include <iostream>
00013 #include <sstream>
00014 using namespace std;
00015 
00016 // Include Scol Library
00017 #include <scol.h>
00018 
00019 
00020 // Class definition
00021 class Profile
00022 {
00023   public:
00024     // Constructor / Destructor
00025     Profile(char*);
00026     ~Profile(void);
00027 
00028     // Get the status of the binary file
00029     bool IsReadable(const string& file);
00030 
00031     // Write data to file
00032     void WriteString(string);
00033     void WriteBinaryData(char*, unsigned int);
00034 
00035     // Read data from file
00036     bool ReadBinaryData();
00037 
00038     // Get / Set filename
00039     char* GetFileName();
00040     void SetFileName(char*);
00041 
00042     // Get / Set binary file size and data
00043     int GetFileLength();
00044     void SetFileLength(int);
00045     char* GetFileData();
00046     void SetFileData(char*);
00047 
00048   protected:
00049     ofstream oFile;     // File object for writing
00050     fstream ioFile;     // File object for reading / writing
00051     char* sFileName;    // Log file name
00052     int iFileSize;      // File size
00053     char* sFileData;    // File binary data
00054 };