E D R , A S I H C RSS

Full text search for "Instance"

Instance


Search BackLinks only
Display context of search results
Case-sensitive searching
  • Gof/Singleton . . . . 37 matches
          * Instance operation (클래스의 메소드)을 정의한다. Instance 는 클라이언트에게 해당 Singleton의 유일한 인스턴스를 접근할 수 있도록 해준다.
          * 클라이언트는 오직 Singleton의 Instance operation으로만 Singleton 인스턴스에 접근할 수 있다.
         1. unique instance임을 보증하는 것. SingletonPattern의 경우도 일반 클래스와 마찬가지로 인스턴스를 생성하는 방법은 같다. 하지만 클래스는 늘 단일 인스턴스가 유지되도록 프로그래밍된다. 이를 구현하는 일반적인 방법은 인스턴스를 만드는 operation을 class operations으로 두는 것이다. (static member function이거나 class method) 이 operation은 unique instance를 가지고 있는 변수에 접근하며 이때 이 변수의 값 (인스턴스)를 리턴하기 전에 이 변수가 unique instance로 초기화 되어지는 것을 보장한다. 이러한 접근은 singleton이 처음 사용되어지 전에 만들어지고 초기화됨으로서 보장된다.
         다음의 예를 보라. C++ 프로그래머는 Singleton class의 Instance operation을 static member function으로 정의한다. Singleton 또한 static member 변수인 _instance를 정의한다. _instance는 Singleton의 유일한 인스턴스를 가리키는 포인터이다.
          static Singleton* Instance ();
          static Singleton* _instance;
         Singleton* Singleton::_instance = 0;
         Singleton* Singleton::Instance () {
          if (_instance == 0) {
          _instance = new Singleton;
          return _instance;
         클래스를 사용하는 Client는 singleton을 Instance operation을 통해 접근한다. _instance 는 0로 초기화되고, static member function 인 Instance는 단일 인스턴스 _Instance를 리턴한다. 만일 _instance가 0인 경우 unique instance로 초기화시키면서 리턴한다. Instance는 lazy-initalization을 이용한다. (Instance operation이 최초로 호출되어전까지는 리턴할 unique instance는 생성되지 않는다.)
         더 나아가, _instance 는 Singleton 객체의 포인터이므로, Instance member function은 이 포인터로 하여금 Singleton 의 subclass를 가리키도록 할 수 있다.
         Smalltalk에서 unique instance를 리턴하는 functiond은 Singleton 클래스의 class method로 구현된다. 단일 인스턴스가 만들어지는 것을 보장하기 위해서 new operation을 override한다. The resulting Singleton class might have the following two class methods, where SoleInstance is a class variable that is not used anywhere else:
          SoleInstance isNil ifTrue: [SoleInstance := super new].
          ^ SoleInstance
         2. Singleton class를 subclassing 하기 관련. 주된 주제는 클라이언트가 singleton 의 subclass를 이용할 수 있도록 subclass들의 unique instance를 설정하는 부분에 있다. 필수적으로, singleton 인스턴스를 참조하는 변수는 반드시 subclass의 인스턴스로 초기화되어져야 한다. 가장 단순한 기술은 Singleton의 Instance operation에 사용하기 원하는 singleton을 정해놓는 것이다. Sample Code에는 환경변수들을 가지고 이 기술을 어떻게 구현하는지 보여준다.
         Singleton의 subclass를 선택하는 또 다른 방법은 Instance 를 Parent class에서 빼 낸뒤, (e.g, MazeFactory) subclass 에 Instance를 구현하는 것이다. 이는 C++ 프로그래머로 하여금 link-time시에 singleton의 class를 결정하도록 해준다. (e.g, 각각 다른 구현부분을 포함하는 객체화일을 linking함으로써.)
         더욱더 유연한 접근 방법으로 '''registry of singletons''' 이 있다. 가능한 Singleton class들의 집합을 정의하는 Instance operation을 가지는 것 대신, Singleton class들을 잘 알려진 registry 에 그들의 singleton instance를 등록하는 것이다.
         registry 는 string name 과 singletons 을 mapping 한다. singleton의 instance가 필요한 경우, registry에 string name으로 해당 singleton 을 요청한다. registry는 대응하는 singleton을 찾아서 (만일 존재한다면) 리턴한다. 이러한 접근방법은 모든 가능한 Singleton class들이나 instance들을 Instance operation이 알 필요가 없도록 한다. 필요한 것은 registry에 등록될 모든 Singleton class들을 위한 일반적인 interface이다.
  • 데블스캠프2006/목요일/winapi . . . . 22 matches
         int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
         int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
          wndclass.hInstance = hInstance ;
          hInstance, // program instance handle
         int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
          wndclass.hInstance = hInstance ;
          hInstance, // program instance handle
         int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
          wndclass.hInstance = hInstance ;
          CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, NULL, NULL, hInstance, NULL) ;
         int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
          wndclass.hInstance = hInstance ;
          CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, NULL, NULL, hInstance, NULL) ;
  • DirectDraw/Example . . . . 20 matches
         HINSTANCE hInst; // current instance
         ATOM MyRegisterClass(HINSTANCE hInstance);
         BOOL InitInstance(HINSTANCE, int);
         int APIENTRY WinMain(HINSTANCE hInstance,
          HINSTANCE hPrevInstance,
          LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
          LoadString(hInstance, IDC_SIMPLEDX, szWindowClass, MAX_LOADSTRING);
          MyRegisterClass(hInstance);
          if (!InitInstance (hInstance, nCmdShow))
          hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_SIMPLEDX);
         ATOM MyRegisterClass(HINSTANCE hInstance)
          wcex.hInstance = hInstance;
          wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_SIMPLEDX);
          wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);
         // FUNCTION: InitInstance(HANDLE, int)
         // PURPOSE: Saves instance handle and creates main window
         // In this function, we save the instance handle in a global variable and
         BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
          hInst = hInstance; // Store instance handle in our global variable
          CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
  • DevelopmentinWindows/APIExample . . . . 14 matches
         HINSTANCE hInst;
         ATOM MyRegisterClass(HINSTANCE hInstance);
         BOOL InitInstance(HINSTANCE, int);
         int APIENTRY WinMain(HINSTANCE hInstance,
          HINSTANCE hPrevInstance,
          MyRegisterClass(hInstance);
          if (!InitInstance (hInstance, nCmdShow))
         ATOM MyRegisterClass(HINSTANCE hInstance)
          wcex.hInstance = hInstance;
         BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
          hInst = hInstance;
          NULL, NULL, hInstance, NULL);
  • MoreMFC . . . . 10 matches
         int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
         wc.hInstance = hInstance;
          hInstance,
          virtual BOOL InitInstance ();
         // CWinApp::InitInstance를 override한 가상함수이다.
         BOOL CMyApp::InitInstance ()
         떡하니 source를 보면 어떻게 돌아가는 거야.. --; 라는 생각이 든다.. 나도 잘모른다. 그런데 가장 중요한것은 global영역에 myApp라는 변수가 선언되어 있다는 사실이다. myApp 라는 instance가 이 프로그램의 instance이다. --a (최초의 프로그램으로 인스턴스화..) 그리고, CWinApp를 상속한 CMyApp에 있는 유일한 함수 initInstance 에서 실제 window를 만들어준다.(InitInstance함수는 응용 프로그램이 처음 생길 때, 곡 window가 생성되기전, 응용 프로그램이 시작한 바로 다음에 호출된다) 이 부분에서 CMainWindow의 instance를 만들어 멤버 변수인 m_pMainWnd로 pointing한다. 이제 window는 생성 되었다. 그렇지만, 기억해야 할 것이 아직 window는 보이지 않는다는 사실이다. 그래서, CMainWindow의 pointer(m_pMainWindow)를 통해서 ShowWindow와 UpdateWindow를 호출해 준다. 그리고 TRUE를 return 함으로써 다음 작업으로 진행 할 수 있게 해준다.... 흘. 영서라 뭔소린지 하나도 모르겠네~ 캬캬.. ''' to be continue..'''[[BR]]
  • Gof/State . . . . 9 matches
          _state = TCPClosed::Instance ();
          static TCPState* Instance ();
          static TCPState* Instance ();
          static TCPState* Instance ();
         TCPState 서브클래스는 내부 상태를 가지지 않는다, 그러므로 TCPState는 공유될 수 있고, 각각 단지 하나의 인스턴스만이 요구되어진다. 이 TCPState 서브클래스의 각각의 유일한 인스턴스들은 정적함수인 Instance 로 얻어진다. (TCPState 서브클래스는 Singleton 으로 만들어진다.)
          ChangeState (t, TCPEstablished::Instance ());
          ChangeState (t, TCPListen::Instance ());
          ChangeState (t, TCPListen::Instance ());
          ChangeState (t, TCPEstablished::Instance ());
  • SolarSystem/상협 . . . . 9 matches
         HINSTANCE hInstance;
          if(!UnregisterClass("OpenGL",hInstance))
          hInstance = NULL;
          hInstance = GetModuleHandle(NULL);
          wc.hInstance=hInstance;
          hInstance,
         int WINAPI WinMain(HINSTANCE hInstance,
          HINSTANCE hPrevInstance,
  • Android/WallpaperChanger . . . . 7 matches
          public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          WallpaperManager manager = WallpaperManager.getInstance(MywallpaperActivity.this);
          public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  • 1002/Journal . . . . 6 matches
          public static Application getInstance () {
          Enumeration toolList = Application.getInstance().getToolsList();
         즉, Application Class 의 인스턴스가 만들어지기 위해선 MainFrame 클래스가 완성되어야 한다. 그런데, MainFrame 에서는 Application 의 인스턴스를 요구한다. 그렇기 때문에 Application의 getInstance를 호출하고, 아직 인스턴스가 만들어지지 않았으므로 또 getInstance 에선 Application 의 Class 를 새로 또 만들려고 하고 다시 MainFrame 클래스를 생성하려 하고.. 이를 반복하게 되는 것이였다.
          public static Application getInstance () {
          * ["SingletonPattern"] - Application Instance를 Global 객체로. 근데, 이는 일장일단인것 같다. 잘못하면 Application 중앙집중체제가 된다. Application 내에서 Delegation하는 객체들이 많은데, 그 덕에 Application 이 너무 중간 메세지 전달역할로만 작용하는것 같다. 뭐, ["FacadePattern"] 인양 된다면 모르겠지만. 이건 코드 커지고 난 뒤 두고볼 일인것 같다.
  • 3DGraphicsFoundation/INSU/SolarSystem . . . . 6 matches
         static HINSTANCE hInstance;
         int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
          hInstance = hInst;
          wc.hInstance = hInstance;
          hInstance,
  • 5인용C++스터디/키보드및마우스의입출력 . . . . 6 matches
         HINSTANCE g_hInst;
         int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance
          g_hInst=hInstance;
          WndClass.hInstance=hInstance;
          NULL,(HMENU)NULL,hInstance,NULL);
  • API/WindowsAPI . . . . 6 matches
         HINSTANCE g_hInst;
         int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance
          g_hInst=hInstance;
          WndClass.hInstance=hInstance;
          NULL,(HMENU)NULL,hInstance,NULL);
  • WinampPluginProgramming/DSP . . . . 6 matches
          NULL, // hDllInstance
          NULL, // hDllInstance
          NULL, // hDllInstance
          NULL, // hDllInstance
          NULL, // hDllInstance
          ShowWindow((pitch_control_hwnd=CreateDialog(this_mod->hDllInstance,MAKEINTRESOURCE(IDD_DIALOG1),this_mod->hwndParent,pitchProc)),SW_SHOW);
  • DirectDraw/APIBasisSource . . . . 5 matches
         int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
          wc.hInstance = hInstance;
          CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL );
  • 변준원 . . . . 5 matches
         int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
          wc.hInstance = hInstance;
          CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL );
  • 5인용C++스터디/멀티미디어 . . . . 4 matches
          리소스에 포함된 사운드를 연주하려면 PlaySound의 세 번째 인수에 SND_RESOURCE 플래그를 주고 첫 번째 인수에 리소스의 ID를 준다. 두 번째 인수에는 리소스를 가진 실행파일의 인스턴스 핸들을 주어야 하는데 MFC에서는 AfxGetInstanceHandle() 전역함수로 인스턴스 핸들을 구할 수 있다. 다음과 같이 코드를 작성해 보자.
          PlaySound(MAKEINTRESOURCE(IDR_WAVE1), AfxGetInstanceHandle(), SND_RESOURCE | SND_ASYNC);
          hWndAVI=MCIWndCreate(this->m_hWnd, AfxGetInstanceHandle(), 0, "cf3.avi");
         HWND MCIWndCreate(HWND hwndParent, HINSTANCE hinstance, DWORD dwStyle, LPSTR szFile);
         hInstance: MCIWnd롤 사용하는 인스턴스 핸들을 지정한다.
  • GuiTestingWithMfc . . . . 4 matches
         이는 App 클래스의 InitInstance 함수에서 해준다.
         BOOL CGuiTestingOneApp::InitInstance()
         여기까지로 생각해놓은 테스트들이 전부 완료. 앞에 InitInstance 에 써 넣은 주석을 풀고, 실제로 실행해보자.
         BOOL CGuiTestingOneApp::InitInstance()
  • NamedPipe . . . . 4 matches
         A named pipe is a named, one-way or duplex pipe for communication between the pipe server and one or more pipe clients. All instances of a
         named pipe share the same pipe name, but each instance has its own buffers and handles, and provides a separate conduit for client-server communication. The use of instances enables multiple pipe clients to use the same named pipe simultaneously.
         Any process can act as both a server and a client, making peer-to-peer communication possible. As used here, the term pipe server refers to a process that creates a named pipe, and the term pipe client refers to a process that connects to an instance of a named pipe.
         VOID InstanceThread(LPVOID); // 쓰레드 함수
         // The main loop creates an instance of the named pipe and
          PIPE_UNLIMITED_INSTANCES, // max. instances
          (LPTHREAD_START_ROUTINE) InstanceThread, // InstanceThread를 생성시킨다.
         VOID InstanceThread(LPVOID lpvParam)
         // The thread's parameter is a handle to a pipe instance.
         // handle to this pipe instance.
          // All pipe instances are busy, so wait for 20 seconds.
  • MicrosoftFoundationClasses . . . . 3 matches
          virtual BOOL InitInstance();
         BOOL CExApp::InitInstance(void) {
          * {{{~cpp WinMain() 에서 InitInstance() 수행, document template, main frame window, document, view 를 생성한다.}}}
  • CppUnit . . . . 2 matches
         BOOL CMyApp::InitInstance () {
         int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE, LPSTR, INT) {
  • HelloWorld . . . . 2 matches
         int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int nCmdShow)
  • Java/ReflectionForInnerClass . . . . 2 matches
          Object outer = outerClass.newInstance();
          Object inner = innerCons.newInstance(consParams);
  • ProjectZephyrus/Thread . . . . 2 matches
          static synchronized public SocketManager getInstance() {
          if (instance == null) {
          instance = new SocketManager();
          return instance;
          public static SocketManager getInstance() {
          if (instance == null) {
          if (instance == null) {
          instance = new SocketManager();
          return instance;
  • TheJavaMan/달력 . . . . 2 matches
          tfYear.setText(String.valueOf(Calendar.getInstance().get(Calendar.YEAR)));
          cbMonth.setSelectedIndex(Calendar.getInstance().get(Calendar.MONTH));
  • WinampPlugin을이용한프로그래밍 . . . . 2 matches
          HINSTANCE hout = LoadLibrary("out_wave.dll");
          HINSTANCE hin = LoadLibrary("in_vorbis.dll");
          out->hDllInstance = hout;
          in->hDllInstance = hin;
  • 데블스캠프2011/넷째날/Android/송지원 . . . . 2 matches
          public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  • 2학기자바스터디/운세게임 . . . . 1 match
          Calendar now = Calendar.getInstance(); // 새로운 객체를 생성하지않고 시스템으로부터 인스턴스를 얻음
  • 5인용C++스터디/윈도우에그림그리기 . . . . 1 match
         int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, int nCmdShow)
          wc.hInstance=hInst;
  • CxImage 사용 . . . . 1 match
         App Class 에서 InitInstance() 의 아래부분 주석 처리
  • InternalLinkage . . . . 1 match
          ''암튼,결론이 어떻게 되나요? singleton 을 구현하는 용도로 자주 쓰는 static 변수를 사용하는 (주로 getInstance류) 메소드에서는 inline 을 쓰지 말자 인가요? --[1002]''
  • Java/ModeSelectionPerformanceTest . . . . 1 match
          modeMap.put(modeExecute[i], innerCons.newInstance(consParams));
  • JavaStudy2003/두번째과제/곽세환 . . . . 1 match
          인스턴스(Instance):(찍어낸 벽돌)
  • MFC/MessageMap . . . . 1 match
          virtual BOOL InitInstance();
  • OOP . . . . 1 match
         4. Every object is an instance of a class. A class groups similar objects.
          * [Instance]
  • ObjectWorld . . . . 1 match
          * Middleware, Application Server - Architecture 를 Instance 화 시킨 실질적 제품들. 전체 시스템 내에서의 역할에 대한 설명으로서의 접근.
  • ProjectAR/Design . . . . 1 match
         ==== CARInstanceItem ====
  • ProjectZephyrus/ThreadForServer . . . . 1 match
         InfoManager.getInstance()의 if문 안쪽에 넣어주면 sync문제도 해결될것이다.
  • TestDrivenDatabaseDevelopment . . . . 1 match
          Class.forName("com.mysql.jdbc.Driver").newInstance();
  • iText . . . . 1 match
          PdfWriter.getInstance(document, new FileOutputStream("Hello.pdf"));
  • java/reflection . . . . 1 match
          Object object = helloWorld.newInstance();
  • 상협/삽질일지/2002 . . . . 1 match
          * Driver driver = (Driver)Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); 이거 할때 메인 함수에서 throws Exception 를 하지 않으면 thrown 을 잡거나 선언 해야만 한다는 메시지가 뜬다. 아직 이유는 모르겠다.
  • 작은자바이야기 . . . . 1 match
         Driver driver = clazz.newInstance(); // 같은 방법으로 런타임 종속성으로 바꿀 수 있음.
  • 정모/2002.7.11 . . . . 1 match
          * Instance MP3 - 한번만 사용하는 MP3 만들기
Found 43 matching pages out of 7540 total pages (5000 pages are searched)

You can also click here to search title.

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