changed Awk and Sed to inherit Uncopyable

This commit is contained in:
hyung-hwan 2015-03-10 09:00:21 +00:00
parent 49d57e3155
commit 9a3ca2e3c1
5 changed files with 11 additions and 17 deletions

View File

@ -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);
}
};

View File

@ -153,9 +153,9 @@ public:
protected:
qse_size_t* _ref;
T* _ptr;
void* _darg;
DELETER deleter;
T* _ptr;
void* _darg;
DELETER deleter;
};
/////////////////////////////////

View File

@ -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&);
};
/////////////////////////////////

View File

@ -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,7 +47,7 @@ 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
@ -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&);
};
/////////////////////////////////

View File

@ -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);