diff options
author | lloyd <[email protected]> | 2011-04-22 16:47:44 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-04-22 16:47:44 +0000 |
commit | cff88d2385ed71d3cdece328a562b9cde84f4cd3 (patch) | |
tree | 94f16949535a628895f222890d1af99f38350f82 /doc/firststep.txt | |
parent | 8b40f974e65b7cc7d21a8e72b5f18f6e14208e57 (diff) |
Merge last bits from the tutorial.
Many other cleanups and changes in the docs. Make the index page a
functional standin for the current site so the entire website can be
built using Sphinx.
Diffstat (limited to 'doc/firststep.txt')
-rw-r--r-- | doc/firststep.txt | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/doc/firststep.txt b/doc/firststep.txt index 0576e9c06..fb4eb583e 100644 --- a/doc/firststep.txt +++ b/doc/firststep.txt @@ -16,19 +16,22 @@ Initializing the Library There is a set of core services that the library needs access to while it is performing requests. To ensure these are set up, you must create -a ``LibraryInitializer`` object (usually called 'init' in Botan -example code; 'botan\_library' or 'botan\_init' may make more sense in -real applications) prior to making any calls to Botan. This object's -lifetime must exceed that of all other Botan objects your application -creates; for this reason the best place to create the -``LibraryInitializer`` is at the start of your ``main`` -function, since this guarantees that it will be created first and -destroyed last (via standard C++ RAII rules). The initializer does -things like setting up the memory allocation system and algorithm -lookup tables, finding out if there is a high resolution timer -available to use, and similar such matters. With no arguments, the -library is initialized with various default settings. So (unless you -are writing threaded code; see below), all you need is:: +an object of type + +.. cpp:class:: LibraryInitializer + +prior to making any other library calls. Typically this will be named +something like ``init`` or ``botan_init``. The object lifetime must +exceed that of all other Botan objects your application creates; for +this reason the best place to create the ``LibraryInitializer`` is at +the start of your ``main`` function, since this guarantees that it +will be created first and destroyed last (via standard C++ RAII +rules). The initializer does things like setting up the memory +allocation system and algorithm lookup tables, finding out if there is +a high resolution timer available to use, and similar such +matters. With no arguments, the library is initialized with various +default settings. So (unless you are writing threaded code; see +below), all you need is:: Botan::LibraryInitializer init; |