Cpp
HowTo
Projects
External Links
Patterns
- C++ library of designs
- C++ Patterns from ACE framework
- Comparing Two High-Performance I/O Design Patterns
Factory
pImpl
Notes:
pImpl is to hide the implementation of a single class
Interface allows polymorphism, an interface reference can have one or more implementation, so it hides implementation details
in c++, there are more things (than java/c#)
- Interfaces does not exists really, exists abstract pure class that are (due to pure) polymorphic
- An header file can have more than one code that meets its contract, and it allows to choice between mutiple implementations (example external .dll or .so) but just one at time (can be just one of that in the running application, you can stop, switch dll/so and run again)
About performance, there is an additional function call to use pImpl if use a std pointer, but pImpl needs a 'new' and 'delete' calls, memory must be reserved and destroyed at runtime for every instiation of the class that use pImpl, and it can be a sensible performance loss in certain cases. In the other hand, interface needs to use a vtable to know what the correct implementation to call for every time a virtual method is called, so that can be a sensible perfomance loss in other cases.
UML
Standard Template Library
References
C:
CPP:
- STL Containers - C++ Reference
- Containers library - Cppreference
- C++ STL Tutorial
- libstdc++ Source: Main Index
NOTE: CPP11 containers can store references instead of pointers with std::reference_wrapper
std::map<std::string, std::reference_wrapper<const Handler>> m_handlers;
Benchmark
C++11
- C++11 improvements over C++03
- Introduction to C++11
- C++ moves for people who don’t know or care what rvalues are
- C++ Rvalue References Explained
- C++ ownership semantics
- Rule of Five
Tutorials
- C, C++ Programming Tutorials - Cprogramming.com
- C++ Tutorial
- Linux Tutorial - C++ Singleton design pattern
- C/C++ signal handling
- Linux Tutorial: POSIX Threads
- GTK Tutorial
Libraries
External lists of libraries
- Single-file public-domain/open source libraries with minimal dependencies
- A curated list of awesome C/C++ frameworks, libraries, resources, and shiny things
- A list of open source C++ libraries
- Available C++ Libraries FAQ
- A curated list of awesome C++ frameworks, libraries and software.
- A list of open source C++ libraries
- Secondlife third party libraries
Search C++ libraries
How to search in Debian packages tags
- a similar results can be obtained using command line, using the axi-cache (that is more complete than debtags)
apt-get install axi-cache # sleep sometime to wait the database update axi-cache search --all devel::library AND \(cpp OR c++ OR cxx\) AND \(portable OR platform\)
How to compare libraries
- by github commits and contributors, example for nlohmann/json
- prioritize high portability
- prioritize high documentation
- prioritize low dependencies
Example result subset
Wide scope libraries
- Boost C++ Libraries
- POCO C++ Libraries
- Gnulib - The GNU Portability Library
- GNU C Library - only for the GNU and GNU/Linux systems
- NSPR - Netscape Portable Runtime
- STLplus C++ Library Collection
- Robust, Lightweight, Cross-platform, Template Software
- APR - Apache Portable Runtime Library (see below)
Apache Portable Runtime Library
- APR Modules
- APR Utility Library Modules
- Parsing XML files with APR
- libapr(apache portable runtime) programming tutorial
- Writing Portable Applications with APR | Dr Dobb's
- apache2 2.2.14-6, testdso_8c-source.html
WEB
CGI
FastCGI
WEB Frameworks
- CppCMS - (High Performance C++ Web Framework)
- Wt - (Wt, C++ Web Toolkit)
- TNTnet Web application server for C++
Visual Interfaces
Gtkmm
- Programming with gtkmm 3
- Documentation Overview - gtkmm - C++ Interfaces for GTK+ and GNOME
- Glade - A User Interface Designer
- GTKmm Tutorial Teil 1
- gtkmm/MSWindows - GNOME Live!
- Programming with gtkmm 3
- gtkmm examples
Databases
Firebird
Books
Exceptions / Signals
- C++ and Signal Handling
- The C Book — Signal handling
- C++ exception-handling tricks for Linux
- Listing 2. Using sigcontext
- Debugging Segmentation Faults and Pointer Problems - Cprogramming.com
- C++ & GCC: How Does GCC's C++ Implementation Handle Division by Zero? - Stack Overflow
- Apache Portable Runtime: Signal Handling
- gcc enable exception division for zero - Pesquisa Google
- FP Exceptions - The GNU C Library
- Integer Division - The GNU C Library
Generic
- Const Correctness in C++
- C++ Super-FAQ!
- Pimpl, a private class implementation for cpp
- C++ Internal Classes
- pococapsule - Project Hosting on Google Code
- asio C++ library
- Dynamically Loaded C++ Objects | Dr Dobb's
- C++ Dynamic Shared Library on Linux - Stack Overflow
- Dynamic Class Loading for C++ on Linux | Linux Journal
- C++ Exception-Handling Tricks for Linux
- c++ - How to know the exact line of code where where an exception has been caused? - Stack Overflow
- How to get rid of useless getters and setters methods