//###################################################################################
//#						                Definition Of Class Profile								            #
//#						  Used to create a binary handle to handle a user profile             #
//#						                          Author : 							                      #
//#						                      Aymeric SUTEAU									                #
//#						                       LISA - ANGERS									                #
//###################################################################################


// Includes for streams (input and output)
#include <fstream>
#include <iostream>
#include <sstream>
using namespace std;

// Include Scol Library
#include <scol.h>


// Class definition
class Profile
{
  public:
    // Constructor / Destructor
    Profile(char*);
    ~Profile(void);

    // Get the status of the binary file
    bool IsReadable(const string& file);

    // Write data to file
    void WriteString(string);
    void WriteBinaryData(char*, unsigned int);

    // Read data from file
    bool ReadBinaryData();

    // Get / Set filename
    char* GetFileName();
    void SetFileName(char*);

    // Get / Set binary file size and data
    int GetFileLength();
    void SetFileLength(int);
    char* GetFileData();
    void SetFileData(char*);

  protected:
    ofstream oFile;     // File object for writing
    fstream ioFile;     // File object for reading / writing
    char* sFileName;    // Log file name
    int iFileSize;      // File size
    char* sFileData;    // File binary data
};
