PFileStream.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2018 Digital Barriers plc. All rights reserved.
3  * Contact: http://www.digitalbarriers.com/
4  *
5  * This file is part of the Papillon SDK.
6  *
7  * You can't use, modify or distribute any part of this file without
8  * the explicit written agreements of Digital Barriers.
9  */
10 
15 #pragma once
16 #include <PByteStream.h>
17 
18 PAPILLON_BEGIN_NAMESPACE
19 
24 class PAPILLON_API_CORE PFileStream : public PByteStream
25 {
26 public:
31  {
32  E_APPEND = 0x01,
33  E_READ = 0x02,
34  E_WRITE = 0x04,
35  E_TRUNC = 0x08,
36  E_REWRITE = 0x10
37  };
38 
39 public:
45  PFileStream();
46 
59  static PResult Open(const PString& filename, int openFlags, PFileStream& fileStream);
60 
64  PFileStream(const PFileStream& other);
65 
69  virtual ~PFileStream();
70 
74  PFileStream& operator=(const PFileStream& other);
75 
76 private:
77  PFileStream(const PString&, void*);
78 };
79 
80 PAPILLON_END_NAMESPACE
The PFileStream class is a PByteStream whose backing store is a binary file.
Definition: PFileStream.h:24
The PString class provides an Unicode character strings.
Definition: PString.h:37
PByteStream & operator=(const PByteStream &other)
Performs a shared copy of other to this object.
The PResult class represents the result returned by most of Papillon functions; this class is used to...
Definition: PResult.h:159
The PByteStream class is a generic byte stream (can be a memory stream or a file stream).
Definition: PByteStream.h:69
EOpenFlags
All the available file opening flags.
Definition: PFileStream.h:30
Class PByteStream: a generic view of a sequence of bytes.