From: "Petteri Räty" <betelgeuse@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/libbash:master commit in: src/, src/core/
Date: Thu, 2 Jun 2011 11:48:55 +0000 (UTC) [thread overview]
Message-ID: <ae8b855bd14a965db5d9d49ca64e8c0c334874f0.betelgeuse@gentoo> (raw)
commit: ae8b855bd14a965db5d9d49ca64e8c0c334874f0
Author: Mu Qiao <qiaomuf <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 2 11:41:27 2011 +0000
Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Thu Jun 2 11:41:27 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=ae8b855b
Core: prevent copying classes
Now classes that are not designed to be copyable inherit from
boost::noncopyable.
---
src/core/bash_ast.h | 3 ++-
src/core/interpreter.h | 3 ++-
src/cppbash_builtin.h | 6 ++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/core/bash_ast.h b/src/core/bash_ast.h
index 9e388cb..5469d95 100644
--- a/src/core/bash_ast.h
+++ b/src/core/bash_ast.h
@@ -33,6 +33,7 @@
#include <vector>
#include <antlr3.h>
+#include <boost/utility.hpp>
#include "libbashWalker.h"
@@ -42,7 +43,7 @@ class interpreter;
/// \class bash_ast
/// \brief a wrapper class that helps interpret from istream and string
-class bash_ast
+class bash_ast: public boost::noncopyable
{
pANTLR3_INPUT_STREAM input;
std::string script;
diff --git a/src/core/interpreter.h b/src/core/interpreter.h
index 3420ee4..46c3d6a 100644
--- a/src/core/interpreter.h
+++ b/src/core/interpreter.h
@@ -32,6 +32,7 @@
#include <string>
#include <antlr3basetree.h>
+#include <boost/utility.hpp>
#include <boost/xpressive/xpressive.hpp>
#include "core/symbols.hpp"
@@ -46,7 +47,7 @@ typedef struct libbashWalker_Ctx_struct * plibbashWalker;
/// \class interpreter
/// \brief implementation for bash interpreter
///
-class interpreter
+class interpreter: public boost::noncopyable
{
/// \var private::members
diff --git a/src/cppbash_builtin.h b/src/cppbash_builtin.h
index e7b68ea..11c1edb 100644
--- a/src/cppbash_builtin.h
+++ b/src/cppbash_builtin.h
@@ -33,6 +33,7 @@
#include <boost/functional/factory.hpp>
#include <boost/function.hpp>
#include <boost/scoped_ptr.hpp>
+#include <boost/utility.hpp>
#define BUILTIN_ARGS std::ostream &out, std::ostream &err, std::istream &in, interpreter &walker
@@ -41,7 +42,7 @@ class interpreter;
/// \class cppbash_builtin
/// \brief a virtual class to inherit builtin functions from
///
-class cppbash_builtin
+class cppbash_builtin: public boost::noncopyable
{
public:
///
@@ -51,9 +52,6 @@ class cppbash_builtin
/// \param instream where to get standard input from. Default: stdin
///
explicit cppbash_builtin(BUILTIN_ARGS);
- /// prevent copying
- cppbash_builtin(const cppbash_builtin& ) = delete;
- const cppbash_builtin& operator=( const cppbash_builtin& ) = delete;
virtual ~cppbash_builtin() {};
///
next reply other threads:[~2011-06-02 11:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 11:48 Petteri Räty [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-04-05 6:37 [gentoo-commits] proj/libbash:master commit in: src/, src/core/ Petteri Räty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae8b855bd14a965db5d9d49ca64e8c0c334874f0.betelgeuse@gentoo \
--to=betelgeuse@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox