1. Track :: 알고리즘과 고급 토픽 9장 |STL 고급 각 개체들의 효율적인 연결 방법 10장 | 추상 인터페이스 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
2. Track :: 알고리즘과 고급 토픽 9장 |STL 고급 각 개체들의 효율적인 연결 방법 10장 | 추상 인터페이스 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
3. Track :: 알고리즘과 고급 토픽 9장 |STL 고급 Functor? Functor Adapter Algorithm String http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
4. Track :: 9장 |STL 고급 Functor? Functor Adapter Algorithm String http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
5. Functor(함수자 또는 함수 객체)란? -operator()를 연산자 오버로드 하고 있는 클래스의 객체-인자를 전달하는 과정의 편리함. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
6. Track :: 9장 |STL 고급 Functor? Functor Adapter Algorithm String http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
7. FunctorAdapter -일반 함수, 함수 포인터, 함수자를 인자로 받아서 새로운 함수자를 생성한다. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
9. Track :: 9장 |STL 고급 Functor? Functor Adapter Algorithm String http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
10. Algorithm -STL의 많은 부분이 알고리즘으로 구성되어 있다. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
11. Algorithm (변형 불가) :: Find -모든 항목 사이를 반복하면서 항목을 찾음-규칙성이 없는 상황에만 사용하는 것이 좋다. :: For_each -컨테이너 각 요소에 대하여 특정 함수를 실행 (향상된 for문) :: Count -전체 요소 수를 알고자 할때는 size() 사용count는 특정 조건에 맞는 요소만 센다. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
12. Track :: 9장 |STL 고급 Functor? Functor Adapter Algorithm String http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
13. String -STL내에 string클래스를 제공한다. -필요에 따라 크기가 늘어난다. :: 성능에 대한 고려 문자열 리터럴을 그대로 전달하는 과정의 복사 조심 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
14. String을 대신 할 수 있는 것들 Rope -표준이 아닌 템플릿 클래스-rope< type, allocator> -아주 긴 문자열을 하나의 단위로 작업 가능 (작은 문자 비효율적) CString -MFC STL과 호환 불가 Vector<char> -char 배열과 유사 -참조 카운팅 가능, CoW(Copy on Write) http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
15. Track :: 알고리즘과 고급 토픽 9장 |STL 고급 각 개체들의 효율적인 연결 방법 10장 | 추상 인터페이스 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
16. Track :: 알고리즘과 고급 토픽 9장 |STL 고급 각 개체들의 효율적인 연결 방법 10장 | 추상 인터페이스 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
17. Track :: 인터페이스? 격리 설계 팩토리 패턴 확장 10장 | 추상 인터페이스 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
18. Track :: 10장 | 추상 인터페이스 인터페이스? 격리 설계 팩토리 패턴 단점? http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
19. Interface 개념 -추상 인터페이스는 순수 가상 함수이다. -추상 인터페이스는 껍데기이다. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
20. Track :: 10장 | 추상 인터페이스 인터페이스? 격리 설계 팩토리 패턴 단점? http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
21. Interface ::격리 설계 예제> 다중 플랫폼(OpenGL, DirectX)에 구애받지 않는 설계(층 분리) class IGraphicsRenderer { virtual void Redner(…)= 0; } class Renderer_D3D : public IGraphicsRenderer { virtual void Redner(…)= 0; } class Renderer_OGL : public IGraphicsRenderer { virtual void ~Redner(…)= 0; } IGraphicsRenderer* g_pRenderer= new GraphicsRendererOGL(); = new GraphicsRendererD3D(); http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
22. Track :: 10장 | 추상 인터페이스 인터페이스? 격리 설계 팩토리 패턴 단점? http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
23. Interface ::팩토리 패턴 격리 설계를 할 경우-> 헤더 파일의 크기 Interface 팩토리 패턴을 통한 완전한 분리 OGL D3D GraphicsRenderFactory GraphicsRenderFactory factory; IGraphicsRenderer* g_pRenderer; g_pRenderer = factory.CreateRenderer(“OGL”); g_pRenderer = factory.CreateRenderer(“D3D”); http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
24. Track :: 10장 | 추상 인터페이스 인터페이스? 격리 설계 팩토리 패턴 단점? http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
25. Interface ::단점 -코드의 복잡성 증가 -디버그가 어려워 진다. (추상 인터페이스형이 비어있는 경우) -가상 함수로 인한 성능 저하 -위와 같은 단점들이 해를 입히는 데미지보다추상 인터페이스 구현으로 인해 얻는 것들이 더 많기 때문에 적극적으로 활용 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr