modernize-use-override_fixes.diff

The example of applied modernize-use-override fixes - Sender Ghost, 10/15/2019 02:08 PM

Download (33.7 KB)

View differences:

uppsrc/Core/Convert.h
52 52

  
53 53
class ConvertInt : public Convert {
54 54
public:
55
	virtual Value Scan(const Value& text) const;
56
	virtual int   Filter(int chr) const;
55
	Value Scan(const Value& text) const override;
56
	int   Filter(int chr) const override;
57 57

  
58 58
protected:
59 59
	int64 minval, maxval;
......
96 96

  
97 97
class ConvertDouble : public Convert {
98 98
public:
99
	virtual Value Format(const Value& q) const;
100
	virtual Value Scan(const Value& text) const;
101
	virtual int   Filter(int chr) const;
99
	Value Format(const Value& q) const override;
100
	Value Scan(const Value& text) const override;
101
	int   Filter(int chr) const override;
102 102

  
103 103
protected:
104 104
	double      minval, maxval;
......
128 128

  
129 129
class ConvertDate : public Convert {
130 130
public:
131
	virtual Value Format(const Value& q) const;
132
	virtual Value Scan(const Value& text) const;
133
	virtual int   Filter(int chr) const;
131
	Value Format(const Value& q) const override;
132
	Value Scan(const Value& text) const override;
133
	int   Filter(int chr) const override;
134 134

  
135 135
protected:
136 136
	Date minval, maxval, defaultval;
......
162 162

  
163 163
class ConvertTime : public Convert {
164 164
public:
165
	virtual Value Scan(const Value& text) const;
166
	virtual int   Filter(int chr) const;
167
	virtual Value Format(const Value& q) const;
165
	Value Scan(const Value& text) const override;
166
	int   Filter(int chr) const override;
167
	Value Format(const Value& q) const override;
168 168

  
169 169
protected:
170 170
	Time minval, maxval, defaultval;
......
196 196
	static Time  GetDefaultMax()                   { return ToTime(ConvertDate::GetDefaultMax()); }
197 197

  
198 198
	ConvertTime(Time minval = ToTime(Date::Low()), Time maxval = ToTime(Date::High()), bool notnull = false);
199
	virtual ~ConvertTime();
199
	~ConvertTime() override;
200 200
};
201 201

  
202 202
const ConvertTime& StdConvertTime();
......
204 204

  
205 205
class ConvertString : public Convert {
206 206
public:
207
	virtual Value Scan(const Value& text) const;
207
	Value Scan(const Value& text) const override;
208 208

  
209 209
protected:
210 210
	int  maxlen;
......
233 233
public:
234 234
	NoConvertClass();
235 235

  
236
	virtual Value  Format(const Value& q) const;
236
	Value  Format(const Value& q) const override;
237 237
};
238 238

  
239 239
const NoConvertClass& NoConvert();
240 240

  
241 241
class ErrorConvertClass : public Convert {
242 242
public:
243
	Value Scan(const Value& v) const;
243
	Value Scan(const Value& v) const override;
244 244
};
245 245

  
246 246
const ErrorConvertClass& ErrorConvert();
247 247

  
248 248
class MapConvert : public Convert {
249 249
public:
250
	virtual Value  Format(const Value& q) const;
250
	Value  Format(const Value& q) const override;
251 251

  
252 252
protected:
253 253
	VectorMap<Value, Value> map;
......
264 264
	const Value& GetValue(int i) const                   { return map[i]; }
265 265
	const Value& operator[](int i) const                 { return map[i]; }
266 266

  
267
	virtual ~MapConvert() {}
267
	~MapConvert() override {}
268 268
};
269 269

  
270 270
class JoinConvert : public Convert {
271 271
public:
272
	virtual Value Format(const Value& v) const;
272
	Value Format(const Value& v) const override;
273 273

  
274 274
protected:
275 275
	struct Item {
......
291 291

  
292 292
class FormatConvert : public Convert {
293 293
public:
294
	virtual Value Format(const Value& v) const;
294
	Value Format(const Value& v) const override;
295 295

  
296 296
private:
297 297
	String format;
uppsrc/Core/FilterStream.h
1 1
class InFilterStream : public Stream {
2 2
public:
3
	virtual   bool  IsOpen() const;
3
	  bool  IsOpen() const override;
4 4

  
5 5
protected:
6
	virtual   int   _Term();
7
	virtual   int   _Get();
8
	virtual   dword _Get(void *data, dword size);
6
	  int   _Term() override;
7
	  int   _Get() override;
8
	  dword _Get(void *data, dword size) override;
9 9

  
10 10
	Vector<byte> buffer;
11 11
	bool         eof;
......
18 18
	void   Fetch();
19 19

  
20 20
private:
21
	void   SetSize(int64 size)  { NEVER(); } // removed
22
	int64  GetSize() const      { NEVER(); return 0; }
21
	void   SetSize(int64 size) override  { NEVER(); } // removed
22
	int64  GetSize() const override      { NEVER(); return 0; }
23 23

  
24 24
public:
25 25
	Stream                      *in;
......
48 48

  
49 49
class OutFilterStream : public Stream {
50 50
public:
51
	virtual   void  Close();
52
	virtual   bool  IsOpen() const;
51
	  void  Close() override;
52
	  bool  IsOpen() const override;
53 53

  
54 54
protected:
55
	virtual   void  _Put(int w);
56
	virtual   void  _Put(const void *data, dword size);
55
	  void  _Put(int w) override;
56
	  void  _Put(const void *data, dword size) override;
57 57

  
58 58
	Buffer<byte> buffer;
59 59
	int64        count;
......
84 84
	
85 85
	OutFilterStream();
86 86
	template <class F> OutFilterStream(Stream& in, F& filter) { Set(in, filter); }
87
	~OutFilterStream();
87
	~OutFilterStream() override;
88 88
};
uppsrc/Core/Function.h
14 14
	template <class F>
15 15
	struct Wrapper : WrapperBase {
16 16
		F fn;
17
		virtual Res Execute(ArgTypes... args) { return fn(args...); }
17
		Res Execute(ArgTypes... args) override { return fn(args...); }
18 18

  
19 19
		Wrapper(F&& fn) : fn(pick(fn)) {}
20 20
	};
......
24 24
		Function l;
25 25
		F        fn;
26 26

  
27
		virtual Res Execute(ArgTypes... args) { l(args...); return fn(args...); }
27
		Res Execute(ArgTypes... args) override { l(args...); return fn(args...); }
28 28

  
29 29
		Wrapper2(const Function& l, F&& fn) : l(l), fn(pick(fn)) {}
30 30
		Wrapper2(const Function& l, const F& fn) : l(l), fn(fn) {}
uppsrc/Core/Hash.h
11 11
class Md5Stream : public OutStream {
12 12
	UPP_MD5_CTX context;
13 13

  
14
	virtual  void  Out(const void *data, dword size);
14
	 void  Out(const void *data, dword size) override;
15 15

  
16 16
public:
17 17
	void   Finish(byte *hash16);
......
20 20
	void   Reset();
21 21
	
22 22
	Md5Stream();
23
	~Md5Stream();
23
	~Md5Stream() override;
24 24
};
25 25

  
26 26
void    MD5(byte *hash16, const void *data, dword size);
......
39 39
class Sha1Stream : public OutStream {
40 40
	UPP_SHA1_CTX ctx[1];
41 41

  
42
	virtual  void  Out(const void *data, dword size);
42
	 void  Out(const void *data, dword size) override;
43 43

  
44 44
	void  Cleanup()                      { memset(ctx, 0, sizeof(ctx)); }
45 45

  
......
52 52
	void   New()                         { Reset(); }
53 53
	
54 54
	Sha1Stream();
55
	~Sha1Stream();
55
	~Sha1Stream() override;
56 56
};
57 57

  
58 58
void    SHA1(byte *hash20, const void *data, dword size);
......
65 65
class Sha256Stream : public OutStream {
66 66
	byte  buffer[128];
67 67

  
68
	virtual  void  Out(const void *data, dword size);
68
	 void  Out(const void *data, dword size) override;
69 69

  
70 70
	void  Cleanup();
71 71

  
......
78 78
	void   New()                         { Reset(); }
79 79
	
80 80
	Sha256Stream(); 
81
	~Sha256Stream();
81
	~Sha256Stream() override;
82 82
};
83 83

  
84 84
void    SHA256(byte *hash20, const void *data, dword size);
......
91 91
class xxHashStream : public OutStream {
92 92
	byte context[8 * 8];
93 93
	
94
	virtual  void  Out(const void *data, dword size);
94
	 void  Out(const void *data, dword size) override;
95 95

  
96 96
public:
97 97
	int Finish();
......
107 107
class xxHash64Stream : public OutStream {
108 108
	byte context[12 * 8];
109 109
	
110
	virtual  void  Out(const void *data, dword size);
110
	 void  Out(const void *data, dword size) override;
111 111

  
112 112
public:
113 113
	int64 Finish();
uppsrc/Core/InVector.h
622 622
	InVector<T> data;
623 623
	T *res;
624 624
      
625
	virtual void Clear()                          { data.Clear(); }
626
	virtual void Count(int n)                     { data.count += n; }
627
	virtual void Insert(int blki, int pos);
628
	virtual void Split(int blki, int nextsize);
629
	virtual void AddFirst();
630
	virtual void RemoveBlk(int blki, int n)       { data.data.Remove(blki, n); }
631
	virtual void Join(int blki)                   { data.Join(blki); }
632
	virtual void Remove(int blki, int pos, int n) { data.data[blki].Remove(pos, n); }
633
	virtual void Index(int blki, int n)           { data.Index(blki, n); }
634
	virtual void Reindex()                        { data.Reindex(); }
625
	void Clear() override                          { data.Clear(); }
626
	void Count(int n) override                     { data.count += n; }
627
	void Insert(int blki, int pos) override;
628
	void Split(int blki, int nextsize) override;
629
	void AddFirst() override;
630
	void RemoveBlk(int blki, int n) override       { data.data.Remove(blki, n); }
631
	void Join(int blki) override                   { data.Join(blki); }
632
	void Remove(int blki, int pos, int n) override { data.data[blki].Remove(pos, n); }
633
	void Index(int blki, int n) override           { data.Index(blki, n); }
634
	void Reindex() override                        { data.Reindex(); }
635 635
//	virtual void Serialize(Stream& s)             { data.Serialize(s); }
636
	virtual void Shrink()                         { data.Shrink(); }
636
	void Shrink() override                         { data.Shrink(); }
637 637

  
638 638
	T& Get(int blki, int i) const                 { return *(T*)&data.data[blki][i]; }
639 639
};
......
700 700
	InArray<T> data;
701 701
	T         *res;
702 702
      
703
	virtual void Clear()                          { data.Clear(); }
704
	virtual void Count(int n)                     { data.iv.count += n; }
705
	virtual void Insert(int blki, int pos);
706
	virtual void Split(int blki, int nextsize);
707
	virtual void AddFirst();
708
	virtual void RemoveBlk(int blki, int n)       { data.iv.data.Remove(blki, n); }
709
	virtual void Join(int blki)                   { data.iv.Join(blki); }
710
	virtual void Remove(int blki, int pos, int n);
711
	virtual void Index(int blki, int n)           { data.iv.Index(blki, n); }
712
	virtual void Reindex()                        { data.iv.Reindex(); }
703
	void Clear() override                          { data.Clear(); }
704
	void Count(int n) override                     { data.iv.count += n; }
705
	void Insert(int blki, int pos) override;
706
	void Split(int blki, int nextsize) override;
707
	void AddFirst() override;
708
	void RemoveBlk(int blki, int n) override       { data.iv.data.Remove(blki, n); }
709
	void Join(int blki) override                   { data.iv.Join(blki); }
710
	void Remove(int blki, int pos, int n) override;
711
	void Index(int blki, int n) override           { data.iv.Index(blki, n); }
712
	void Reindex() override                        { data.iv.Reindex(); }
713 713
//	virtual void Serialize(Stream& s)             { data.iv.Serialize(s); }
714
	virtual void Shrink()                         { data.iv.Shrink(); }
714
	void Shrink() override                         { data.iv.Shrink(); }
715 715

  
716 716
	T& Get(int blki, int i) const                 { return *(T*)data.iv.data[blki][i]; }
717 717
	T *Detach(int i)                              { T *x = data.iv[i]; data.iv[i] = NULL; return x; }
uppsrc/Core/Lang.cpp
129 129
#endif
130 130

  
131 131
class LangConvertClass : public Convert {
132
	virtual Value  Format(const Value& q) const {
132
	Value  Format(const Value& q) const override {
133 133
		return LNGAsText((int)q);
134 134
	}
135 135

  
136
	virtual Value  Scan(const Value& text) const {
136
	Value  Scan(const Value& text) const override {
137 137
		if(IsNull(text)) return 0;
138 138
		int q = LNGFromText((String)text);
139 139
		if(!q) return ErrorValue(t_("Invalid language specification."));
140 140
		return (int) q;
141 141
	}
142 142

  
143
	virtual int    Filter(int chr) const {
143
	int    Filter(int chr) const override {
144 144
		return chr == ' ' || chr == '-' || IsDigit(chr) ? chr : IsAlpha(chr) ? ToUpper(chr) : 0;
145 145
	}
146 146
};
uppsrc/Core/LocalProcess.h
19 19

  
20 20
class LocalProcess : public AProcess {
21 21
public:
22
	virtual void Kill();
23
	virtual bool IsRunning();
24
	virtual void Write(String s);
25
	virtual bool Read(String& s);
26
	virtual bool Read2(String& os, String &es);
27
	virtual String GetExitMessage();
28
	virtual int  GetExitCode();
29
	virtual void CloseRead();
30
	virtual void CloseWrite();
31
	virtual void Detach();
22
	void Kill() override;
23
	bool IsRunning() override;
24
	void Write(String s) override;
25
	bool Read(String& s) override;
26
	bool Read2(String& os, String &es) override;
27
	String GetExitMessage() override;
28
	int  GetExitCode() override;
29
	void CloseRead() override;
30
	void CloseWrite() override;
31
	void Detach() override;
32 32

  
33 33
private:
34 34
	void         Init();
......
85 85
	LocalProcess()                                                                          { Init(); }
86 86
	LocalProcess(const char *cmdline, const char *envptr = NULL)                            { Init(); Start(cmdline, envptr); }
87 87
	LocalProcess(const char *cmdline, const Vector<String>& arg, const char *envptr = NULL) { Init(); Start(cmdline, arg, envptr); }
88
	virtual ~LocalProcess()                                                                 { Kill(); }
88
	~LocalProcess() override                                                                 { Kill(); }
89 89
};
90 90

  
91 91
int    Sys(const char *cmdline, String& out, bool convertcharset = true);
uppsrc/Core/Log.cpp
281 281

  
282 282
class LogStream : public Stream {
283 283
protected:
284
	virtual void    _Put(int w);
285
	virtual void    _Put(const void *data, dword size);
286
	virtual int64   GetSize() const;
284
	void    _Put(int w) override;
285
	void    _Put(const void *data, dword size) override;
286
	int64   GetSize() const override;
287 287

  
288 288
public:
289
	virtual   bool  IsOpen() const;
289
	  bool  IsOpen() const override;
290 290
};
291 291

  
292 292
int64 LogStream::GetSize() const
uppsrc/Core/Speller.cpp
283 283
struct SpellMaker : LRUCache<bool, SpellKey>::Maker {
284 284
	SpellKey k;
285 285
	
286
	SpellKey Key() const  { return k; }
287
	int    Make(bool& r) const {
286
	SpellKey Key() const override  { return k; }
287
	int    Make(bool& r) const override {
288 288
		r = SpellWordRaw(k.wrd, k.lang);
289 289
		return 1;
290 290
	}
uppsrc/Core/Stream.cpp
1203 1203
}
1204 1204

  
1205 1205
struct NilStreamClass : public Stream {
1206
	virtual void    _Put(int w)    {}
1207
	virtual bool    IsOpen() const { return true; }
1208
	virtual   int   _Term()        { return -1; }
1209
	virtual   int   _Get()         { return -1; }
1206
	void    _Put(int w) override    {}
1207
	bool    IsOpen() const override { return true; }
1208
	  int   _Term() override        { return -1; }
1209
	  int   _Get() override         { return -1; }
1210 1210
};
1211 1211

  
1212 1212
Stream& NilStream()
......
1244 1244
		putchar(w);
1245 1245
#endif
1246 1246
	}
1247
	virtual void    _Put(int w) {
1247
	void    _Put(int w) override {
1248 1248
		if(w == '\n') {
1249 1249
#ifdef PLATFORM_WIN32
1250 1250
			Put0('\r');
......
1255 1255
		if(w != '\r')
1256 1256
			Put0(w);
1257 1257
	}
1258
	virtual   bool  IsOpen() const { return true; }
1258
	  bool  IsOpen() const override { return true; }
1259 1259
#ifdef PLATFORM_POSIX
1260
	virtual   void   Flush()       { fflush(stdout); }
1260
	  void   Flush() override       { fflush(stdout); }
1261 1261
#endif
1262 1262
};
1263 1263

  
......
1267 1267
}
1268 1268

  
1269 1269
class CerrStream : public Stream {
1270
	virtual void    _Put(int w) {
1270
	void    _Put(int w) override {
1271 1271
	#ifdef PLATFORM_WIN32
1272 1272
		static HANDLE h = GetStdHandle(STD_ERROR_HANDLE);
1273 1273
		char s[1];
......
1279 1279
	#endif
1280 1280
	}
1281 1281
#ifdef PLATFORM_POSIX
1282
	virtual   void  _Put(const void *data, dword size) {
1282
	  void  _Put(const void *data, dword size) override {
1283 1283
		fwrite(data, 1, size, stderr);
1284 1284
	}
1285 1285
#endif
1286
	virtual   bool  IsOpen() const { return true; }
1286
	  bool  IsOpen() const override { return true; }
1287 1287
};
1288 1288

  
1289 1289
Stream& Cerr()
uppsrc/Core/Stream.h
270 270

  
271 271
class StringStream : public Stream {
272 272
protected:
273
	virtual  void  _Put(int w);
274
	virtual  int   _Term();
275
	virtual  int   _Get();
276
	virtual  void  _Put(const void *data, dword size);
277
	virtual  dword _Get(void *data, dword size);
273
	 void  _Put(int w) override;
274
	 int   _Term() override;
275
	 int   _Get() override;
276
	 void  _Put(const void *data, dword size) override;
277
	 dword _Get(void *data, dword size) override;
278 278

  
279 279
public:
280
	virtual  void  Seek(int64 pos);
281
	virtual  int64 GetSize() const;
282
	virtual  void  SetSize(int64 size);
283
	virtual  bool  IsOpen() const;
280
	 void  Seek(int64 pos) override;
281
	 int64 GetSize() const override;
282
	 void  SetSize(int64 size) override;
283
	 bool  IsOpen() const override;
284 284

  
285 285
protected:
286 286
	bool           writemode;
......
312 312

  
313 313
class MemStream : public Stream {
314 314
protected:
315
	virtual   void  _Put(const void *data, dword size);
316
	virtual   dword _Get(void *data, dword size);
315
	  void  _Put(const void *data, dword size) override;
316
	  dword _Get(void *data, dword size) override;
317 317

  
318 318
public:
319
	virtual   void  Seek(int64 pos);
320
	virtual   int64 GetSize() const;
321
	virtual   bool  IsOpen() const;
319
	  void  Seek(int64 pos) override;
320
	  int64 GetSize() const override;
321
	  bool  IsOpen() const override;
322 322

  
323 323
public:
324 324
	void Create(void *data, int64 size);
......
337 337

  
338 338
class BlockStream : public Stream {
339 339
protected:
340
	virtual  void  _Put(int w);
341
	virtual  int   _Term();
342
	virtual  int   _Get();
343
	virtual  void  _Put(const void *data, dword size);
344
	virtual  dword _Get(void *data, dword size);
340
	 void  _Put(int w) override;
341
	 int   _Term() override;
342
	 int   _Get() override;
343
	 void  _Put(const void *data, dword size) override;
344
	 dword _Get(void *data, dword size) override;
345 345

  
346 346
public:
347
	virtual  void  Seek(int64 pos);
348
	virtual  int64 GetSize() const;
349
	virtual  void  SetSize(int64 size);
350
	virtual  void  Flush();
347
	 void  Seek(int64 pos) override;
348
	 int64 GetSize() const override;
349
	 void  SetSize(int64 size) override;
350
	 void  Flush() override;
351 351

  
352 352
private:
353 353
	int           pagesize;
......
385 385
	int64     GetStreamSize() const           { return streamsize; }
386 386

  
387 387
	BlockStream();
388
	virtual ~BlockStream();
388
	~BlockStream() override;
389 389

  
390 390
protected:
391 391
	void     OpenInit(dword mode, int64 file_size);
......
393 393

  
394 394
class FileStream : public BlockStream {
395 395
protected:
396
	virtual  void  SetStreamSize(int64 size);
397
	virtual  dword Read(int64 at, void *ptr, dword size);
398
	virtual  void  Write(int64 at, const void *data, dword size);
396
	 void  SetStreamSize(int64 size) override;
397
	 dword Read(int64 at, void *ptr, dword size) override;
398
	 void  Write(int64 at, const void *data, dword size) override;
399 399

  
400 400
public:
401
	virtual  void  Close();
402
	virtual  bool  IsOpen() const;
401
	 void  Close() override;
402
	 bool  IsOpen() const override;
403 403

  
404 404
protected:
405 405
#ifdef PLATFORM_WIN32
......
430 430
#endif
431 431

  
432 432
	FileStream();
433
	~FileStream();
433
	~FileStream() override;
434 434

  
435 435
#ifdef PLATFORM_WIN32
436 436
	HANDLE    GetHandle() const            { return handle; }
......
471 471

  
472 472
class SizeStream : public Stream {
473 473
protected:
474
	virtual void  _Put(int w);
475
	virtual void  _Put(const void *data, dword size);
474
	void  _Put(int w) override;
475
	void  _Put(const void *data, dword size) override;
476 476

  
477 477
public:
478
	virtual int64 GetSize() const;
479
	virtual bool  IsOpen() const;
478
	int64 GetSize() const override;
479
	bool  IsOpen() const override;
480 480

  
481 481
protected:
482 482
	byte    h[256];
......
491 491

  
492 492
class CompareStream : public Stream {
493 493
protected:
494
	virtual  void  _Put(int w);
495
	virtual  void  _Put(const void *data, dword size);
494
	 void  _Put(int w) override;
495
	 void  _Put(const void *data, dword size) override;
496 496

  
497 497
public:
498
	virtual  void  Seek(int64 pos);
499
	virtual  int64 GetSize() const;
500
	virtual  void  SetSize(int64 size);
501
	virtual  void  Close();
502
	virtual  bool  IsOpen() const;
503
	virtual  void  Flush();
498
	 void  Seek(int64 pos) override;
499
	 int64 GetSize() const override;
500
	 void  SetSize(int64 size) override;
501
	 void  Close() override;
502
	 bool  IsOpen() const override;
503
	 void  Flush() override;
504 504

  
505 505
private:
506 506
	Stream  *stream;
......
524 524
	byte *h;
525 525

  
526 526
protected:
527
	virtual  void  _Put(int w);
528
	virtual  void  _Put(const void *data, dword size);
529
	virtual  bool  IsOpen() const;
527
	 void  _Put(int w) override;
528
	 void  _Put(const void *data, dword size) override;
529
	 bool  IsOpen() const override;
530 530

  
531 531
	virtual  void  Out(const void *data, dword size) = 0;
532 532

  
533 533
public:
534
	virtual  void  Close();
534
	 void  Close() override;
535 535
	
536
	void     Flush();
536
	void     Flush() override;
537 537
	
538 538
	OutStream();
539
	~OutStream();
539
	~OutStream() override;
540 540
};
541 541

  
542 542
class TeeStream : public OutStream {
543 543
protected:
544
	virtual  void  Out(const void *data, dword size);
544
	 void  Out(const void *data, dword size) override;
545 545

  
546 546
private:
547 547
	Stream& a;
......
549 549

  
550 550
public:
551 551
	TeeStream(Stream& a, Stream& b) : a(a), b(b) {}
552
	~TeeStream()                                 { Close(); }
552
	~TeeStream() override                                 { Close(); }
553 553
};
554 554

  
555 555
class FileMapping
uppsrc/Core/Uuid.cpp
96 96

  
97 97
struct UuidValueGenClass : ValueGen
98 98
{
99
	virtual Value Get() {
99
	Value Get() override {
100 100
		return Format(Uuid::Create());
101 101
	}
102 102
};
uppsrc/Core/Value.cpp
721 721

  
722 722
class ValueErrorCls : public RichValueRep<String> {
723 723
public:
724
	virtual dword      GetType() const             { return ERROR_V; }
725
	virtual bool       IsNull() const              { return true; }
726
	virtual void       Serialize(Stream& s)        {}
727
	virtual String     AsString() const            { return "<error: \'" + v + "\'>"; }
724
	dword      GetType() const override             { return ERROR_V; }
725
	bool       IsNull() const override              { return true; }
726
	void       Serialize(Stream& s) override        {}
727
	String     AsString() const override            { return "<error: \'" + v + "\'>"; }
728 728

  
729 729
	ValueErrorCls(const String& s) : RichValueRep<String>(s)  {}
730 730
};
uppsrc/Core/Value.hpp
118 118
template <class T>
119 119
class RawValueRep : public Value::Void {
120 120
public:
121
	virtual dword GetType() const             { return GetValueTypeNo<T>(); }
122
	virtual bool  IsNull() const              { return false; }
121
	dword GetType() const override             { return GetValueTypeNo<T>(); }
122
	bool  IsNull() const override              { return false; }
123 123

  
124 124
	T v;
125 125

  
......
138 138
template <class T>
139 139
class RichValueRep : public RawValueRep<T> {
140 140
public:
141
	virtual bool       IsNull() const                { return UPP::IsNull(this->v); }
142
	virtual void       Serialize(Stream& s)          { s % this->v; }
143
	virtual void       Xmlize(XmlIO& xio)            { Upp::Xmlize(xio, this->v); }
144
	virtual void       Jsonize(JsonIO& jio)          { Upp::Jsonize(jio, this->v); }
145
	virtual unsigned   GetHashValue() const          { return UPP::ValueGetHashValue(this->v); }
146
	virtual bool       IsEqual(const Value::Void *p) { ASSERT(dynamic_cast<const RawValueRep<T> *>(p));
141
	bool       IsNull() const override                { return UPP::IsNull(this->v); }
142
	void       Serialize(Stream& s) override          { s % this->v; }
143
	void       Xmlize(XmlIO& xio) override            { Upp::Xmlize(xio, this->v); }
144
	void       Jsonize(JsonIO& jio) override          { Upp::Jsonize(jio, this->v); }
145
	unsigned   GetHashValue() const override          { return UPP::ValueGetHashValue(this->v); }
146
	bool       IsEqual(const Value::Void *p) override { ASSERT(dynamic_cast<const RawValueRep<T> *>(p));
147 147
	                                                   return static_cast<const RawValueRep<T> *>(p)->Get() == this->v; }
148
	virtual bool       IsPolyEqual(const Value& b)   { return UPP::IsPolyEqual(this->v, b); }
149
	virtual String     AsString() const              { return UPP::AsString(this->v); }
150
	virtual int        Compare(const Value::Void *p) { ASSERT(dynamic_cast<const RawValueRep<T> *>(p));
148
	bool       IsPolyEqual(const Value& b) override   { return UPP::IsPolyEqual(this->v, b); }
149
	String     AsString() const override              { return UPP::AsString(this->v); }
150
	int        Compare(const Value::Void *p) override { ASSERT(dynamic_cast<const RawValueRep<T> *>(p));
151 151
	                                                   return SgnCompare(this->v, static_cast<const RawValueRep<T> *>(p)->Get()); }
152
	virtual int        PolyCompare(const Value& b)   { return Upp::PolyCompare(this->v, b); }
152
	int        PolyCompare(const Value& b) override   { return Upp::PolyCompare(this->v, b); }
153 153

  
154 154
	RichValueRep(const T& v) : RawValueRep<T>(v)     {}
155 155
	RichValueRep()                                   {}
uppsrc/Core/ValueUtil.cpp
7 7
#define LTIMING(x) // RTIMING(x)
8 8

  
9 9
struct Ref::ValueRef : public RefManager {
10
	virtual int   GetType()                            { return VALUE_V; }
11
	virtual Value GetValue(const void *ptr)            { return *(Value *) ptr; }
12
	virtual bool  IsNull(const void *ptr)              { return UPP::IsNull(*(Value *) ptr); }
13
	virtual void  SetValue(void *ptr, const Value& v)  { *(Value *) ptr = v; }
14
	virtual void  SetNull(void *ptr)                   { *(Value *) ptr = Null; }
10
	int   GetType() override                            { return VALUE_V; }
11
	Value GetValue(const void *ptr) override            { return *(Value *) ptr; }
12
	bool  IsNull(const void *ptr) override              { return UPP::IsNull(*(Value *) ptr); }
13
	void  SetValue(void *ptr, const Value& v) override  { *(Value *) ptr = v; }
14
	void  SetNull(void *ptr) override                   { *(Value *) ptr = Null; }
15 15
};
16 16

  
17 17
Ref::Ref(String& s)  { ptr = &s; m = &Single< StdRef<String> >(); }
uppsrc/Core/ValueUtil.h
36 36
struct StdValueOrder : ValueOrder {
37 37
	int language;
38 38

  
39
	virtual bool operator()(const Value& a, const Value& b) const { return StdValueCompare(a, b, language) < 0; }
39
	bool operator()(const Value& a, const Value& b) const override { return StdValueCompare(a, b, language) < 0; }
40 40

  
41 41
	StdValueOrder(int l = -1) : language(l) {}
42 42
};
......
44 44
struct FnValueOrder : ValueOrder {
45 45
	int (*fn)(const Value& a, const Value& b);
46 46

  
47
	virtual bool operator()(const Value& a, const Value& b) const { return (*fn)(a, b) < 0; }
47
	bool operator()(const Value& a, const Value& b) const override { return (*fn)(a, b) < 0; }
48 48

  
49 49
	FnValueOrder(int (*fn)(const Value& a, const Value& b)) : fn(fn) {}
50 50
};
......
57 57
struct StdValuePairOrder : ValuePairOrder {
58 58
	int language;
59 59

  
60
	virtual bool operator()(const Value& keya, const Value& valuea, const Value& keyb, const Value& valueb) const;
60
	bool operator()(const Value& keya, const Value& valuea, const Value& keyb, const Value& valueb) const override;
61 61

  
62 62
	StdValuePairOrder(int l = -1);
63 63
};
......
65 65
struct FnValuePairOrder : ValuePairOrder {
66 66
	int (*fn)(const Value& k1, const Value& v1, const Value& k2, const Value& v2);
67 67

  
68
	virtual bool operator()(const Value& keya, const Value& valuea, const Value& keyb, const Value& valueb) const;
68
	bool operator()(const Value& keya, const Value& valuea, const Value& keyb, const Value& valueb) const override;
69 69

  
70 70
	FnValuePairOrder(int (*fn)(const Value& k1, const Value& v1, const Value& k2, const Value& v2)) : fn(fn) {}
71 71
};
......
103 103

  
104 104
template <class T>
105 105
struct StdRef : public RefManager {
106
	virtual void  SetValue(void *p, const Value& v) { *(T *) p = (T)v; }
107
	virtual Value GetValue(const void *p)           { return *(const T *) p; }
108
	virtual int   GetType()                         { return GetValueTypeNo<T>(); }
109
	virtual bool  IsNull(const void *p)             { return UPP::IsNull(*(T *) p); }
110
	virtual void  SetNull(void *p)                  { UPP::SetNull(*(T *)p); }
111
	virtual ~StdRef() {}
106
	void  SetValue(void *p, const Value& v) override { *(T *) p = (T)v; }
107
	Value GetValue(const void *p) override           { return *(const T *) p; }
108
	int   GetType() override                         { return GetValueTypeNo<T>(); }
109
	bool  IsNull(const void *p) override             { return UPP::IsNull(*(T *) p); }
110
	void  SetNull(void *p) override                  { UPP::SetNull(*(T *)p); }
111
	~StdRef() override {}
112 112
};
113 113

  
114 114
class Ref : Moveable<Ref> {
......
201 201

  
202 202
class ValueArray : public ValueType<ValueArray, VALUEARRAY_V, Moveable<ValueArray> > {
203 203
	struct Data : Value::Void {
204
		virtual dword        GetType() const             { return VALUEARRAY_V; }
205
		virtual bool         IsNull() const;
206
		virtual void         Serialize(Stream& s);
207
		virtual void         Xmlize(XmlIO& xio);
208
		virtual void         Jsonize(JsonIO& jio);
209
		virtual unsigned     GetHashValue() const;
210
		virtual bool         IsEqual(const Value::Void *p);
211
		virtual String       AsString() const;
212
		virtual int          Compare(const Value::Void *p);
204
		dword        GetType() const override             { return VALUEARRAY_V; }
205
		bool         IsNull() const override;
206
		void         Serialize(Stream& s) override;
207
		void         Xmlize(XmlIO& xio) override;
208
		void         Jsonize(JsonIO& jio) override;
209
		unsigned     GetHashValue() const override;
210
		bool         IsEqual(const Value::Void *p) override;
211
		String       AsString() const override;
212
		int          Compare(const Value::Void *p) override;
213 213

  
214 214
		int GetRefCount() const     { return refcount; }
215 215
		Vector<Value>& Clone();
......
304 304

  
305 305
class ValueMap : public ValueType<ValueMap, VALUEMAP_V, Moveable<ValueMap> >{
306 306
	struct Data : Value::Void {
307
		virtual dword      GetType() const             { return VALUEMAP_V; }
308
		virtual bool       IsNull() const;
309
		virtual void       Serialize(Stream& s);
310
		virtual void       Xmlize(XmlIO& xio);
311
		virtual void       Jsonize(JsonIO& jio);
312
		virtual unsigned   GetHashValue() const;
313
		virtual bool       IsEqual(const Value::Void *p);
314
		virtual String     AsString() const;
315
		virtual int        Compare(const Value::Void *p);
307
		dword      GetType() const override             { return VALUEMAP_V; }
308
		bool       IsNull() const override;
309
		void       Serialize(Stream& s) override;
310
		void       Xmlize(XmlIO& xio) override;
311
		void       Jsonize(JsonIO& jio) override;
312
		unsigned   GetHashValue() const override;
313
		bool       IsEqual(const Value::Void *p) override;
314
		String     AsString() const override;
315
		int        Compare(const Value::Void *p) override;
316 316

  
317 317
		const Value& Get(const Value& k) const {
318 318
			int q = key.Find(k);
uppsrc/Core/ValueUtil.hpp
45 45
#ifdef DEPRECATED
46 46
template <class T>
47 47
struct RawRef : public RefManager {
48
	virtual void  SetValue(void *p, const Value& v)       { *(T *) p = RawValue<T>::Extract(v); }
49
	virtual Value GetValue(const void *p)                 { return RawValue<T>(*(const T *) p); }
50
	virtual int   GetType()                               { return GetValueTypeNo<T>(); }
51
	virtual ~RawRef() {}
48
	void  SetValue(void *p, const Value& v) override       { *(T *) p = RawValue<T>::Extract(v); }
49
	Value GetValue(const void *p) override                 { return RawValue<T>(*(const T *) p); }
50
	int   GetType() override                               { return GetValueTypeNo<T>(); }
51
	~RawRef() override {}
52 52
};
53 53

  
54 54
template <class T>
uppsrc/Core/XML.h
270 270

  
271 271
class IgnoreXmlPaths : public ParseXmlFilter {
272 272
public:
273
	virtual bool DoTag(const String& id);
274
	virtual void EndTag();
273
	bool DoTag(const String& id) override;
274
	void EndTag() override;
275 275

  
276 276
private:
277 277
	Index<String>  list;
uppsrc/Core/z.h
1 1
class Crc32Stream : public OutStream {
2 2
	dword crc;
3 3

  
4
	virtual  void  Out(const void *data, dword size);
4
	 void  Out(const void *data, dword size) override;
5 5

  
6 6
public:
7 7
	dword  Finish()            { Flush(); return crc; }
......
94 94

  
95 95
	ZCompressStream()                      {}
96 96
	ZCompressStream(Stream& out)           { Open(out); }
97
	~ZCompressStream()                     { Close(); }
97
	~ZCompressStream() override                     { Close(); }
98 98
};
99 99

  
100 100
class ZDecompressStream : public InFilterStream {
......
117 117

  
118 118
	ZDecompressStream()                    {}
119 119
	ZDecompressStream(Stream& out)         { Open(out); }
120
	~ZDecompressStream()                   { Close(); }
120
	~ZDecompressStream() override                   { Close(); }
121 121
};
122 122

  
123 123
int64  CopyStream(Stream& dest, Stream& src, int64 count, Gate<int64, int64> progress, int chunk_size = 65536);