LIBCXX Class Collection
Installation, and requirements
I. Core classes
1. Throwing exceptions
Throwing customized exceptions
2. Reference-counted objects
Comparison with other implementations of reference-counted objects
Pointers and references
x::const_ref and x::const_ptr
create() - create reference-counted objects
Range-based iteration on reference-counted objects
Specifying a custom base
Multiple inheritance and casting
Creating an x::ref or an x::ptr from this
Multiple inheritance with reference-counted objects
Private inheritance of reference-counted objects
Weak pointers
Destructor callbacks and mcguffins
Using a functor as a destructor callback
A basic destructor callback
A destructor callback guard
Revocable destructor callbacks
Invoking a destructor callback when any of several objects gets destroyed
Waiting for a cascading destructor
Weak containers
Circular strong references
3. Implementing iterators with reference-counted objects
Implementing a reference-counted object-based iterator
Accessing the underlying x::ref and x::ptr
Base class for reference-counted output iterators
Reference-counted output iterator tuples
4. Application properties
5. Application logging
6. File descriptor and stream objects
Other miscellaneous file-related function
Linux epoll() implementation
Linux eventfd() implementation
Linux timerfd() implementation
The file descriptor transport superclass
Lightweight input and output file descriptor iterators
Automatic file descriptor timeouts
Automatic file descriptor terminator
Read limits
Using sockets
File attributes
Stream objects
String stream objects
File descriptor listeners and servers
POSIX shared memory segments, and memory-mapped files
7. Signals and signal file descriptors
Blocking signals
Signal file descriptors
Signal handlers
8. Filename pattern globbing
9. Perl-compatible regular expressions
10. Network interfaces
Network interface addresses
11. IO filter classes
12. iconv(3) IO filter
13. Reading directory contents
Reading the contents of a single directory
Reading the contents of a directory hierarchy
Miscellaneous functions
14. Singleton objects
15. Threads and related objects
Mutex-protected objects
Readers/writer mutex pairs
Mutex objects
Condition variable objects
Readers-writer lock objects
Execution threads
Checking the results of an execution thread
Arguments to run() methods must be copy-constructible
Optional superclasses of thread-executing objects
Running a lambda inside a separate thread
Cleanup thread
Stick a fork() in it: you're done
Thread logging
Timer threads
Using mcguffins to cancel recurring tasks
Weak local thread objects
Local thread singleton objects
Thread worker pools
A simple worker pool thread
Notifying an event file descriptor
Notifying an event queue
Thread-safe semaphores
16. Forking other processes
Redirecting file descriptors
17. Locale objects
Character type functions using input or output streams
Wide/narrow character conversion
Wide/narrow character conversion using input iterators
Wide/narrow character conversion using output iterators
Message catalogs
Single and plural forms
18. Parsing command line options
Option parser generator
Specifying option types
Mutually exclusive options
Combining numeric options
Default option values
Option groups
Defining an option parsing subclass
Localizing option strings
Using gettextmsg() with localizable strings
GNU make macros
Using GNU make macros with automake
19. Event queues
20. Event factories
21. Event callbacks
Using the same callback objects for multiple callbacks
22. Very ImPortant object design pattern
Creating a very important object
Very important object notification callbacks
Read and write locks
An update lock
A registration handler lock
Opportunistic locking
Avoiding and debugging deadlocks
Somewhat-ImPortant object design pattern
23. Message dispatching-based thread design pattern
Sending messages to the thread
The message dispatching thread loop
Stopping the execution thread
Generic stoppable interface
Using a stylesheet to generate a thread-based message dispatching framework
Stylesheet parameters
XML definitions
Optional message class constructor and serialization function
Generating doxygen documentation
GNU make macros
Using GNU make macros with automake
Using mcguffins with a message dispatching-based thread
24. A pool of locks that use event file descriptors
Lock pool starvation option
Read-write lock pools
Mutually-exclusive lock pools
25. Object serialization
Use cases
Supported objects
Serializing an object
Serializing enumerated values
Serializing a beginning/ending iterator range
Calculating the size of the serialized object
Convenience functions for serializing a single object
Deserializing an object
Maximum sequence sizes
Deserializing any one of several objects
Convenience functions for deserializing a single object
Serializing classes
Serialization of object references
Deserialization traits class
Serializing file descriptors
26. Application singleton design pattern
Singleton startup and termination
Signals in singleton processes
Peer validation
Systemwide application singletons
Managed application singletons
Notes on thread concurrency with managed singletons
Example of a managed application singleton
Implementing a managed application singleton as a message dispatching-based thread
27. Date and time intervals
Loading timezone files
Local time
Generic interval parser
28. Format time using strftime
29. Unique identifiers
30. Base64 encoding and decoding
31. Quoted-printable encoding and decoding
32. User, group, and port lookups
33. URIs
Using international domain names
34. Headers
35. Hierarchical container template
Reader locks
Writer locks
Key iterators
Output of the example program
II. Miscellaneous classes and functions
36. String conversions
Using x::value_string with custom classes
Convenience functions
37. A C++-ish strtok(), and join()
38. A joining iterator
39. An ordered cache
40. A tokenizer helper template
41. Shell-like string split
42. The x::timespec class
43. Formatting memory or file sizes
44. A reference-counted vector class
45. A postponed function call or an object call
Converting tuples to parameter packs
46. CSV-formatted data
47. Free disk space
III. httportmap
48. Registering an application
49. Connecting to applications
50. Other portmapper functionality
Advertising executable's pathname
IV. XML-related classes and functions
51. Parsing and creating XML documents
52. Accessing the contents of XML documents using reader locks
Navigating the XML document using a reader lock
Examining reader lock's current node
Using XPath expressions
53. Modifying XML documents using writer locks
Creator factories
Creating new XML elements and attributes
Creating other kinds of XML nodes, and other writer lock methods
Removing XML document nodes
54. XML document type definitions
Defining custom document type entities
55. Escaping XML strings
V. Writing and parsing YAML documents
56. Writing YAML documents
Writing x::yaml::newnodes
Writing a sequence
Writing a mapping
Writing a scalar value
Writing an alias reference
Example of writing a YAML document
57. Parsing YAML documents
Parsing scalars
Parsing sequences
Parsing mappings
Parsing aliases (not)
Example of parsing a YAML document
VI. GnuTLS classes
58. A wrapper for gnutls_datum_t
59. Private keys
60. Certificates
61. TLS sessions
Certificate credentials
Ephemeral and temporary parameters
Loading system-generated ephemeral parameters
Setting up a session
Convenience functions
TLS session caching, server side
TLS session caching, client side
Using the session
VII. Libgcrypt classes
62. Message digests/hashes
VIII. MIME classes and templates
63. Processing structured headers
64. Encoding MIME documents
Content transfer encoding
Constructing multipart MIME entities
Retrieving the encoded content
65. Parsing MIME documents
Delimiting MIME newline sequences
Parsing MIME documents that use CRLF newline sequences
Detecting start of a MIME document's body
Header parser iterator
MIME section information
MIME entity parser
Creating MIME entity parsers
Creating compound MIME entity parsers
Custom MIME section information classes
IX. HTTP clients and servers
66. A simple HTTP client example
Sending requests
Uploading files
Processing HTTP responses
Persistent HTTP connections
HTTP forms
Limiting form size
Encoding an HTTP form
HTTP authentication challenges
67. HTTP servers
Processing HTTP requests
Processing file uploads
Sending cookies to the client
Implementing basic authentication
Implementing digest authentication
Creating a x::http::serverauth
Invoking check_authentication()
Using both digest and basic authentication
Proxy authentication
Maximum request size limits
X. FTP client
68. Connecting to an FTP server
FTP over SSL
Traversing the server's contents
Downloading files
Uploading, renaming, and deleting files and directories
XI. Accessing SQL databases
69. Installing the LIBCXX SQL library
A. Porting and compatibility notes
B. Manual Pages
httportmapd — Application portmapper
maillogs — Send log files by mail
properties — Set application property file