LibCXX


Index

LibCXX Class Collection
Introduction
Release 0.26 of LibCXX
Installation, and requirements
I. Core classes
1. Throwing exceptions
Throwing customized exceptions
2. Reference-counted objects
Comparison with other implementations of reference-counted objects
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
Restricting overload resolution
Creating an x::ref or an x::ptr from this
Second phase constructor
Using deduction guides with an x::ref or an x::ptr
Multiple inheritance with reference-counted objects
Private inheritance of reference-counted objects
Comparing x::refs and x::ptrs
isa()
Weak pointers
Reference and pointer traits
Constructing a collection of references
Destructor callbacks and mcguffins
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
Mcguffin 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
Linux Inotify 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. Singleton objects
14. Threads and related objects
Introduction
Mutex-protected objects
Transferrable mutex locks
Mutex-protected references
Mutex objects
Condition variable objects
Shared 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 semaphore queue
A fixed semaphore
15. Forking other processes
Redirecting file descriptors
16. Locale objects
Message catalogs
gettextmsg()
Single and plural forms
17. 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
18. Event queues
19. Event factories
20. Very ImPortant object design pattern
Creating a very important object
Read and write locks
An update lock
A registration handler lock
Opportunistic locking
Optional template parameters
Avoiding deadlocks
Somewhat-ImPortant object design pattern
21. Derived values
22. Message dispatching-based thread design pattern
Sending messages to the thread
Starting the message-dispatching execution thread
The message queue
Using the message queue
Auxiliary message queues
Stopping the execution thread
Generic stoppable interface
Using a stylesheet to generate a thread-based message dispatching framework
XML definitions
Generating doxygen documentation
GNU make macros
Using GNU make macros with automake
23. A pool of locks that use event file descriptors
Lock pool starvation option
Shared lock pools
Mutually-exclusive lock pools
24. 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
25. 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
26. Date and time intervals
Loading timezone files
Local time
Generic interval parser
27. Format time using strftime
28. Unique identifiers
29. Base64 encoding and decoding
Encoding
Decoding
30. Quoted-printable encoding and decoding
31. User, group, and port lookups
32. URIs
Using international domain names
33. Headers
34. Hierarchical container template
Locks
Reader locks
Writer locks
Shortcuts
Key iterators
Output of the example program
II. Miscellaneous classes and functions
35. Typesafe numerical aliases
Base classes
Testing for overflow
Using typesafe numerical aliases in unordered containers
36. Constructing visitors for std::variants
Checking if a type is visited by a variant
37. Sorting by indexes
38. Application identifiers and configuration directories
39. Virtual inheritance-based function callable objects
Virtual inheritance-based callables as reference-counted objects
Using callable objects to implement the callback design pattern
x::invoke_callbacks() helpers
Single execution thread callback container
Lambda weak pointer captures
40. Sentries
41. String conversions
Using x::value_string with custom classes
Convenience functions
42. A C++-ish strtok(); strsplit(), join(), and trim()
43. A joining iterator
44. Specialization for std::hash<void>
45. An ordered cache
46. A tokenizer helper template
47. Shell-like string split
48. The x::timespec class
49. Formatting memory or file sizes
50. A reference-counted vector class
51. Sorted and range vectors
Modifiers
Vectors of ranges
52. A postponed function call or an object call
Converting tuples to parameter packs
53. CSV-formatted data
54. Free disk space
55. Optional function arguments
Declaring an x::optional_args
Retrieving optional arguments
Optional arguments using reference wrappers
Using x::optional_arg_or
56. Loading shared libraries
III. httportmap
57. Registering an application
58. Connecting to applications
59. Other portmapper functionality
Advertising executable's pathname
IV. XML-related classes and functions
60. Parsing and creating XML documents
61. 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
62. 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
An example of creating an XML document
63. XML document type definitions
Defining custom document type entities
64. Escaping XML strings
V. Writing and parsing YAML documents
65. Writing YAML documents
x::yaml::newdocumentnodes
Writing x::yaml::newnodes
Writing a sequence
Writing a mapping
Writing a scalar value
Writing an alias reference
Example of writing a YAML document
66. Parsing YAML documents
Parsing scalars
Parsing sequences
Parsing mappings
Parsing aliases (not)
Example of parsing a YAML document
VI. GnuTLS classes
67. A wrapper for gnutls_datum_t
68. Private keys
69. Certificates
70. 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
71. Message digests/hashes
VIII. MIME classes and templates
72. Processing structured headers
73. Encoding MIME documents
Content transfer encoding
Constructing multipart MIME entities
Retrieving the encoded content
74. Parsing MIME documents
Delimiting MIME newline sequences
Parsing MIME documents that use CRLF newline sequences
Summary
Detecting start of a MIME document's body
Header parser iterator
x::mime::header_collector
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
75. A simple HTTP client example
Sending requests
Uploading files
Processing HTTP responses
Persistent HTTP connections
Cookies
HTTP forms
Limiting form size
Encoding an HTTP form
HTTP authentication challenges
76. 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
77. Connecting to an FTP server
FTP over SSL
Traversing the server's contents
Downloading files
Uploading, renaming, and deleting files and directories
XI. Printing using the CUPS library
78. Available printing destinations
79. Printer information
80. Creating print jobs
XII. Extra LibCXX components
81. Installing the LibCXX SQL library
82. Installing the LibCXX X Windows Toolkit
A. Manual Pages
httportmapd — Application portmapper
maillogs — Send log files by mail
properties — Set application property file
tlsparamsgen — Generate TLS parameters
tlsparamsgen.sh — Periodically generate systemwide TLS parameters
B. COPYING