KVIrc 5.2.6
Developer APIs
KviFile.h
Go to the documentation of this file.
1#ifndef _KVI_FILE_H_
2#define _KVI_FILE_H_
3//=============================================================================
4//
5// File : KviFile.h
6// Creation date : Mon Dec 17 2001 00:05:04 by Szymon Stefanek
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net)
10//
11// This program is FREE software. You can redistribute it and/or
12// modify it under the terms of the GNU General Public License
13// as published by the Free Software Foundation; either version 2
14// of the License, or (at your option) any later version.
15//
16// This program is distributed in the HOPE that it will be USEFUL,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19// See the GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program. If not, write to the Free Software Foundation,
23// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24//
25//=============================================================================
26
32
33#include "kvi_settings.h"
34#include "KviHeapObject.h"
35#include "KviPointerList.h"
36#include "kvi_inttypes.h"
37
38#include <QFile>
39
40class KviCString;
41class QByteArray;
42
43#define kvi_file_offset_t qlonglong
44
49class KVILIB_API KviFile : public QFile, public KviHeapObject
50{
51public:
56 KviFile();
57
63 KviFile(const QString & szName);
64
69
70public:
77 bool save(kvi_u64_t file);
78
85 bool save(kvi_i64_t file) { return save((kvi_u64_t)file); };
86
93 bool save(kvi_u32_t file);
94
101 bool save(kvi_i32_t file) { return save((kvi_u32_t)file); };
102
109 bool save(kvi_u16_t file);
110
117 bool save(kvi_i16_t file) { return save((kvi_u16_t)file); };
118
125 bool save(kvi_u8_t file);
126
133 bool save(kvi_i8_t file) { return save((kvi_u8_t)file); };
134
141 bool save(const KviCString & szData);
142
149 bool save(const QByteArray & data);
150
157 bool save(const QString & szData);
158
165 bool save(KviPointerList<KviCString> * pData);
166
173 bool load(kvi_u64_t & file);
174
181 bool load(kvi_i64_t & file) { return load((kvi_u64_t &)file); };
182
189 bool load(kvi_u32_t & file);
190
197 bool load(kvi_i32_t & file) { return load((kvi_u32_t &)file); };
198
205 bool load(kvi_u16_t & file);
206
213 bool load(kvi_i16_t & file) { return load((kvi_u16_t &)file); };
214
221 bool load(kvi_u8_t & file);
222
229 bool load(kvi_i8_t & file) { return load((kvi_u8_t &)file); };
230
237 bool load(KviCString & szData);
238
245 bool load(QByteArray & data);
246
253 bool load(QString & szData);
254
261 bool load(KviPointerList<KviCString> * pData);
262
269 bool skipFirst(char t, unsigned int uMaxDist = 0xffffffff);
270
277 bool skipFirst(const KviCString & szText, unsigned int uMaxDist = 0xffffffff);
278};
279
280#endif //_KVI_FILE_H_
Heap Object.
C++ Template based double linked pointer list class.
Definition KviCString.h:102
~KviFile()
Destroys file object.
bool save(kvi_i64_t file)
Saves a file.
Definition KviFile.h:85
bool load(kvi_i64_t &file)
Loads a file.
Definition KviFile.h:181
bool load(kvi_i8_t &file)
Loads a file.
Definition KviFile.h:229
bool save(kvi_i32_t file)
Saves a file.
Definition KviFile.h:101
bool load(kvi_i16_t &file)
Loads a file.
Definition KviFile.h:213
KviFile()
Constructs file object.
Definition KviFile.cpp:32
bool save(kvi_i16_t file)
Saves a file.
Definition KviFile.h:117
bool load(kvi_i32_t &file)
Loads a file.
Definition KviFile.h:197
bool save(kvi_i8_t file)
Saves a file.
Definition KviFile.h:133
bool save(kvi_u64_t file)
Saves a file.
Definition KviFile.cpp:66
Definition KviHeapObject.h:119
A template double linked list of pointers.
Definition KviPointerList.h:371
#define t
Definition detector.cpp:85
long long int kvi_i64_t
SYSTEM_SIZE_OF_SHORT_INT.
Definition kvi_inttypes.h:65
unsigned char kvi_u8_t
Definition kvi_inttypes.h:100
char kvi_i8_t
Definition kvi_inttypes.h:99
unsigned long long int kvi_u64_t
Definition kvi_inttypes.h:66
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124