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) | ||||
| 	{ | ||||
| 		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) | ||||
| @ -88,7 +88,7 @@ public: | ||||
|  | ||||
| 	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: | ||||
| 	qse_size_t* _ref; | ||||
| 	T* _ptr; | ||||
| 	void* _darg; | ||||
| 	DELETER deleter; | ||||
| 	T*          _ptr; | ||||
| 	void*       _darg; | ||||
| 	DELETER     deleter; | ||||
| };  | ||||
|  | ||||
| ///////////////////////////////// | ||||
|  | ||||
| @ -30,6 +30,7 @@ | ||||
| #include <qse/awk/awk.h> | ||||
| #include <qse/cmn/htb.h> | ||||
| #include <qse/cmn/chr.h> | ||||
| #include <qse/Uncopyable.hpp> | ||||
| #include <qse/Types.hpp> | ||||
| #include <qse/cmn/Mmged.hpp> | ||||
| #include <stdarg.h> | ||||
| @ -45,7 +46,7 @@ QSE_BEGIN_NAMESPACE(QSE) | ||||
| /// The Awk class implements an AWK interpreter by wrapping around  | ||||
| /// #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: | ||||
| 	typedef qse_htb_t htb_t; | ||||
| @ -1363,10 +1364,6 @@ private: | ||||
| 	int dispatch_function (Run* run, const fnc_info_t* fi); | ||||
|  | ||||
| 	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_ | ||||
| #define _QSE_SED_SED_HPP_ | ||||
|  | ||||
| #include <qse/Uncopyable.hpp> | ||||
| #include <qse/Types.hpp> | ||||
| #include <qse/cmn/Mmged.hpp> | ||||
| #include <qse/sed/sed.h> | ||||
| @ -46,12 +47,12 @@ QSE_BEGIN_NAMESPACE(QSE) | ||||
| /// | ||||
| /// 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: | ||||
| 	/// The sed_t type redefines a stream editor type | ||||
| 	typedef qse_sed_t sed_t; | ||||
| 	/// The loc_t type redefines the location type	 | ||||
| 	/// The loc_t type redefines the location type | ||||
| 	typedef qse_sed_loc_t loc_t; | ||||
| 	/// The errnum_t type redefines an error number type | ||||
| 	typedef qse_sed_errnum_t errnum_t;  | ||||
| @ -312,10 +313,6 @@ private: | ||||
| 	static ssize_t xout ( | ||||
| 		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); | ||||
|  | ||||
| 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; | ||||
|        	handler = *(FunctionHandler*)QSE_HTB_VPTR(pair);	 | ||||
| 	handler = *(FunctionHandler*)QSE_HTB_VPTR(pair); | ||||
|  | ||||
| 	size_t i, nargs = qse_awk_rtx_getnargs(run->rtx); | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user