𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Boost C++ Application Development Cookbook

✍ Scribed by Antony Polukhin


Publisher
Packt Publishing Ltd
Year
2013
Tongue
English
Leaves
348
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Boost libraries are developed by professionals, tested on multiple platforms and processor architectures, and contain reliable solutions for a wide range of tasks. This Cookbook takes you on a journey of simplifying the process of application development and guides you through writing perfect applications fast.

"Boost C++ Application Development Cookbook" provides you with a number of clear step-by-step recipes that will help you take advantage of the real power of Boost and C++, while giving you a good grounding in using it in any project.

✦ Table of Contents


Preface
Chapter 1: Starting to Write Your Application
Chapter 2: Converting Data
Chapter 3: Managing Resources
Chapter 4: Compile-time Tricks
Chapter 5: Multithreading
Chapter 6: Manipulating Tasks
Chapter 7: Manipulating Strings
Chapter 8: Metaprogramming
Chapter 9: Containers
Chapter 10: Gathering Platform and Compiler Information
Chapter 11: Working with the System
Chapter 12: Scratching the Tip of the Iceberg
Index

Preface

Chapter 1: Starting to Write Your Application
    Introduction
    Getting configuration options
    Storing any value in a container/variable
    Storing multiple chosen types in a variable/container
    Using a safer way to work with a container that stores multiple chosen types
    Returning a value or flag where there is no value
    Returning an array from a function
    Combining multiple values into one
    Reordering the parameters of function
    Binding a value as a function parameter
    Using the C++11 move emulation
    Making a noncopyable class
    Making a noncopyable but movable class

Chapter 2: Converting Data
    Introduction
    Converting strings to numbers
    Converting numbers to strings
    Converting numbers to numbers
    Converting user-defined types to/from strings
    Casting polymorphic objects
    Parsing simple input
    Parsing input

Chapter 3: Managing Resources
    Introduction
    Managing pointers to classes that do not leave scope
    Reference counting of pointers to classes used across methods
    Managing pointers to arrays that do not leave scope
    Reference counting pointers to arrays used across methods
    Storing any functional objects in a variable
    Passing a function pointer in a variable
    Passing C++11 lambda functions in a variable
    Containers of pointers
    Doing something at scope exit
    Initializing the base class by a member of the derived class

Chapter 4: Compile-time Tricks
    Introduction
    Checking sizes at compile time
    Enabling the usage of templated functions for integral types
    Disabling templated functions' usage for real types
    Creating a type from number
    Implementing a type trait
    Selecting an optimal operator for a template parameter
    Getting a type of expression in C++03

Chapter 5: Multithreading
    Introduction
    Creating an execution thread
    Syncing access to a common resource
    Fast access to common resource using atomics
    Creating a work_queue class
    Multiple-readers-single-writer lock
    Creating variables that are unique per thread
    Interrupting a thread
    Manipulating a group of threads

Chapter 6: Manipulating Tasks
    Introduction
    Registering a task for processing an arbitrary datatype
    Making timers and processing timer events as tasks
    Network communication as a task
    Accepting incoming connections
    Executing different tasks in parallel
    Conveyor tasks processing
    Making a nonblocking barrier
    Storing an exception and making a task from it
    Getting and processing system signals as tasks

Chapter 7: Manipulating Strings
    Introduction
    Changing cases and case-insensitive comparison
    Matching strings using regular expressions
    Searching and replacing strings using regular expressions
    Formatting strings using safe printf-like functions
    Replacing and erasing strings
    Representing a string with two iterators
    Using a reference to string type

Chapter 8: Metaprogramming
    Introduction
    Using type "vector of types"
    Manipulating a vector of types
    Getting a function's result type at compile time
    Making a higher-order metafunction
    Evaluating metafunctions lazily
    Converting all the tuple elements to strings
    Splitting tuples

Chapter 9: Containers
    Introduction
    Comparing strings in an ultra-fast manner
    Using an unordered set and map
    Making a map, where value is also a key
    Using multi-index containers
    Getting the benefits of single-linked list and memory pool
    Using flat associative containers

Chapter 10: Gathering Platform and Compiler Information
    Introduction
    Detecting int128 support
    Detecting RTTI support
    Speeding up compilation using C++11 extern templates
    Writing metafunctions using simpler methods
    Reducing code size and increasing performance of user-defined types (UDTs) in C++11
    The portable way to export and import functions and classes
    Detecting the Boost version and getting latest features

Chapter 11: Working with the System
    Introduction
    Listing files in a directory
    Erasing and creating files and directories
    Passing data quickly from one process to another
    Syncing interprocess communications
    Using pointers in shared memory
    The fastest way to read files
    Coroutines – saving the state and postponing the execution

Chapter 12: Scratching the Tip of the Iceberg
    Introduction
    Working with graphs
    Visualizing graphs
    Using a true random number generator
    Using portable math functions
    Writing test cases
    Combining multiple test cases in one test module
    Manipulating images

Index

✦ Subjects


Π‘ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ°;ΠšΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€Π½Π°Ρ Π»ΠΈΡ‚Π΅Ρ€Π°Ρ‚ΡƒΡ€Π°;C / C++;


πŸ“œ SIMILAR VOLUMES


Boost C++ Application Development Cookbo
✍ Antony Polukhin πŸ“‚ Library πŸ“… 2013 πŸ› Packt Publishing 🌐 English

Over 80 practical, task-based recipes to create applications using Boost libraries<br>Overview<br>Explores how to write a program once and then use it on Linux, Windows, MacOS, and Android operating systems<br>Includes everyday use recipes for multithreading, networking, metaprogramming, and generic

Boost C++ Application Development Cookb
✍ Antony Polukhin πŸ“‚ Library πŸ“… 2017 πŸ› Packt> 🌐 English

With Boost libraries you can really unleash the power of C++. Learn to build applications faster and better through a cookbook approach that uses tons of recipes to make it all so easy to assimilate and apply. Overview - Explores how to write a program once and then use it on Linux, Windows, M

Boost C++ Application Development Cookbo
✍ Antony Polukhin πŸ“‚ Library πŸ“… 2017 πŸ› Packt Publishing 🌐 English

<p><b>Learn to build applications faster and better by leveraging the real power of Boost and C++</b></p><h2>About This Book</h2><ul><li>Learn to use the Boost libraries to simplify your application development</li><li>Learn to develop high quality, fast and portable applications</li><li>Learn the r

Boost C++ Application Development Cookbo
✍ Antony Polukhin πŸ“‚ Library πŸ“… 2017 πŸ› Packt Publishing 🌐 English

<p><b>Learn to build applications faster and better by leveraging the real power of Boost and C++</b></p><h2>About This Book</h2><ul><li>Learn to use the Boost libraries to simplify your application development</li><li>Learn to develop high quality, fast and portable applications</li><li>Learn the r