/*---------------------------------------------------------------------------* Project: Horizon File: util_NonCopyable.h Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 16675 $ *---------------------------------------------------------------------------*/ #ifdef __cplusplus #ifndef NN_UTIL_UTIL_NONCOPYABLE_H_ #define NN_UTIL_UTIL_NONCOPYABLE_H_ namespace nn { namespace util { namespace ADLFireWall { /*! @brief コピー不可能なオブジェクトを生成するためのクラステンプレートです。 class A : private nn::util::NonCopyable としてクラスを定義することで、 オブジェクトのコピーコンストラクタ、代入のようなコピー操作を抑制できます。 */ template class NonCopyable { protected: NonCopyable () {} ~NonCopyable () {} private: // コピーコンストラクタ、代入演算子を private 化 NonCopyable (const NonCopyable &); NonCopyable & operator = (const NonCopyable &); }; } using ADLFireWall::NonCopyable; }} #endif /* NN_UTIL_NONCOPYABLE_H_ */ #endif // __cplusplus