From 4e86c50016ecfea40a72930cdd0460143f9edf4a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 9 Aug 2009 05:30:34 +0000 Subject: Really, just a lot of documenting. --- src/doxy/formatting.dox | 35 +++++++++++++++++++++++++++++++++++ src/doxy/groups.dox | 10 +++++----- src/doxy/main.dox | 1 + src/doxy/streams.dox | 13 ++++++------- 4 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 src/doxy/formatting.dox (limited to 'src/doxy') diff --git a/src/doxy/formatting.dox b/src/doxy/formatting.dox new file mode 100644 index 0000000..7b440cb --- /dev/null +++ b/src/doxy/formatting.dox @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2007-2008 Xagasoft, All rights reserved. + * + * This file is part of the libbu++ library and is released under the + * terms of the license contained in the file LICENSE. + */ + +/** + *@page howto_formatting Formatting data for streams and the console. + * + * Libbu++ provides a powerful and flexible interface for writing formatted + * data easily to any Stream. This is implemented as a seperate set of + * classes from the basic Stream system in order to simplify both systems and + * provide additional flexibility and organization. + * + *@section secBasics The Basics: Writing to the console (standard i/o) + * Libbu++ provides the global variable Bu::sio already instantiated and ready + * to be used to access the standard input and output via the Bu::Formatter + * class. If you are familiar with the STL cout then you're practically done. + * A quick example may be best. + *@code +#include +using namespace Bu; + +int main() +{ + int i = 47; + + sio << "Hello, world." << sio.nl + << "Here is a number: " << i << sio.nl; + + return 0; +} +@endcode + */ diff --git a/src/doxy/groups.dox b/src/doxy/groups.dox index 9b54950..285923c 100644 --- a/src/doxy/groups.dox +++ b/src/doxy/groups.dox @@ -6,26 +6,26 @@ */ /** - *@defgroup Threading + *@defgroup Threading Threading * Threads are awesome. */ /** - *@defgroup Serving + *@defgroup Serving Serving * Serving data is pretty cool too. */ /** - *@defgroup Containers + *@defgroup Containers Containers * Containers for data. */ /** - *@defgroup Taf + *@defgroup Taf Taf * Taf is the best! */ /** - *@defgroup Streams + *@defgroup Streams Streams * Streams are for data. */ diff --git a/src/doxy/main.dox b/src/doxy/main.dox index 6030f0c..5e822e1 100644 --- a/src/doxy/main.dox +++ b/src/doxy/main.dox @@ -18,6 +18,7 @@ * comprehensive guides and API reference, but doesn't yet. For now check out * these sections: * - @ref howto_streams + * - @ref howto_formatting * - @ref howto_archives * - @ref howto_threading * - @ref howto_servers diff --git a/src/doxy/streams.dox b/src/doxy/streams.dox index 8217210..9655743 100644 --- a/src/doxy/streams.dox +++ b/src/doxy/streams.dox @@ -44,11 +44,10 @@ * data. * *@section difference How are libbu++ streams different form stl streams? - * While not globally true, many stl streams are designed for formatting the - * data that flows through the stream, that means that when you attempt to - * write a uint32_t into a standard stream it can be difficult to predict what - * the result will be, will it be the binary representation or a textual - * conversion? + * The most basic difference is that libbu++ streams are geared more towards a + * lower level feel, giving you easy and more direct access to many features, + * while seperating all of the formatting code used for console I/O and number + * to text conversion, etc, in a seperate place. * * Libbu++ streams are very direct about how the data is handled. All end-point * streams will always handle the data that you provide or request without any @@ -59,8 +58,8 @@ * easy as possible to write general code that was as easy as possible to * extend, and as clear as possible. We have accomplished this by making * streams simple, yet flexible, with a clear API and a flexible filter system - * that something geared towards more general formatting, conversion, and - * operator-only access can't touch. + * that something geared towards more general formatting, conversion can't + * touch. * *@section usage Using streams directly * To create a stream depends on the type of stream that you're interested in, -- cgit v1.2.3