SlideShare a Scribd company logo
Track ::알고리즘과 고급 토픽9장  |STL 고급각 개체들의 효율적인 연결 방법10장  |   추상 인터페이스http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::알고리즘과 고급 토픽9장  |STL 고급각 개체들의 효율적인 연결 방법10장  |   추상 인터페이스http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::알고리즘과 고급 토픽9장  |STL 고급Functor?Functor AdapterAlgorithmStringhttp://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::9장  |STL 고급Functor?Functor AdapterAlgorithmStringhttp://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Functor(함수자 또는 함수 객체)란?-operator()를 연산자 오버로드 하고 있는 클래스의 객체-인자를 전달하는 과정의 편리함.http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::9장  |STL 고급Functor?Functor AdapterAlgorithmStringhttp://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
FunctorAdapter-일반 함수, 함수 포인터, 함수자를 인자로 받아서 새로운 함수자를 생성한다.http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Binder (bind1st, bind2nd)이항 함수자를 단항 함수자로 변경binder1st< less<int> > binder = bind1st(less<int>(), 10 );// bind1st과 param2 비교  (L < R) ?	cout << binder(5)<<endl;	cout << less<int>()(10, 5)<< endl;	cout << bind1st(less<int>(), 10 )(5)<<endl;binder2nd< less<int> > binder= bind2nd(less<int>(), 5);// param1과 bind2nd 비교  (L < R) ?	cout << binder(10) << endl;	cout << less<int>() (10, 5) << endl;	cout << bind2nd(less<int>(), 5 )(10) << endl;2nd1stFunctorhttp://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::9장  |STL 고급Functor?Functor AdapterAlgorithmStringhttp://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Algorithm-STL의 많은 부분이 알고리즘으로 구성되어 있다.http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Algorithm (변형 불가):: Find-모든 항목 사이를 반복하면서 항목을 찾음-규칙성이 없는 상황에만 사용하는 것이 좋다.:: For_each-컨테이너 각 요소에 대하여 특정 함수를 실행 (향상된 for문):: Count-전체 요소 수를 알고자 할때는 size() 사용count는 특정 조건에 맞는 요소만 센다.http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::9장  |STL 고급Functor?Functor AdapterAlgorithmStringhttp://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
String-STL내에 string클래스를 제공한다.-필요에 따라 크기가 늘어난다.:: 성능에 대한 고려문자열 리터럴을 그대로 전달하는 과정의 복사 조심http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
String을 대신 할 수 있는 것들Rope-표준이 아닌 템플릿 클래스-rope< type, allocator>-아주 긴 문자열을 하나의 단위로 작업 가능 (작은 문자 비효율적)CString-MFCSTL과 호환 불가Vector<char>-char 배열과 유사-참조 카운팅 가능, CoW(Copy on Write)http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::알고리즘과 고급 토픽9장  |STL 고급각 개체들의 효율적인 연결 방법10장  |   추상 인터페이스http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::알고리즘과 고급 토픽9장  |STL 고급각 개체들의 효율적인 연결 방법10장  |   추상 인터페이스http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::인터페이스?격리 설계팩토리 패턴확장10장  |   추상 인터페이스http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::10장  |   추상 인터페이스인터페이스?격리 설계팩토리 패턴단점?http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Interface 개념-추상 인터페이스는 순수 가상 함수이다.-추상 인터페이스는 껍데기이다.http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::10장  |   추상 인터페이스인터페이스?격리 설계팩토리 패턴단점?http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
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.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::10장  |   추상 인터페이스인터페이스?격리 설계팩토리 패턴단점?http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Interface ::팩토리 패턴격리 설계를 할 경우-> 헤더 파일의 크기Interface팩토리 패턴을 통한 완전한 분리OGLD3DGraphicsRenderFactoryGraphicsRenderFactory factory;IGraphicsRenderer* g_pRenderer;g_pRenderer = factory.CreateRenderer(“OGL”);g_pRenderer = factory.CreateRenderer(“D3D”);http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Track ::10장  |   추상 인터페이스인터페이스?격리 설계팩토리 패턴단점?http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
Interface ::단점-코드의 복잡성 증가-디버그가 어려워 진다. (추상 인터페이스형이 비어있는 경우)-가상 함수로 인한 성능 저하-위와 같은 단점들이 해를 입히는 데미지보다추상 인터페이스 구현으로 인해 얻는 것들이 더 많기때문에 적극적으로 활용http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr
감사합니다.http://raimsoft.comDreamexecutionWarrock Client team Choi Jun Hyeokhttp://dreamexe.co.kr

More Related Content

