mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 21:57:55 +00:00
ca971bbfd8
This patch changes the top-level directory layout as a preparatory step for improving the tools for managing 3rd-party source codes. The rationale is described in the issue referenced below. Issue #1082
41 lines
903 B
C++
41 lines
903 B
C++
/*
|
|
* \brief Non-copyable objects design pattern.
|
|
* \author Stefan Kalkowski
|
|
* \date 2012-02-16
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2012-2013 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
#ifndef _INCLUDE__UTIL__NONCOPYABLE_H_
|
|
#define _INCLUDE__UTIL__NONCOPYABLE_H_
|
|
|
|
namespace Genode {
|
|
|
|
/**
|
|
* Classes of objects not allowed to be copied, should inherit from this one.
|
|
*
|
|
* This class declares a private copy-constructor and assignment-operator.
|
|
* It's sufficient to inherit private from this class, and let the compiler
|
|
* detect any copy violations.
|
|
*/
|
|
class Noncopyable
|
|
{
|
|
private:
|
|
|
|
Noncopyable(const Noncopyable&);
|
|
const Noncopyable& operator=(const Noncopyable&);
|
|
|
|
protected:
|
|
|
|
Noncopyable() {}
|
|
~Noncopyable() {}
|
|
};
|
|
}
|
|
|
|
#endif /* _INCLUDE__UTIL__NONCOPYABLE_H_ */
|