Compile-Time Compression and Resource Generation with C++20
that take a user-suppiled lambda to generate the data needed to render our desired compile-time resource! These are e�ectively templated functions, but we will use the cleaner auto parameter syntax for0 码力 | 59 页 | 1.86 MB | 5 月前3《深入浅出MFC》2/e
ent/view¡ K。 注2:此指message based、event driven 之programming model。 注3:此指message mapping、command routing ¡ K。 2 在技术层次上,唯MFC Internals 堪与本书比拟(本书附录A附有MFC Internals 简介)。 但是MFC Internals 与Dissecting MFC 上新的功能。并在其间深入介绍Runtime Type Information(RTTI)、Dynamic Creation、 Persistence(Serialization)、Message Mapping、Command Routing 等核心技术。这些技术正 是其它书籍最缺乏的部份。此篇之最后数章则脱离Scribble 程序,另成一格。 10 本书前身,1994/08 出版的Visual C++ 对象导向MFC 程序设计基础篇以及1995/04 Journal 1995/07 的一 篇由Paul Dilascia 所撰的文章Meandering Through the Maze of MFC Message and Command Routing,以及Addison Wesley 于1996/06 出版的MFC Internals 一书,也有了相当程度的核 心涉猎,即连前面提及的Programming Windows 95 with MFC0 码力 | 1009 页 | 11.08 MB | 1 年前3Visualize Time Enabled Data using ArcGIS Qt (C++) and Toolkit
build cross platform desktop and mobile apps • Incorporate features such as mapping, geocoding, routing, geoprocessing, etc. • In this sample we will be using the C++ SDKArcGIS Runtime Toolkit for Qt0 码力 | 10 页 | 734.09 KB | 5 月前3Exceptional C++
mechanisms and see how we can leverage them in our application error handling. Did I mention threads? Routing exceptions between threads… oh my!2021 Victor Ciura | @ciura_victor - Exceptional C++ 3 About0 码力 | 113 页 | 24.39 MB | 5 月前3Back to Basics: Exceptions
Write Exception-Safe Code 53 class Widget { private: int i{ 0 }; std::string s{}; Resource* pr{}; // May be nullptr public: // … // … }; 1 2 3 4 5 6 7 8 9 10 11 12 s{}; Resource* pr{}; // May be nullptr public: // … // Copy constructor Widget( Widget const& w ) : i { w.i } , s { w.s } { if( w.pr ) pr = new Resource( *w.pr s{}; Resource* pr{}; // May be nullptr public: // … // Copy constructor Widget( Widget const& w ) : i { w.i } , s { w.s } { if( w.pr ) pr = new Resource( *w.pr0 码力 | 111 页 | 4.87 MB | 5 月前3Back to Basics: Smart Pointers
automatically manage the lifetime of its resource. ▪ Smart Pointers ▪ Allocate und deallocate their resource in the constructor and destructor according to the RAII idiom (Resource Acquisition Is Initialization) ▪ Release the resource if the smart pointer goes out of scope ▪ Are available in four versions raii.cppOverview Name C++ Standard Description std::auto_ptr C++98 ▪ Owns the resource exclusively ▪ „Moves“ its resource during a copy operation std::unique_ptr C++11 ▪ Owns the resource exclusively ▪ Can not be copied ▪ Deals with non-copy objects std::shared_ptr C++11 ▪ Shares a resource ▪ Supports0 码力 | 30 页 | 625.43 KB | 5 月前3Data Structures That Make Video Games Go Round
Environment Variables. ● Error Handler. ● Job system. ● Resource Registry. ● Reads boot data. ● Listens to kernel message pump.Resource Registry Games are constructed with a wide variety of resources meshes, materials, sounds, animations and many more. The resource registry acts as a place to store, manage and manipulate those resources. Resource Registry Renderer Physics System AI Audio compressed_textures behavior_trees audioResource Registry Resource Registry Level is streamed in Resource bundle / pack is unloaded resource_registry.get(“baz/bar/foo.wav”) resource_registry.get (“D271A15B- D4B 0 码力 | 196 页 | 3.03 MB | 5 月前3Delivering safe C++
+ community There is no C/C++ language. Write contemporary C++ An opportunityComplete type-and-resource safety • Is an ideal (aim) of C++ • From very early on (1979) • But “being careful” doesn’t scale achieving that can be found in A brief introduction to C++'s model for type- and resource-safety (2015) and Type-and-resource safety in modern C++ (2021). • No limitations of what can be expressed • Compared October 2023 7Type-and-resource safety • Every object is accessed according to the type with which it was defined (type safety) • Every object is properly constructed and destroyed (resource safety) • Every0 码力 | 74 页 | 2.72 MB | 5 月前3Back to Basics: Designing Classes (part 1 of 2)
Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization Readability Design for Change and Extension Design for Testability Implementation Guidelines Resource Management Back to Basics: Class Design (Part 2) Implementation Guidelines Data Member Initialization0 码力 | 87 页 | 5.64 MB | 5 月前3Bringing Existing Code to CUDA Using constexpr and std::pmr
C++17: • std::pmr::memory_resource • std::pmr::polymorphic_allocator • std::pmr::vector • std::pmr::monotonic_buffer_resource • … std::pmr 16 |// gpu unified_memory_resource mem; std::pmr::vectorstd::pmr::vector y(N, &mem); // … Memory Allocation 17 |struct unified_memory_resource : std::pmr::memory_resource { void* do_allocate(std::size_t, std::size_t); void do_deallocate( do_is_equal( const std::pmr::memory_resource& other) const noexcept; }; A Unified Memory Resource 18 |struct unified_memory_resource : std::pmr::memory_resource { void* do_allocate(std::size_t 0 码力 | 51 页 | 3.68 MB | 5 月前3
共 137 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14