Presentation is loading. Please wait.

Presentation is loading. Please wait.

Visual C++ 2008 Feature Pack www.anycoding.com Furyheimdall.tistory.com.

Similar presentations


Presentation on theme: "Visual C++ 2008 Feature Pack www.anycoding.com Furyheimdall.tistory.com."— Presentation transcript:

1 Visual C++ 2008 Feature Pack
Furyheimdall.tistory.com

2 Contents 1 Overview 2 MFC Update 3 C++ TR1 4 Q&A Company Logo
/ furyheimdall.tistory.com Company Logo

3 Overview What’s a Visual C++ Feature Pack? System Requirements
MFC의 Update버전인 MFCNext와 C++0x 표준에 들어갈 TR1의 지원이 포함된 업그레이드 팩 -MFCNext : -TR1 : System Requirements Supported Operating Systems: Windows Server 2003; Windows Vista; Windows XP Visual Studio: This Feature Pack is only supported on systems which have the English language (ENU) version of Visual Studio 2008 Standard Edition or above installed. Support for systems with non-English versions of Visual Studio 2008 installed will be available in Visual Studio 2008 Service Pack 1. / furyheimdall.tistory.com Company Logo

4 MFC Update Office Ribbon style interface
Office 2007, Office 2003 and Office XP look and feel Modern Visual Studio-style docking toolbars and panes Fully customizable toolbars and menus A rich set of advanced GUI controls Advanced MDI tabs and groups And much more / furyheimdall.tistory.com Company Logo

5 Office Ribbon style interface
MFC Update (Continue) Office Ribbon style interface / furyheimdall.tistory.com Company Logo

6 Office 2007, Office 2003 and Office XP look and feel
MFC Update (Continue) Office 2007, Office 2003 and Office XP look and feel (Visual Manager) Windows Explorer Project Style + Visual Studio 2005 Visual Style Visual Studio Project Style+ Visual Studio 2005 Visual Style Office Project Style + Office Visual Style / furyheimdall.tistory.com Company Logo

7 MFC Update (Continue) Modern Visual Studio-style docking toolbars and panes (Smart Docking) / furyheimdall.tistory.com Company Logo

8 Fully customizable toolbars and menus
MFC Update (Continue) Fully customizable toolbars and menus / furyheimdall.tistory.com Company Logo

9 Advanced MDI tabs and groups
MFC Update (Continue) Advanced MDI tabs and groups MDI Tabbed Standard MDI Tabbed Group :Default / furyheimdall.tistory.com Company Logo

10 C++ TR1 C++ 라이브러리 작업 그룹이 작성한 1차 기술 보고서 (Technical Report 1)
* Finialize 되지 않은 Draft 규격 Smart pointers(Shared_ptr) Regular expression parsing New containers (tuple, array, unordered set, etc) Sophisticated random number generators Polymorphic function wrappers Type traits And more! / furyheimdall.tistory.com Company Logo

11 C++ TR1 (Continue) shared_ptr
자원의 라이프타임을 관리하는 일은 대부분 프로그램에서 발생하는 공통적인 문제. 자원관리 문제를 해결하기 위해서 사용할 수 있는 방법 - 자동변수 (Resource acquisition is initialization) - Garbage Collection 사용 모든 경우에 적용은 불가능. - RAII는 자원의 라이프타임이 정적으로 정해질 수 있고, 프로그램의 lexical 구 조에 맞아 떨어질때 쓸수 있음. - Garbage Collection 은 메모리 관리에는 적합하지만 다른 자원에는 필요 이 상으로 복잡한 해결책. 이에 대한으로 참조 카운트 smart point 의 등장. / furyheimdall.tistory.com Company Logo

