Mukherjee, Arindam.

Learning Boost C++ Libraries : Solve Practical Programming Problems Using Powerful, Portable, and Expressive Libraries from Boost. - 1st ed. - 1 online resource (558 pages)

Cover -- Copyright -- Credits -- About the Author -- About the Reviewers -- www.PacktPub.com -- Table of Contents -- Preface -- Chapter 1: Introducing Boost -- How it all started -- What is Boost? -- Getting started with Boost libraries -- Necessary software -- Linux toolchain -- Windows toolchain -- Obtaining and building Boost libraries -- Planning your Boost sandbox -- Library naming conventions -- Library name components -- Library name layouts -- Installing a Boost binary distribution -- Building and installing the Boost libraries from source -- Using Boost libraries in your projects -- Linking against Boost libraries on Linux -- Linking against Boost libraries on Windows -- Building the code listings in this book -- CMake -- Code examples -- Self-test questions -- Summary -- Chapter 2: The First Brush with Boost's Utilities -- Simple data structures -- Boost.Optional -- Accessing values stored in boost::optional -- get_value_or -- Boost.Optional versus pointers -- Boost.Tuple -- Creating tuples -- Accessing tuple elements -- Comparing tuples -- Writing generic code using tuples -- Working with heterogeneous values -- Boost.Variant -- Accessing values in a variant -- Defining recursive variants -- Boost.Any -- Boost.Conversion -- lexical_cast -- Handling command-line arguments -- Designing command-line options -- The diff command - a case study -- Using Boost.Program_Options -- Parsing positional parameters -- Multiple option values -- Other utilities and compile-time checks -- BOOST_CURRENT_FUNCTION -- Boost.Swap -- Compile-time asserts -- Diagnostics using preprocessor macros -- Self-test questions -- Summary -- References -- Chapter 3: Memory Management and Exception Safety -- Dynamic memory allocation and exception safety -- Exception safety and RAII -- Smart pointers -- Unique ownership semantics -- boost::scoped_ptr. boost::scoped_array -- std::unique_ptr -- Shared ownership semantics -- boost::shared_ptr and std::shared_ptr -- Intrusive smart pointers - boost::intrusive_ptr -- shared_array -- Managing non-memory resources using smart pointers -- Self-test questions -- Summary -- References -- Chapter 4: Working with Strings -- Text processing with Boost String Algorithms library -- Using Boost String Algorithms -- Find algorithms -- Case-conversion and trimming algorithms -- The replace and erase algorithms -- The split and join algorithms -- Splitting text using the Boost Tokenizer library -- Tokenizing based on separators -- Tokenizing records with fields containing metacharacters -- Tokenizing records with fixed-length fields -- Writing your own tokenizer functions -- Regular expressions using Boost.Regex -- Regular expression syntax -- Atoms -- Quantifiers -- Character classes -- Anchors -- Sub-expressions -- Disjunctions -- Using Boost.Regex to parse regular expressions -- Matching text -- Searching text -- Tokenizing text using regex -- Replacing text -- Self-test questions -- Summary -- Chapter 5: Effective Data Structures beyond STL -- Boost Container library -- Move-awareness and in-place construction -- Nonstandard containers -- Flat associative containers -- slist -- stable_vector -- static_vector -- Fast lookups using Boost Unordered containers -- Containers for dynamically-allocated objects -- Ownership semantics of pointer containers -- Null pointers in pointer containers -- Expressive initialization and assignment using Boost.Assign -- Assigning lists of values to containers -- Initializing containers with lists of values -- Initializing pointer containers and assigning values -- Iteration patterns using Boost.Iterator -- Smart iteration using Boost.Iterator -- Filter Iterator -- Transform Iterator -- Function Output Iterator. Creating conforming iterators for custom classes -- Self-test questions -- Summary -- References -- Chapter 6: Bimap and Multi-index Containers -- Containers for multi-criteria lookups -- Boost Multi-index containers -- Index types -- Range lookups using lambda -- Insertions and updates -- Boost Bimap -- Collection types -- More ways to use bimaps -- Tagged access -- Projections -- Self-test questions -- Summary -- References -- Chapter 7: Higher Order and Compile-time Programming -- Higher order programming with Boost -- Function objects -- Lambdas - unnamed function literals -- Delegates and closures -- Partial function application -- Compile-time programming with Boost -- Basic compile-time control flow using templates -- Branching -- Recursion -- Boost Type Traits -- SFINAE and enable_if / disable_if -- The Boost Metaprogramming Library (MPL) -- Metafunctions -- Using MPL metafunctions -- Domain Specific Embedded Languages -- Lazy evaluation -- Expression templates -- Boost Phoenix -- Boost Spirit Parser Framework -- Using Spirit Qi -- Self-test questions -- Summary -- References -- Chapter 8: Date and Time Libraries -- Date and time calculations with Boost Date Time -- Dates from the Gregorian calendar -- Creating date objects -- Handling date durations -- Date periods -- Posix time -- Constructing time points and durations -- Resolution -- Time periods -- Time iterator -- Using Chrono to measure time -- Durations -- Duration arithmetic -- Clocks and time points -- Measuring program performance using Boost Timer -- cpu_timer -- auto_cpu_timer -- Self-test questions -- Summary -- References -- Chapter 9: Files, Directories, and IOStreams -- Managing files and directories with Boost Filesystem -- Manipulating paths -- Printing paths -- Constructing paths -- Breaking paths into components -- Traversing directories -- Querying filesystem entries. Performing operations on files -- Creating directories -- Creating symbolic links -- Copying files -- Moving and deleting files -- Path-aware fstreams -- Extensible I/O with Boost IOStreams -- Architecture of Boost IOStreams -- Using devices -- Devices for file I/O -- Devices for reading and writing to memory -- Using filters -- Basic filters -- Filters for compression and decompression -- Composing filters -- Self-test questions -- Summary -- Chapter 10: Concurrency with Boost -- Creating concurrent tasks with Boost Thread -- Using Boost Threads -- Moving threads and waiting on threads -- Thread IDs -- Cores and threads -- Managing shared data -- Creating and coordinating concurrent tasks -- boost::future and boost::promise -- Waiting for future -- Throwing exceptions across threads -- shared_future -- std::future and std::promise -- std::packaged_task and std::async -- Lock-based thread synchronization methods -- Data races and atomic operations -- Mutual exclusion and critical sections -- Synchronizing on conditions -- The Readers-Writers problem -- Standard Library primitives -- Boost Coroutine -- Asymmetric coroutines -- Self-test questions -- Summary -- References -- Chapter 11: Network Programming Using Boost Asio -- Task execution with Asio -- IO Service, queues, and handlers -- Handler states - run_one, poll, and poll_one -- post versus dispatch -- Concurrent execution via thread pools -- io_service::work -- Serialized and ordered execution via strands -- Network I/O using Asio -- UDP and TCP -- IP addresses -- IPv4 addresses -- IPv6 addresses -- Endpoints, sockets, and name resolution -- Ports -- Sockets -- Hostnames and domain names -- Buffers -- Buffer sequences for vectored I/O -- Synchronous and asynchronous communications -- Asio deadline timer -- Asynchronous logic using Asio coroutines -- UDP -- Synchronous UDP client and server. Asynchronous UDP server -- Performance and concurrency -- TCP -- Establishing a TCP connection -- Synchronous TCP client and server -- Asynchronous TCP server -- Self-test questions -- Summary -- References -- Appendix: C++11 Language Features Emulation -- RAII -- Copy semantics -- The nothrow swap -- Move semantics and rvalue references -- rvalue references -- rvalue-reference overloads -- Move assignment -- xvalues -- Move emulation using Boost.Move -- C++11 auto and Boost.Auto -- Type deduction rules -- Common uses -- Boost.Auto -- Range-based for-loops -- Boost.Foreach -- C++11 exception-handling improvements -- Storing and rethrowing exceptions -- Storing and rethrowing exception using Boost -- Self-test questions -- References -- Index.

9781783551224


C++ (Computer program language).
Computer software -- Development.
Microsoft Visual C++.


Electronic books.

QA76.73.C153

005.13/3;005.133