E D R , A S I H C RSS

Full text search for "Adapter"

Adapter


Search BackLinks only
Display context of search results
Case-sensitive searching
  • Adapter . . . . 36 matches
         = ADAPTER(DP139) =
         클래스 인터페이스를 예상되는 다른 인터페이스로의 변환을 한다. '''Adapter'''는 상이한 인터페이스 때문에 다른 달랐던 클래스의 일을 묶는 역할알 한다.
         '''Adapter'''는 위에도 의미한 것과 같이 특별한(일반적 접근을 벗어난) object들을 '''client'''들이 고유의 방법('''Targets''')으로 접근하도록 해준다.
         === Class Adapter ===
         Smalltalk에서 ''Design Patterns''의 Adapter 패턴 class버전을 적용 시키지 못한다. class 버전은 다중 상속으로 그 기능을 구현하기 때문이다. [[BR]]
         DP의 p147을 보면 '''Adapter'''클래스는 반드시 그것의 '''Adaptee'''를 타입으로 선언해서 가지고 있어야만 한다.이런 경우에는 해당 클래스와 그것에서 상속되는 클래스들만이 기능을 사용(adapt)할수 있다. Smalltalk에서 엄격한 형검사(Strong Typeing) 존재 않으면, class 가 '''Adapter'''에서 '''Adaptee'''로 보내어지는 메세지를 보낼수 있는 이상 '''Adaptee'''가 어떠한 클래스라도 상관없을 것이다. [[BR]]
         === Tailored Adapter ===
         자 그럼 Adapter를 적용시키는 시나리오를 시작해 본다. ''Design Patterns''(DP139)에서 DrawingEditor는 그래픽 객체들과 Shape의 상속도상의 클래스 인스턴스들을 모아 관리하였다. DrawingEditor는 이런 그래픽 객체들과의 소통을 위하여 Shape 프로토콜을 만들어 이 규칙에 맞는 메세지를 이용한다. 하지만 text인자의 경우 우리는 이미 존재하고 있는 TextView상에서 이미 구현된 기능을 사용한다. 우리는 DrawEditior가 TextView와 일반적으로 쓰이는 Shape와 같이 상호작용 하기를 원한다. 그렇지만 TextView는 Shape의 프로토콜을 따르지 않는 다는 점이 문제이다. 그래서 우리는 TextShap의 Adapter class를 Shape의 자식(subclass)로 정의 한다. TextShape는 인스턴스로 TextView의 참조(reference)를 가지고 있으며, Shape프로토콜상에서의 메세지를 사용한다.; 이들 각각의 메세지는 간단히 다른 메세지로 캡슐화된 TextView에게 전달되어 질수 있다. 우리는 그때 TextShape를 DrawingEditor와 TextView사이에 붙인다.
         이처럼 Adapter가 정의되어져 있다면 Adapter와 Adaptee양쪽의 인터페이스를 이미 알고 있는 셈이다.;그래서 우리는 Shape 메세지를 TextView메세지에 맞추는 해석 과정과 같은 Adapter를 이런 특별한 용도에 맞추어 만들수 있다. 우리는 이런걸 Teilored Adapter라고 부른다.
         여기에 TextShape Adapter가 그것의 Adaptee를 위해 메세지를 해석하는 모습의 interaction diagram이 있다.
         === Message-Forwarding Pluggable Adapter ===
         우리는 Tailored Adapter안에서 메세지를 해석을 위하여 해당 전용 메소드를 만들수 있다. 왜냐하면 디자인 시간에 Adapter와 Adaptee의 프로토콜을 알고 있기 때문이다. The Adapter class는 유일한 상황의 해석을 위해서 만들어 진다. 그리고 각각의 Adapter의 메소드는 Adaptee에 대한 알맞은 메세지들에 대하여 hard-codes(전용 함수 정도의 의미로 생각) 이다
         Adapter시나리오의 두번째는 Adaptee의 인터페이를 디자인 시간에 알수 없을 때 이다. Adaptee의 인터페이스를 먼저 알수 없기 때문에 우리는 하나의 인터페이스에서 다른 것으로 메세지를 간단히 해석할수 없다. 이런 경우에는 메세지의 변형과 전달의 일반적 규칙에 맞추어 Pluggable Adapter를 사용한다. Tailored Adapter와 같이 Pluggable Adapter도 해석기를 Client와 Adaptee사이의 해석기를 제공한다. 하지만 각각의 특별한 경우를 위한 새로운 Adapter클래스의 정의를 필요하지 않다. Pluggable Adapter가 쓰이는 경우의 상태를 생각해보자
         반면에 어플리케이션 모델 오프젝트들은 일반적으로 다양한 모습을 하나의 값에 보다는 가지고 있다. 그것들이 하나의 모습으로 표현되지만, 모델 객체들은 value와 value:에 보다 분야에 알맞는 accessor message를 좀더 많은 의미를 지닌 이름으로 쓰인다. (DeleteMe 수정 필요). 그런데 문제점는 우리가 어떻게 뷰나 뷰의 모델에서 뷰가 모델이 이해할수 없는 메세지를 보내면 잡아내느냐 하는거다. 해결책은 우리는 Pluggable Adapter, 값을 메세지로 변환 시키는 것이라고 제시 할수 있다.-저것(Pluggable Adapter)은 메세지를 값 메세지(value message)를 받을때 그것의 Adaptee로 보내는 것이다. 우리는 value: 상에서도 같은걸 해할수 있다.
         자 그럼 여기에 예제를 보자. 우리는 employee관리 application을 가지고 있다고 가정한다.어플리케이션 모델은 하나의 인자인, employee의 사회 보장(비밀) 번호(social security number)의 포함하고 application의 사용자 인터페이스는 employee의 사회 보장 번호를 화면상에 뿌려주는 '입력 박스 뷰'를 포함한다.모델의 엑세스하고 초기화 시키기 위한 메소드는 'socialSecurity'와 'socialSecurity:'로 이름 지어져 있다. 입력 박스는 단지 현재의 사회 보장 번호를 뿌리기만 한지만 모델의 값을 요청하는 방법만을 알고있다.( DeleteMe 수정 필요 ) 그래서 우리는 value mesage를 socialSecurity로 변환 해야 한다.우리는 Pluggable Adapter 객체를 이런 목적을 위해서 사용할수 있다.자 우리의 예제를 위한 interaction 다이어 그램을 보자
         이 다이어 그램은 단순화 시킨것이다.;그것은 개념적으로 Pluggable Adpter의 수행 방식을 묘사한다.그러나, Adaptee에게 보내지는 메세지는 상징적으로 표현되는 메세지든, 우회해서 가는 메세지든 이런것들을 허가하는 perform:을 이용하여 실제로 사용된다.|Pluggable Adpater는 Symbol로서 메세지 수집자를 가질수 있고, 그것의 Adaptee에서 만약 그것이 평범한 메세지라면 수집자인 perform에게 어떠한 시간에도 이야기 할수 있다.|예를 들어서 selector 가 Symbol #socialSecurity를 참조할때 전달되는 메세지인 'anObject socialSecurity'는 'anObject perform: selector' 과 동일하다. |이것은 Pluggable Adapter나 Message-Based Pluggable Adapter에서 메세지-전달(message-forwading) 구현되는 키이다.| Adapter의 client는 Pluggable Adapter에게 메세지 수집자의 value와 value: 간에 통신을 하는걸 알린다,그리고 Adapter는 이런 내부적 수집자를 보관한다.|우리의 예제에서 이것은 client가 'Symbol #socialSecurity와 value 그리고 '#socialSecurity:'와 'value:' 이렇게 관계 지어진 Adapter와 이야기 한는걸 의미한다.|양쪽중 아무 메세지나 도착할때 Adapter는 관련있는 메세지 선택자를 그것의 'perform:'.을 사용하는 중인 Adaptee 에게 보낸다.|우리는 Sample Code부분에서 그것의 정확한 수행 방법을 볼것이다.
         === Parameterized Adapter ===
  • 2dInDirect3d/Chapter1 . . . . 16 matches
          === Adapter ===
          설마 그래픽카드(Adapter)를 여러개 다는 집은 흔하지 않을 거라 생각하지만, 만일의 사태를 대비해서 모두 만들어 두었다
         UINT IDirect3D8::GetAdapterCount();
          어댑터에는 모두 번호가 붙어있다. 첫번째 어댑터에는 0, 두번째 어댑터에는 1, 이런 식이다. 0은 기본으로 있기 때문에 매크로로도 만들어져 있다. '''D3DADAPTER_DEFAULT''' 매크로이다. 0번 어댑터를 기본 어댑터라고도 한다.
         HRESULT GetAdapterIdentifier {
          UINT Adapter,
          D3DADAPTER_IDENTIFIER8* pIdentifier
          2. [IN] 첫번째 인자는, 어댑터의 번호이다. 당연히 D3DADAPTER_DEFAULT를 넣어준다.
          UINT Adapter,
          === Looking at Adapter Display Modes ===
         UINT IDirect3D8::GetAdapterModeCount(
          UINT Adapter;
          1. Adapter에는 어댑터의 번호(D3DADAPTER_DEFAULT)를 넣는다. 리턴값은 표시할 수 있는 모드의 개수
         HRESULT IDirect3D8::EnumAdapterModes(
          UINT Adapter,
          1. Adapter에는 어댑터의 번호를, Mode에는 표시할 모드의 번호(0 ~ GetAdapterModeCount() - 1의 범위)를 넣는다.
         HRESULT GetAdapterDisplayMode(
          UINT Adapter,
  • Gof/Adapter . . . . 6 matches
         = Adapter =
         클래스의 인터페이스를 다른 필요한 클래스의 인터페이스에 맞게 변환해준다. Adapter 는 서로 호환성이 없는 인터페이스들끼리라도 같이 작동할 수 있게끔 해준다.
         다음과 같은 경우에 AdapterPattern를 이용한다.
          * (object adapter 의 경우에만 해당) 현재 이미 만들어진 여러개의 subclass가 필요한 경우, 하지만 각각의 서브클래스들에 대한 인터페이스를 하는 것은 비효율적이다. 이 경우 parent class의 인터페이스를 adapt 할 수 있다.
         adapter 클래스는 하나의 interface를 다른 interface 에 적합하게 맞춰주기 위해 (말 그대로 어뎁터 역할~) 다중상속을 이용한다.
         adapter 객체는 object composition 에 의존한다.
          * Adapter (TextShape)
          * 해당 클래스를 이용하는 Client들은 Adapter 인스턴스의 operation들을 호출한다. adapter는 해당 Client의 요청을 수행하기 위해 Adaptee 의 operation을 호출한다.
         We'll give a brief sketch of the implementation of class and object adapters for the Motivation example beginning with the classes Shape and TextView.
         Shape assumes a bounding box defined by its opposing corners. In contrast, TextView is defined by an origin, height, and width. Shape also defines a CreateManipulator operation for creating a Manipulator object, which knowns how to animate a shape when the user manipulates it. TextView has no equivalent operation. The class TextShape is an adapter between these different interfaces.
         A class adapter uses multiple inheritance to adapt interfaces. The key to class dapters is to use one inheritance branch to inherit the interface and another branch to inherit the implementation. The usual way to make this distinction in C++ is to inherit the interface publicly and inherit the implementation privately. We'll use this convention to define the TextShape adapter.
         The IsEmpty operations demonstrates the direct forwarding of requests common in adapter implementations:
         The object adapter uses object composition to combine classes with different interfaces. In this approach, the adapter TextShape maintains a pointer to TextView.
         CreateManipulator's implementation doesn't change from the class adapter version, since it's implemented from scratch and doesn't reuse any existing TextView functionality.
         Compare this code the class adapter case. The object adapter requires a little more effort to write, but it's more flexible. For example, the object adapter version of TextShape will work equally well with subclasses of TextView -- the client simply passes an instance of a TextView subclass to the TextShape constructor.
         BridgePattern 은 adapter object와 비슷한 구조를 가진다. 하지만 BridgePattern의 AdapterPattern과 그 의도가 다르다. BridgePattern은 실제 구현부와 interface부분을 분리시켜 실제 구현 부분이 다양하고 독립적일 수 있도록 하기 위한 것이다. adapter는 현재 이미 존재하는 객체에 대한 interface를 바꾸기 위해 이용된다.
         DecoratorPattern은 객체에 대한 인터페이스의 변화없이 객체를 확장시킨다. Decorator 는 adapter보다 더 application에 대해 투명적이다. 결론적으로 DecoratorPattern은 재귀적인 composition을 제공한다. 이것은 순수한 adapter로서는 불가능하다.
  • DPSCChapter4 . . . . 4 matches
         '''["Adapter"](105)''' Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces
         '''Adapter(105)''' 는 다른 인터페이스의 Clients들이 예상할수 있는 형태오 클래스의 인터페이스를 변형시킨다. 즉, Adapter는 양립할수 없는 다른 상황의 두가지의 일을 수행하는 클래스를 상호간연결시키는 역할을 한다.
  • LearningGuideToDesignPatterns . . . . 4 matches
         Proxy 가 어떻게 object에 대한 access를 control 하는지 공부하라. 이 패턴은 뒤의 AdapterPattern을 직접적으로 이끌어낸다.
         === Adapter - Structural ===
         AdapterPattern은 DecoratorPattern, ProxyPattern, 그리고 뒤에 이어지는 BridgePattern에 대해 학습자가 알고 있는 지식과 비교되어진다.
         최종적으로, 학습자는 어떻게 BridgePattern이 AdapterPattern 과 ProxyPattern 과 다른지 공부하게 된다.
  • 데블스캠프2004/금요일 . . . . 4 matches
         import java.awt.event.MouseAdapter;
          addMouseListener(new MouseAdapter() {
         import java.awt.event.MouseAdapter;
          addMouseListener(new MouseAdapter() {
  • Android/WallpaperChanger . . . . 3 matches
          || 4/22 || 커니의 안드로이드에 있는 예제는 Adapter + SQL을 써서 따로 분리된 예제로 실습후 커니의 안드로이드 예제 실습 ||
         || 4/28 || WallPaperAndroidService에서 Bitmap Loading방식 바꿈. 먼저 Loading을 해서 준비해놓고 순서가 오면 화면이 바뀌는 형식으로 바꿔놓음.시간 설정 저장 DB adapter생성 및 DB새로 만들어서 저장함.사용자의 편의를 위한 TextView설명 추가 ||
          * Custom Android List Adapter : http://androidhuman.tistory.com/entry/11-List-%EC%A7%91%EC%A4%91%EA%B3%B5%EB%9E%B5-3-Custom-ArrayAdapter%EB%A5%BC-%EC%9D%B4%EC%9A%A9%ED%95%9C-ListView
  • TicTacToe/조재화,신소영 . . . . 3 matches
         import java.awt.event.MouseAdapter;
         import java.awt.event.MouseAdapter.*;
          addMouseListener(new MouseAdapter() {
  • GRASP . . . . 2 matches
          Adapter, Command, Composite, Proxy, State, Strategy
          Adapter, Command, Strategy
  • PatternCatalog . . . . 2 matches
          * ["AdapterPattern"]
          * ["Gof/Adapter"]
  • TheJavaMan/숫자야구 . . . . 2 matches
         import java.awt.event.WindowAdapter;
          addWindowListener(new WindowAdapter(){
  • TheJavaMan/스네이크바이트 . . . . 2 matches
          addKeyListener(new KeyAdapter(){
          addWindowListener(new WindowAdapter(){
  • TicTacToe/zennith . . . . 2 matches
         import java.awt.event.MouseAdapter;
          addMouseListener(new MouseAdapter() {
  • TicTacToe/김홍선 . . . . 2 matches
         import java.awt.event.MouseAdapter;
          addMouseListener(new MouseAdapter() {
  • TicTacToe/박진영,곽세환 . . . . 2 matches
         import java.awt.event.MouseAdapter;
          addMouseListener(new MouseAdapter() {
  • TicTacToe/유주영 . . . . 2 matches
          import java.awt.event.MouseAdapter;
          addMouseListener(new MouseAdapter() {
  • TicTacToe/임민수,하욱주 . . . . 2 matches
         import java.awt.event.MouseAdapter;
          addMouseListener(new MouseAdapter() {
  • TicTacToe/조동영 . . . . 2 matches
         import java.awt.event.MouseAdapter;
          addMouseListener(new MouseAdapter() {
  • TicTacToe/후근,자겸 . . . . 2 matches
         import java.awt.event.MouseAdapter;
          addMouseListener(new MouseAdapter() {
  • 2dInDirect3d/Chapter2 . . . . 1 match
          UINT Adapter, // 어댑터의 번호, D3DADAPTER_DEFAULT를 사용
  • AcceleratedC++/Chapter6 . . . . 1 match
          * 다음으로 반복자 어댑터(Iterator Adapters)를 살펴보자. 반복자 어댑터는 컨테이너를 인자로 받아, 정해진 작업을 수행하고 반복자를 리턴해주는 함수이다. copy알고리즘에 쓰인 back_inserter는 ret의 뒤에다가 copy를 수행한다는 것이다. 그럼 다음과 같이 쓰고 싶은 사람도 있을 것이다.
  • AdapterPattern . . . . 1 match
         #redirect Gof/Adapter
  • Button/진영 . . . . 1 match
          addWindowListener(new WindowAdapter()
  • NIC . . . . 1 match
         Network Interface Card 혹은 Adapter
  • ProjectPrometheus/Journey . . . . 1 match
         하지만, 실제로 Library 내부에서는 많은 일들이 작동한다. 즉, keyword 를 해당 HTTP에서 GET/POST 스타일로 바꿔줘야 하고 (일종의 Adapter), 이를 HttpSpider 에게 넘겨주고 그 결과를 파싱하여 객체로 만든 뒤 Client 에게 돌려줘야 한다.
  • TheJavaMan/테트리스 . . . . 1 match
          class MyKeyHandler extends KeyAdapter
  • TicTacToe/노수민 . . . . 1 match
          addMouseListener(new MouseAdapter() {
  • TicTacToe/임인택 . . . . 1 match
          addMouseListener(new MouseAdapter() {
  • 코바용어정리 . . . . 1 match
         == 객체 어댑터(Object Adapter) ==
Found 29 matching pages out of 7555 total pages (5000 pages are searched)

You can also click here to search title.

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:26
Processing time 0.0100 sec