12 shared_ptr (Continue)
C++ TR1 (Continue) shared_ptr (Continue) 참조 카운트 포인터의 기본 아이디어 - raw 포인터를 사용하지 않고 포인터 "처럼 보이는" wrapper 클래스를 사용. - *연산자로 dereference 가 가능하며, ->연산자로 멤버에 접근 가능. Raw포인터와 차이점 wrapper 클래스는 몇가지 기본 연산과 생성자, 소멸자, 할당 연산자를 정의해서 특정 객체에 대한 소유자의 정보를 유지 C++ 은 TR1은 참조카운트 smart pointer 로 shared_ptr 를 제공 / furyheimdall.tistory.com Company Logo

13 C++ TR1 (Continue) Shared_ptr example Company Logo
#include <memory> #include <iostream> using namespace std; using namespace std::tr1; class TClass { public: TClass(){} void DeleteObject(){ cout << “DeleteObject" << endl; } private: ~TClass(){ } }; void TClassDeleter(TClass *p) p->DeleteObject(); int main() { shared_ptr<int> ptr0; shared_ptr<int> ptr1(new int(18)); cout << "ptr0 address : " << ptr0 << endl; cout << "ptr1 dereference : " << *ptr1 << endl; shared_ptr<TClass> ptr2(new TClass, TClassDeleter); shared_ptr<TClass> ptr3(ptr2); return (0); } / furyheimdall.tistory.com Company Logo

14 C++ TR1 (Continue) New containers tuple : STL pair의 확장판.
pair은 항상 두 객체를 하나로 묶어야 할 경우에 유용. (ex:함수가 여러개의 값을 리턴할 때) but, 꼭 두개의 값을 묶을 때만 pair 을 쓸 수 있는 것은 제약이 심함. TR1은 2개 이상의 객체를 하나로 묶을 수 있는 컨테이너로 tuple을 도입 array: C/C++ 기본 배열을 사용하게 되면 길이를 비롯해서 불편한 점이 많음. 일반적으로 TR1 전에는 std::vector 을 대신해서 사용. TR1에는 array 클래스가 도입. 기존 STL 알고리즘과 호환되는 면에서 장점. / furyheimdall.tistory.com Company Logo

15 New containers (Continue)
C++ TR1 (Continue) New containers (Continue) Unordered Associative Containers: TR1에서 4개의 연관 컨테이너(Associative Containers)추가 - unordered_set - unordered_multiset - unordered_map - unorderd_multimap -TR1에서 새로 추가된 순서없는 컨테이너는 기존 컨테이너 보다 검색속도가 빠름 -다른 STL 컨테이너와 마찬가지로 동일한 요소들만 허용. / furyheimdall.tistory.com Company Logo

