~ubuntu-branches/ubuntu/raring/notecase/raring

« back to all changes in this revision

Viewing changes to src/lib/IOProcess.h

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Handler
  • Date: 2008-12-21 13:09:58 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081221130958-0ri77h0x7j1dclkq
Tags: 1.9.8-0ubuntu1
New upstream release (LP: #307752)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
////////////////////////////////////////////////////////////////////////////
2
 
// NoteCase notes manager project <http://notecase.sf.net>
3
 
//
4
 
// This code is licensed under BSD license.See "license.txt" for more details.
5
 
//
6
 
// File: Implements content reading/writing with multiple layers of processing
7
 
////////////////////////////////////////////////////////////////////////////
8
 
 
9
 
#ifndef IOProcess_H__
10
 
#define IOProcess_H__
11
 
 
12
 
#if _MSC_VER > 1000
13
 
#pragma once
14
 
#endif // _MSC_VER > 1000
15
 
 
16
 
#include "IOLayerBase.h"
17
 
#include <vector>
18
 
 
19
 
class IOProcess
20
 
{
21
 
public:
22
 
        IOProcess(int nMode);
23
 
        virtual ~IOProcess();
24
 
 
25
 
        void PushLayer(IOLayerBase *layer);
26
 
        void CleanLayerList();
27
 
 
28
 
        int Read(char *szBuffer, int nLen, bool &bContinue);
29
 
        int Write(const char *szBuffer, int nLen);
30
 
        int WriteString(const char *szBuffer);
31
 
        int Finalize();
32
 
 
33
 
        unsigned char *GetLastLayerData();
34
 
 
35
 
protected:
36
 
        std::vector<IOLayerBase *> m_lstLayers;
37
 
        int m_nMode;
38
 
};
39
 
 
40
 
#endif // FILE64TRANSFORM_H__
 
1
////////////////////////////////////////////////////////////////////////////
 
2
// NoteCase notes manager project <http://notecase.sf.net>
 
3
//
 
4
// This code is licensed under BSD license.See "license.txt" for more details.
 
5
//
 
6
// File: Implements content reading/writing with multiple layers of processing
 
7
////////////////////////////////////////////////////////////////////////////
 
8
 
 
9
#ifndef IOProcess_H__
 
10
#define IOProcess_H__
 
11
 
 
12
#if _MSC_VER > 1000
 
13
#pragma once
 
14
#endif // _MSC_VER > 1000
 
15
 
 
16
#include "IOLayerBase.h"
 
17
#include <vector>
 
18
 
 
19
class IOProcess
 
20
{
 
21
public:
 
22
        IOProcess(int nMode);
 
23
        virtual ~IOProcess();
 
24
 
 
25
        void PushLayer(IOLayerBase *layer);
 
26
        void CleanLayerList();
 
27
 
 
28
        int Read(char *szBuffer, int nLen, bool &bContinue);
 
29
        int Write(const char *szBuffer, int nLen);
 
30
        int WriteString(const char *szBuffer);
 
31
        int Finalize();
 
32
 
 
33
        unsigned char *GetLastLayerData();
 
34
 
 
35
protected:
 
36
        std::vector<IOLayerBase *> m_lstLayers;
 
37
        int m_nMode;
 
38
};
 
39
 
 
40
#endif // FILE64TRANSFORM_H__