Top > C++ > apcl > interface > NonCopyable

NonCopyable Edit

概要 Edit

コピー不可にするインターフェース。
private継承して使う。

履歴 Edit

  • revision ? : 作成

コード Edit

ヘッダファイル Edit

fileNonCopyable.hpp
Everything is expanded.Everything is shortened.
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 
 
 
 
 
 
 
-
-
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
!
 
 
 
/**
 * @file
 * Rs[łȂC^[tF[XB
 */
#pragma once
 
//-----------------------------------------------------------
namespace apcl { namespace interface
{
  /// Rs[łȂC^[tF[XBprivatepĎgpB
  class NonCopyable
  {
  public:
    /// Ej
    //@{
    NonCopyable();
    virtual ~NonCopyable();
    //@}
 
  private:
    /// Ȃ֐
    //@{
    NonCopyable( const NonCopyable& aObject ); ///< Rs[RXgN^
    const NonCopyable& operator = ( const NonCopyable& aObject ); ///< Zq
    //@}
  };
 
}} // end of namespace ::apcl::interface
 
//-----------------------------------------------------------
// EOF

ソースファイル Edit

fileNonCopyable.cpp
Everything is expanded.Everything is shortened.
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 
 
 
 
 
 
 
 
 
 
 
-
!
 
 
 
-
!
 
 
 
/**
 * @file
 * NonCopyable.hpp̎LqB
 */
#include <apcl/interface/NonCopyable.hpp>
 
//-----------------------------------------------------------
using namespace ::apcl::interface;
 
//-----------------------------------------------------------
NonCopyable::NonCopyable()
{
}
 
//-----------------------------------------------------------
NonCopyable::~NonCopyable()
{
}
 
//-----------------------------------------------------------
// EOF

Attach file: fileNonCopyable.cpp 511 download [Information] fileNonCopyable.hpp 513 download [Information]

Reload   New Lower page making Edit Freeze Diff Upload Copy Rename   Front page List of pages Search Recent changes Backup Referer   Help   RSS of recent changes
Last-modified: (5878d)