16 Polymorphic function wrappers
C++ TR1 (Continue) Polymorphic function wrappers problem) A타입과 B 타입의 인자를 취하고 C 타입을 리턴하는 뭔가를 작성. solve) 1. 일반 함수로 작성 f(A a, B b) {...} 2. A를 별도 클래스로 작성했다면 멤버함수로 작성 class A { ... C g(B b); }; 3. std::plus<T> 처럼 함수 객체로 작성 struct h{ C Operator()(A,B) const{...} / furyheimdall.tistory.com Company Logo

17 Polymorphic function wrappers (Continue)
C++ TR1 (Continue) Polymorphic function wrappers (Continue) 이전의 방법들은 서로 문법이나 의미론에서나 차이가 있음. AxB->C 라는 같은 처리를 하는데 세 가지 다른 방법이 있는데, 언어 입장에서 보면 이전 페이지의 세가지 방법은 모두 다른 타입. 이런 다른 방법을 하나의 타입으로 표현하기 위해 function wrapper 클래스 도입 function<C(A,B)> 이라는 타입은 A와 B 를 취하고, C 를 리턴하는 어떤 함수 (일반함수, 멤버함수, 함수객체) 라도 표현할 수 있음. -> 이것은 상위 라이브러리가 사용자가 넘겨준 callback 을 담고 있을 일관된 매커니즘을 갖게 됨. / furyheimdall.tistory.com Company Logo

18 Polymorphic function wrappers Example
C++ TR1 (Continue) Polymorphic function wrappers Example #include <tr1/functional> #include <vector> #include <iostream> using namespace std; using namespace std::tr1; struct my_class {   void f() { cout << "my_class::f()“ << endl; } }; void g(my_class) {   cout << "g(my_class)" << endl; } struct h {   void operator()(my_class) const {     cout << "h::operator()(my_class)" << endl;   } }; int main() {   typedef function<void(my_class)> F;   vector<F> ops;   ops.push_back(&my_class::f);   ops.push_back(&g);   ops.push_back(h());   my_class tmp;   for (vector<F>::iterator i = ops.begin();        i != ops.end();        ++i)     (*i)(tmp); } / furyheimdall.tistory.com Company Logo

19 Q&A Furyheimdall.tistory.com

20 Appendix : Standard C++ Library TR1 Extensions Reference
TR1 Regular Expressions ( TR1 정규 식들(Expressions)  ) Discusses the grammars of the various regular expression engines that TR1 supports. ( TR1을 지원하는 다양한 정규식 표현 엔진의 문법을 의논하다 ) <array> Defines the container template class array and several supporting templates. (  컨테이너 템플릿 클래스 배열과 몇개의 템플릿을 원조하는 것을 정의한다 ) <functional> (TR1) Defines several templates that help construct function objects, which are objects of a type that defines operator(). A function object can be a function pointer, but more typically, the object is used to store additional information that can be accessed during a function call. ( 몇개의 조립을 도와주는 operator()를 정의하는 타입의 객체인 함수객체인 템플릿  정의한다.  함수 객체는 포인터할수 있수 있으나 더 전형적으로는 객체는 함수를 부르는 동안 접근할 수 있는 추가적인 정보를 저장하는데 익숙하다. ) / furyheimdall.tistory.com Company Logo

21 Appendix : Standard C++ Library TR1 Extensions Reference
<memory> (TR1) Defines a class, an operator, and several templates that help allocate and free objects. ( 클래스, 오퍼레이터, 그리고 몇개의 할당과 해제 객체를 돕는 템플릿을 정의한다. ) <random> Defines many random number generators. ( 많은 보편적인 랜덤 수를 정의한다. ) <regex> Defines a template class to parse regular expressions, and several template classes and functions to search text for matches to a regular expression object. ( 정규식 표현과 몇개의 템플릿 클래스들 그리고 정규식 표현 객체에 맞춤을 위한 문서찾기 함수를 분석하는 템플릿 클래스를 정의한다.) <tuple> Defines a template tuple Class whose instances hold objects of varying types. ( 템플릿 각지각색의 타입의 객체를 붙잡는 인스턴스인 tuple class 정의한다. ) <type_traits> Defines templates that provide compile-time constants that give information about the properties of their type arguments. ( 컴파일 시간에 불변하는 그들의 타입 논의의 소유물에 관한 정보를 주는 것을 제공하는 템플릿을 정의한다. ) / furyheimdall.tistory.com Company Logo

22 Appendix : Standard C++ Library TR1 Extensions Reference
<unordered_map> Defines the container template classes unordered_map and unordered_multimap and their supporting templates. ( 컨테이너 템플릿 클래스 unordered_map 과 unordered_mulitmap 과 그들의 지원하는 템플릿들을 정의한다. ) <unordered_set> Defines the container template classes unordered_multiset and unordered_set and their supporting templates. ( 컨테이너 템플릿 클래스 unordered_multiset 과 unordered_set 과 그들의 지원하는 템플릿들을 정의한다. ) <utility> (TR1) Defines several general templates that can be used throughout the Standard Template Library. ( 몇개의 표준 템플릿 라이브러리 전부를 사용할 수 있는 보편적인 템플릿을 정의한다. ) / furyheimdall.tistory.com Company Logo

23 Appendix : Reference site
MSDN TR1 Zeroone Me 김윤수의 이상계를 꿈꾸며 섭스의 프로그래밍 공부 / furyheimdall.tistory.com Company Logo


Download ppt "Visual C++ 2008 Feature Pack www.anycoding.com Furyheimdall.tistory.com."

Similar presentations


Ads by Google