E D R , A S I H C RSS

BackLinks search for "MySingleton"

BackLinks of MySingleton


Search BackLinks only
Display context of search results
Case-sensitive searching
  • Gof/Singleton
         어디에서 Singleton class들이 그들을 등록하는가? 한가지 가능성은 그들의 생성자에서다. 예를들어 singleton의 subclass인 MySingleton 은 다음과 같이 구현할 수 있다.
         MySingleton::MySingleton () {
          Singleton::Register ("MySingleton", this);
         물론, 코드 어디에선가 클래스를 인스턴스화하지 않으면 생성자는 호출되지 않을 것이다. C++에서는 MySingleton의 static instance를 정의함으로서 이 문제를 잘 해결할 수 있다. 예를 들어, MySingleton 클래스의 구현부를 포함하는 화일에 다음과 같이 정의하면 된다.
         static MySingleton theSingleton;
Found 1 matching page out of 7540 total pages

You can also click here to search title.

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
Processing time 0.0056 sec