changed Awk and Sed to inherit Uncopyable
This commit is contained in:
		| @ -57,7 +57,7 @@ public: | |||||||
|  |  | ||||||
| 	static qse_size_t getHashCode (const qse_char_t* str) | 	static qse_size_t getHashCode (const qse_char_t* str) | ||||||
| 	{ | 	{ | ||||||
| 		return getHashCode (0, str); | 		return this->getHashCode (0, str); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	static qse_size_t getHashCode (qse_size_t init, const void* data, qse_size_t size) | 	static qse_size_t getHashCode (qse_size_t init, const void* data, qse_size_t size) | ||||||
| @ -88,7 +88,7 @@ public: | |||||||
|  |  | ||||||
| 	static qse_size_t getHashCode (const void* data, qse_size_t size) | 	static qse_size_t getHashCode (const void* data, qse_size_t size) | ||||||
| 	{ | 	{ | ||||||
| 		return getHashCode (0, data, size); | 		return this->getHashCode (0, data, size); | ||||||
| 	} | 	} | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | |||||||
| @ -153,9 +153,9 @@ public: | |||||||
|  |  | ||||||
| protected: | protected: | ||||||
| 	qse_size_t* _ref; | 	qse_size_t* _ref; | ||||||
| 	T* _ptr; | 	T*          _ptr; | ||||||
| 	void* _darg; | 	void*       _darg; | ||||||
| 	DELETER deleter; | 	DELETER     deleter; | ||||||
| };  | };  | ||||||
|  |  | ||||||
| ///////////////////////////////// | ///////////////////////////////// | ||||||
|  | |||||||
| @ -30,6 +30,7 @@ | |||||||
| #include <qse/awk/awk.h> | #include <qse/awk/awk.h> | ||||||
| #include <qse/cmn/htb.h> | #include <qse/cmn/htb.h> | ||||||
| #include <qse/cmn/chr.h> | #include <qse/cmn/chr.h> | ||||||
|  | #include <qse/Uncopyable.hpp> | ||||||
| #include <qse/Types.hpp> | #include <qse/Types.hpp> | ||||||
| #include <qse/cmn/Mmged.hpp> | #include <qse/cmn/Mmged.hpp> | ||||||
| #include <stdarg.h> | #include <stdarg.h> | ||||||
| @ -45,7 +46,7 @@ QSE_BEGIN_NAMESPACE(QSE) | |||||||
| /// The Awk class implements an AWK interpreter by wrapping around  | /// The Awk class implements an AWK interpreter by wrapping around  | ||||||
| /// #qse_awk_t and #qse_awk_rtx_t. | /// #qse_awk_t and #qse_awk_rtx_t. | ||||||
| /// | /// | ||||||
| class QSE_EXPORT Awk: public Types, public Mmged | class QSE_EXPORT Awk: public Uncopyable, public Types, public Mmged | ||||||
| { | { | ||||||
| public: | public: | ||||||
| 	typedef qse_htb_t htb_t; | 	typedef qse_htb_t htb_t; | ||||||
| @ -1363,10 +1364,6 @@ private: | |||||||
| 	int dispatch_function (Run* run, const fnc_info_t* fi); | 	int dispatch_function (Run* run, const fnc_info_t* fi); | ||||||
|  |  | ||||||
| 	static const char_t* xerrstr (const awk_t* a, errnum_t num); | 	static const char_t* xerrstr (const awk_t* a, errnum_t num); | ||||||
|  |  | ||||||
| private: |  | ||||||
| 	Awk (const Awk&); |  | ||||||
| 	Awk& operator= (const Awk&); |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| ///////////////////////////////// | ///////////////////////////////// | ||||||
|  | |||||||
| @ -27,6 +27,7 @@ | |||||||
| #ifndef _QSE_SED_SED_HPP_ | #ifndef _QSE_SED_SED_HPP_ | ||||||
| #define _QSE_SED_SED_HPP_ | #define _QSE_SED_SED_HPP_ | ||||||
|  |  | ||||||
|  | #include <qse/Uncopyable.hpp> | ||||||
| #include <qse/Types.hpp> | #include <qse/Types.hpp> | ||||||
| #include <qse/cmn/Mmged.hpp> | #include <qse/cmn/Mmged.hpp> | ||||||
| #include <qse/sed/sed.h> | #include <qse/sed/sed.h> | ||||||
| @ -46,7 +47,7 @@ QSE_BEGIN_NAMESPACE(QSE) | |||||||
| /// | /// | ||||||
| /// The Sed class implements a stream editor by wrapping around #qse_sed_t. | /// The Sed class implements a stream editor by wrapping around #qse_sed_t. | ||||||
| /// | /// | ||||||
| class QSE_EXPORT Sed: public Types, public Mmged | class QSE_EXPORT Sed: public Uncopyable, public Types, public Mmged | ||||||
| { | { | ||||||
| public: | public: | ||||||
| 	/// The sed_t type redefines a stream editor type | 	/// The sed_t type redefines a stream editor type | ||||||
| @ -312,10 +313,6 @@ private: | |||||||
| 	static ssize_t xout ( | 	static ssize_t xout ( | ||||||
| 		sed_t* s, io_cmd_t cmd, io_arg_t* arg, char_t* dat, size_t len); | 		sed_t* s, io_cmd_t cmd, io_arg_t* arg, char_t* dat, size_t len); | ||||||
| 	static const char_t* xerrstr (const sed_t* s, errnum_t num); | 	static const char_t* xerrstr (const sed_t* s, errnum_t num); | ||||||
|  |  | ||||||
| private: |  | ||||||
| 	Sed (const Sed&); |  | ||||||
| 	Sed& operator= (const Sed&); |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| ///////////////////////////////// | ///////////////////////////////// | ||||||
|  | |||||||
| @ -1383,7 +1383,7 @@ int Awk::dispatch_function (Run* run, const fnc_info_t* fi) | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	FunctionHandler handler; | 	FunctionHandler handler; | ||||||
|        	handler = *(FunctionHandler*)QSE_HTB_VPTR(pair);	 | 	handler = *(FunctionHandler*)QSE_HTB_VPTR(pair); | ||||||
|  |  | ||||||
| 	size_t i, nargs = qse_awk_rtx_getnargs(run->rtx); | 	size_t i, nargs = qse_awk_rtx_getnargs(run->rtx); | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user