/*---------------------------------------------------------------------------* Project: Horizon File: util_NonCopyable.h Copyright (C) Nintendo. 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: 27772 $ *---------------------------------------------------------------------------*/ #ifdef __cplusplus #ifndef NN_UTIL_UTIL_NONCOPYABLE_H_ #define NN_UTIL_UTIL_NONCOPYABLE_H_ namespace nn { namespace util { /* ======================================================================= Dummy for Reference Use ======================================================================== */ #ifdef NN_BUILD_DOCUMENT //--------------------------------------------------------------------------- //! :category Utility class template. //! //! @tparam T Derived class type that inherits from this class. //! //! @brief Class template for creating objects that cannot be copied. //! //! class A : To suppress copy operations, such as object copy constructors and substitutions, for Class A, define it as private nn::util::NonCopyable< A >. //! //--------------------------------------------------------------------------- template class NonCopyable {}; /* ======================================================================= Definition Entity ======================================================================== */ #else namespace ADLFireWall { template class NonCopyable { protected: NonCopyable () {} ~NonCopyable () {} private: // Copy constructor and assignment operator are made private. NonCopyable (const NonCopyable &); NonCopyable & operator = (const NonCopyable &); }; } #endif using ADLFireWall::NonCopyable; }} #endif /* NN_UTIL_NONCOPYABLE_H_ */ #endif // __cplusplus