PDF
Shortest path
PPTX
Etiqueta
PPTX
Contratos
PPTX
Goachi Affiliate Program
PPTX
Búsqueda avanzada
DOCX
Matematicas iv...
PDF
Actividad de seguridad - Identificación de riesgos, medidas preventivas y pro...
PDF
Peru Electronic Invoicing and Tax Reporting Requirements
Shortest path
Etiqueta
Contratos
Goachi Affiliate Program
Búsqueda avanzada
Matematicas iv...
Actividad de seguridad - Identificación de riesgos, medidas preventivas y pro...
Peru Electronic Invoicing and Tax Reporting Requirements

Viewers also liked (7)

PPTX
Probability distribution
PDF
Mexico Electronic Invoicing and Tax Reporting Requirements
PPTX
Slogan empaque y matriz bcg
PDF
Overview of Latin America Electronic Invoicing and Tax Reporting Requirements
PDF
10. Traditional cases of housing
PPTX
Vernacular architecture in india
PPTX
Let’s talk money! Organising the means for sustainability including municipal...
Probability distribution
Mexico Electronic Invoicing and Tax Reporting Requirements
Slogan empaque y matriz bcg
Overview of Latin America Electronic Invoicing and Tax Reporting Requirements
10. Traditional cases of housing
Vernacular architecture in india
Let’s talk money! Organising the means for sustainability including municipal...
Ad

Similar to 9장10장,stl abstract interface (20)

PPTX
RTTI
PDF
Java stream v0.1
PDF
Java stream v0.1
PPT
어플리케이션 성능 최적화 기법
PDF
[2B2]기계 친화성을 중심으로 접근한 최적화 기법
PDF
2017 tensor flow dev summit
PPTX
파이썬 플라스크 이해하기
PPTX
About Visual C++ 10
PDF
llvm 소개
PDF
R2서버정진욱
PDF
[Swift] Protocol (1/2)
PDF
Cse342 chapter 04
PDF
AWS CLOUD 2018- 관리형 Kubernetes 지원과 새로운 컨테이너 서비스 Amazon Fargate 소개 (정영준 솔루션즈 아...
PDF
[RAG Tutorial] 02. RAG 프로젝트 파이프라인.pdf
PDF
제 19회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [백발백준] : 백준봇 : 컨테이너 오케스트레이션 기반 백준 문제 추천 봇
PDF
Mastering ethereum(smart contract)
PDF
제 17회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [Catch, Traffic!] : 지하철 혼잡도 및 키워드 분석 데이터 파이프라인 구축
PDF
송창규, unity build로 빌드타임 반토막내기, NDC2010
PDF
(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원
PDF
스위프트 성능 이해하기
RTTI
Java stream v0.1
Java stream v0.1
어플리케이션 성능 최적화 기법
[2B2]기계 친화성을 중심으로 접근한 최적화 기법
2017 tensor flow dev summit
파이썬 플라스크 이해하기
About Visual C++ 10
llvm 소개
R2서버정진욱
[Swift] Protocol (1/2)
Cse342 chapter 04
AWS CLOUD 2018- 관리형 Kubernetes 지원과 새로운 컨테이너 서비스 Amazon Fargate 소개 (정영준 솔루션즈 아...
[RAG Tutorial] 02. RAG 프로젝트 파이프라인.pdf
제 19회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [백발백준] : 백준봇 : 컨테이너 오케스트레이션 기반 백준 문제 추천 봇
Mastering ethereum(smart contract)
제 17회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [Catch, Traffic!] : 지하철 혼잡도 및 키워드 분석 데이터 파이프라인 구축
송창규, unity build로 빌드타임 반토막내기, NDC2010
(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원
스위프트 성능 이해하기
Ad

More from Mark Choi (14)

PPT
GameMath-Chapter 13 발사체
PPT
GameMath-Chapter 10 다각형기법
PPT
GameMath-Chapter 09 가시성판단
PPT
GameMath-Chapter 08 고급렌더링
PPT
GameMath-Chapter 07 조명
PPT
GameMath-Chapter 06 카메라
PPT
GameMath-Chapter 04 사원수
PPT
GameMath-Chapter 03 변환
PPT
Chapter 02 행렬
PPT
GameMath-Chapter 11 운동학
PPT
GameMath-Chapter 01 벡터
PPTX
로그라이크 (Rogue like)
PPTX
6장 performance of game_최준혁_2
PPTX
STL활용, abstract interface
GameMath-Chapter 13 발사체
GameMath-Chapter 10 다각형기법
GameMath-Chapter 09 가시성판단
GameMath-Chapter 08 고급렌더링
GameMath-Chapter 07 조명
GameMath-Chapter 06 카메라
GameMath-Chapter 04 사원수
GameMath-Chapter 03 변환
Chapter 02 행렬
GameMath-Chapter 11 운동학
GameMath-Chapter 01 벡터
로그라이크 (Rogue like)
6장 performance of game_최준혁_2
STL활용, abstract interface

9장10장,stl abstract interface

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