SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Track :: 알고리즘과 고급 토픽 9장  |STL 고급 각 개체들의 효율적인 연결 방법 10장  |   추상 인터페이스 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 알고리즘과 고급 토픽 9장  |STL 고급 각 개체들의 효율적인 연결 방법 10장  |   추상 인터페이스 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 알고리즘과 고급 토픽 9장  |STL 고급 Functor? Functor Adapter Algorithm String http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 9장  |STL 고급 Functor? Functor Adapter Algorithm String http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Functor(함수자 또는 함수 객체)란? -operator()를 연산자 오버로드 하고 있는 클래스의 객체-인자를 전달하는 과정의 편리함. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 9장  |STL 고급 Functor? Functor Adapter Algorithm String http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
FunctorAdapter -일반 함수, 함수 포인터, 함수자를 인자로 받아서  새로운 함수자를 생성한다. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://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; 2nd 1st Functor http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 9장  |STL 고급 Functor? Functor Adapter Algorithm String http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Algorithm -STL의 많은 부분이 알고리즘으로 구성되어 있다. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Algorithm (변형 불가) :: Find -모든 항목 사이를 반복하면서 항목을 찾음-규칙성이 없는 상황에만 사용하는 것이 좋다. :: For_each -컨테이너 각 요소에 대하여 특정 함수를 실행 (향상된 for문) :: Count -전체 요소 수를 알고자 할때는 size() 사용count는 특정 조건에 맞는 요소만 센다. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 9장  |STL 고급 Functor? Functor Adapter Algorithm String http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
String -STL내에 string클래스를 제공한다. -필요에 따라 크기가 늘어난다. :: 성능에 대한 고려 문자열 리터럴을 그대로 전달하는 과정의 복사 조심 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
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
Track :: 알고리즘과 고급 토픽 9장  |STL 고급 각 개체들의 효율적인 연결 방법 10장  |   추상 인터페이스 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 알고리즘과 고급 토픽 9장  |STL 고급 각 개체들의 효율적인 연결 방법 10장  |   추상 인터페이스 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 인터페이스? 격리 설계 팩토리 패턴 확장 10장  |   추상 인터페이스 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 10장  |   추상 인터페이스 인터페이스? 격리 설계 팩토리 패턴 단점? http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Interface 개념 -추상 인터페이스는 순수 가상 함수이다. -추상 인터페이스는 껍데기이다. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 10장  |   추상 인터페이스 인터페이스? 격리 설계 팩토리 패턴 단점? http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://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.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Track :: 10장  |   추상 인터페이스 인터페이스? 격리 설계 팩토리 패턴 단점? http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
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
Track :: 10장  |   추상 인터페이스 인터페이스? 격리 설계 팩토리 패턴 단점? http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
Interface ::단점 -코드의 복잡성 증가 -디버그가 어려워 진다. (추상 인터페이스형이 비어있는 경우) -가상 함수로 인한 성능 저하 -위와 같은 단점들이 해를 입히는 데미지보다추상 인터페이스 구현으로 인해 얻는 것들이 더 많기 때문에 적극적으로 활용 http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr
감사합니다. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (9)

Peru Electronic Invoicing and Tax Reporting Requirements
Peru Electronic Invoicing and Tax Reporting RequirementsPeru Electronic Invoicing and Tax Reporting Requirements
Peru Electronic Invoicing and Tax Reporting Requirements
 
Probability distribution
Probability distributionProbability distribution
Probability distribution
 
Mexico Electronic Invoicing and Tax Reporting Requirements
Mexico Electronic Invoicing and Tax Reporting RequirementsMexico Electronic Invoicing and Tax Reporting Requirements
Mexico Electronic Invoicing and Tax Reporting Requirements
 
Ponencia Principal - AWS Summit - Madrid
Ponencia Principal - AWS Summit - MadridPonencia Principal - AWS Summit - Madrid
Ponencia Principal - AWS Summit - Madrid
 
Slogan empaque y matriz bcg
Slogan   empaque y matriz  bcgSlogan   empaque y matriz  bcg
Slogan empaque y matriz bcg
 
Overview of Latin America Electronic Invoicing and Tax Reporting Requirements
Overview of Latin America Electronic Invoicing and Tax Reporting RequirementsOverview of Latin America Electronic Invoicing and Tax Reporting Requirements
Overview of Latin America Electronic Invoicing and Tax Reporting Requirements
 
10. Traditional cases of housing
10. Traditional cases of housing10. Traditional cases of housing
10. Traditional cases of housing
 
Vernacular architecture in india
Vernacular architecture in indiaVernacular architecture in india
Vernacular architecture in india
 
Let’s talk money! Organising the means for sustainability including municipal...
Let’s talk money! Organising the means for sustainability including municipal...Let’s talk money! Organising the means for sustainability including municipal...
Let’s talk money! Organising the means for sustainability including municipal...
 

Ähnlich wie 9장10장,stl abstract interface

어플리케이션 성능 최적화 기법
어플리케이션 성능 최적화 기법어플리케이션 성능 최적화 기법
어플리케이션 성능 최적화 기법
Daniel Kim
 
R2서버정진욱
R2서버정진욱R2서버정진욱
R2서버정진욱
jungjinwouk
 
AWS CLOUD 2018- 관리형 Kubernetes 지원과 새로운 컨테이너 서비스 Amazon Fargate 소개 (정영준 솔루션즈 아...
AWS CLOUD 2018- 관리형 Kubernetes 지원과 새로운 컨테이너 서비스 Amazon Fargate 소개 (정영준 솔루션즈 아...AWS CLOUD 2018- 관리형 Kubernetes 지원과 새로운 컨테이너 서비스 Amazon Fargate 소개 (정영준 솔루션즈 아...
AWS CLOUD 2018- 관리형 Kubernetes 지원과 새로운 컨테이너 서비스 Amazon Fargate 소개 (정영준 솔루션즈 아...
Amazon Web Services Korea
 
송창규, unity build로 빌드타임 반토막내기, NDC2010
송창규, unity build로 빌드타임 반토막내기, NDC2010송창규, unity build로 빌드타임 반토막내기, NDC2010
송창규, unity build로 빌드타임 반토막내기, NDC2010
devCAT Studio, NEXON
 

Ähnlich wie 9장10장,stl abstract interface (20)

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

Mehr von Mark Choi

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

Mehr von Mark Choi (14)

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

9장10장,stl abstract interface

  • 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
  • 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; 2nd 1st Functor 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
  • 26. 감사합니다. http://raimsoft.com DreamexecutionWarrock Client team Choi Jun Hyeok http://dreamexe.co.kr