From: <den...@us...> - 2010-11-07 21:47:32
|
Revision: 365 http://stdair.svn.sourceforge.net/stdair/?rev=365&view=rev Author: denis_arnaud Date: 2010-11-07 21:47:26 +0000 (Sun, 07 Nov 2010) Log Message: ----------- [Doc] Improved the tutorial section layout. Modified Paths: -------------- trunk/stdair/doc/local/help_wanted.doc trunk/stdair/doc/local/sources.mk trunk/stdair/doc/local/users_guide.doc trunk/stdair/doc/tutorial/sources.mk trunk/stdair/doc/tutorial/src/completeex.cpp trunk/stdair/doc/tutorial/src/invobject.cpp trunk/stdair/doc/tutorial/src/rootinvobject.cpp trunk/stdair/doc/tutorial/src/rootobject.cpp trunk/stdair/doc/tutorial/tutorial.doc Removed Paths: ------------- trunk/stdair/doc/tutorial/01_rootobject.doc trunk/stdair/doc/tutorial/02_invobject.doc trunk/stdair/doc/tutorial/03_rootinvobject.doc trunk/stdair/doc/tutorial/04_completeex.doc Modified: trunk/stdair/doc/local/help_wanted.doc =================================================================== --- trunk/stdair/doc/local/help_wanted.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/local/help_wanted.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -3,27 +3,30 @@ <b>Do not ask what StdAir can do for you. Ask what you can do for StdAir.</b> -You can help us to develop the StdAir library. There are always a lot of things -you can do: +You can help us to develop the StdAir library. There are always a lot +of things you can do: - Start using StdAir - Tell your friends about StdAir and help them to get started using it -- If you find a bug, report it to us. Without your help we can never hope to -produce a bug free code. +- If you find a bug, report it to us (on the <a +href="https://sourceforge.net/apps/trac/stdair/newticket">dedicated +Sourceforge's Trac Web site</a>). Without your help we can never hope +to produce a bug free code. - Help us to improve the documentation by providing information about documentation bugs -- Answer support requests in the StdAir discussion forums on SourceForge. If -you know the answer to a question, help others to overcome their StdAir -problems. -- Help us to improve our algorithms. If you know of a better way (e.g. that -is faster or requires less memory) to implement some of our algorithms, then -let us know. -- Help us to port StdAir to new platforms. If you manage to compile StdAir on a -new platform, then tell us how you did it. -- Send us your code. If you have a good StdAir compatible code, which you can -release under the LGPL, and you think it should be included in StdAir, then -send it to us. -- Become an StdAir developer. Send us (see the \ref authors page) an e-mail and tell what you can do for -StdAir. +- Answer support requests in the StdAir <a +href="https://sourceforge.net/apps/phpbb/stdair/">discussion +forums</a> on SourceForge. If you know the answer to a question, help +others to overcome their StdAir problems. +- Help us to improve our algorithms. If you know of a better way +(e.g., that is faster or requires less memory) to implement some of our +algorithms, then let us know. +- Help to port StdAir to new platforms. If you manage to compile +StdAir on a new platform, then tell how you did it. +- Send your code. If you have a good StdAir compatible code, which +you can release under the LGPL, and you think it should be included in +StdAir, then send it to the communauty. +- Become an StdAir developer. Send us (see the \ref authors page) an +e-mail and tell what you can do for StdAir. */ Modified: trunk/stdair/doc/local/sources.mk =================================================================== --- trunk/stdair/doc/local/sources.mk 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/local/sources.mk 2010-11-07 21:47:26 UTC (rev 365) @@ -9,9 +9,9 @@ $(top_srcdir)/doc/local/howto_release.doc \ $(top_srcdir)/doc/local/installation.doc \ $(top_srcdir)/doc/local/linking.doc \ + $(top_srcdir)/doc/local/verification.doc \ $(top_srcdir)/doc/local/test.doc \ - $(top_srcdir)/doc/local/users_guide.doc \ - $(top_srcdir)/doc/local/verification.doc + $(top_srcdir)/doc/local/users_guide.doc html_local_sources = \ $(top_srcdir)/doc/local/stdair_footer.html \ Modified: trunk/stdair/doc/local/users_guide.doc =================================================================== --- trunk/stdair/doc/local/users_guide.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/local/users_guide.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,8 +1,8 @@ /*! \page users_guide Users Guide -\section toc Table of Contents -- \ref introduction +\section ug_toc Table of Contents +- \ref ug_introduction - \ref predefined_types - \ref scalar_types - \ref vector_types @@ -25,7 +25,7 @@ - \ref itfile_class -\section introduction Introduction +\section ug_introduction Introduction The \c StdAir library contains classes for airline business management. This document does not cover all the aspects of the \c StdAir library. It Deleted: trunk/stdair/doc/tutorial/01_rootobject.doc =================================================================== --- trunk/stdair/doc/tutorial/01_rootobject.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/01_rootobject.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,13 +0,0 @@ -/*! -\page tutorial01_rootobject Creating a BOM root object - -In this example we are constructing a BOM root object (i.e., a root for -all the classes in the project): - -\include rootobject.cpp - -When you run this program, the output will look: - -\include rootobject.ref - -*/ Deleted: trunk/stdair/doc/tutorial/02_invobject.doc =================================================================== --- trunk/stdair/doc/tutorial/02_invobject.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/02_invobject.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,12 +0,0 @@ -/*! -\page tutorial02_invobject Creating an Inventory object - -In this example we are constructing an airline inventory whose code is "BA": - -\include invobject.cpp - -When you run this program, the output will look: - -\include invobject.ref - -*/ Deleted: trunk/stdair/doc/tutorial/03_rootinvobject.doc =================================================================== --- trunk/stdair/doc/tutorial/03_rootinvobject.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/03_rootinvobject.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,13 +0,0 @@ -/*! -\page tutorial03_rootinvobject Linking an inventory object with the BOM root object - -In this example we are linking an airline inventory whose code is "BA" -with the BOM root object. - -\include rootinvobject.cpp - -When you run this program, the output will look: - -\include rootinvobject.ref - -*/ Deleted: trunk/stdair/doc/tutorial/04_completeex.doc =================================================================== --- trunk/stdair/doc/tutorial/04_completeex.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/04_completeex.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,12 +0,0 @@ -/*! -\page tutorial04_completeex Constructing a complete BOM tree - -In this example we are constructing a complete BOM tree: - -\include completeex.cpp - -When you run this program, the output will look: - -\include completeex.ref - -*/ Modified: trunk/stdair/doc/tutorial/sources.mk =================================================================== --- trunk/stdair/doc/tutorial/sources.mk 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/sources.mk 2010-11-07 21:47:26 UTC (rev 365) @@ -1,6 +1,2 @@ doc_tutorial_sources = \ - $(top_srcdir)/doc/tutorial/tutorial.doc \ - $(top_srcdir)/doc/tutorial/01_rootobject.doc \ - $(top_srcdir)/doc/tutorial/02_invobject.doc \ - $(top_srcdir)/doc/tutorial/03_rootinvobject.doc \ - $(top_srcdir)/doc/tutorial/04_completeex.doc + $(top_srcdir)/doc/tutorial/tutorial.doc Modified: trunk/stdair/doc/tutorial/src/completeex.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/completeex.cpp 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/src/completeex.cpp 2010-11-07 21:47:26 UTC (rev 365) @@ -1,3 +1,7 @@ +/*! + * \page tut_completeex_cpp Tutorial Full Basic Example + * \code + */ // STL #include <cassert> // StdAir @@ -337,3 +341,7 @@ // Exit program: return 0; } + +/*! + * \endcode + */ Modified: trunk/stdair/doc/tutorial/src/invobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/invobject.cpp 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/src/invobject.cpp 2010-11-07 21:47:26 UTC (rev 365) @@ -1,3 +1,7 @@ +/*! + * \page tut_invobject_cpp Tutorial for the BOM Inventory Object Creation + * \code + */ // StdAir #include <stdair/bom/BomRoot.hpp> #include <stdair/bom/Inventory.hpp> @@ -19,3 +23,7 @@ // Exit program return 0; } + +/*! + * \endcode + */ Modified: trunk/stdair/doc/tutorial/src/rootinvobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/rootinvobject.cpp 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/src/rootinvobject.cpp 2010-11-07 21:47:26 UTC (rev 365) @@ -1,3 +1,7 @@ +/*! + * \page tut_rootinvobject_cpp Tutorial for the BOM Root and Inventory Objects Creation + * \code + */ // STL #include <cassert> // StdAir @@ -7,6 +11,7 @@ // /////////////////////// M A I N /////////////////////////// int main() { + // Create the root of the Bom tree (i.e., a BomRoot object) stdair::BomRoot& lBomRoot = stdair::FacBom<stdair::BomRoot>::instance().create(); @@ -39,3 +44,7 @@ // Exit program return 0; } + +/*! + * \endcode + */ Modified: trunk/stdair/doc/tutorial/src/rootobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/rootobject.cpp 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/src/rootobject.cpp 2010-11-07 21:47:26 UTC (rev 365) @@ -1,3 +1,7 @@ +/*! + * \page tut_rootobject_cpp Tutorial for the BOM Root Object Creation + * \code + */ // StdAir #include <stdair/bom/BomRoot.hpp> #include <stdair/factory/FacBomManager.hpp> @@ -15,3 +19,7 @@ // Exit program: return 0; } + +/*! + * \endcode + */ Modified: trunk/stdair/doc/tutorial/tutorial.doc =================================================================== --- trunk/stdair/doc/tutorial/tutorial.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/tutorial.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,40 +1,137 @@ /*! \page tutorials Tutorials -\addindex Tutorial +\section tut_toc Table of Contents +- \ref tut_introduction + - \ref tut_intro_configuration + - \ref tut_intro_building +- \ref tut_short_examples + - \ref tut01_rootobject + - \ref tut02_invobject + - \ref tut03_rootinvobject +- \ref tut_full_examples + - \ref tut04_completeex + +\section tut_introduction Introduction This page contains some tutorial examples that will help you getting started using StdAir. Most examples show how to construct some simple business objects, i.e., instances of the so-named Business Object Model (BOM). +\subsection tut_intro_configuration Preparing the StdAir Project for Development + +The configuration script must have already been launched (at +least) once. To run the configuration script the first time, go to the +top directory (where the StdAir package has been un-packed), and issue +either of the following two commands, depending on whether the StdAir +project has been checked out from the Subversion repository or +downloaded as a tar-ball package from the Sourceforge Web site: + - <tt>./autogen.sh</tt> + - <tt>./configure</tt> + +\subsection tut_intro_building Building the Tutorials + The source code for these examples can be found in the <tt>doc/tutorial/src</tt> directory. In that directory, there is also a Make-file, named <tt>makefile.tutorial</tt>, allowing compiling all -the examples. Hence (\ref N), just go to the tutorial source +the examples. Hence, just go to the tutorial source directory, and issue the following command: \verbatim make -f makefile.tutorial \endverbatim +\section tut_short_examples Short Examples Examples of basic functionality: -- \ref tutorial01_rootobject -- \ref tutorial02_invobject -- \ref tutorial03_rootinvobject +- \ref tut01_rootobject +- \ref tut02_invobject +- \ref tut03_rootinvobject +\subsection tut01_rootobject Creating a BOM root object + +In this example we are constructing a BOM root object (i.e., a root for +all the classes in the project). + +\dontinclude rootobject.cpp +First, we create an object \c lBomRoot of the class <tt>stdair::BomRoot</tt>. +\skipline lBomRoot +\line FacBom +Then, the content of that object is displayed on the standard output +(<tt>std::cout</tt>). +\skipline cout + +When this program is run, the output should look like: + +\include rootobject.ref + +See the corresponding full program (\ref tut_rootobject_cpp) for more details. + +\subsection tut02_invobject Creating an Inventory object + +In this example we are constructing an airline inventory object whose +code is "BA": + +\dontinclude invobject.cpp +First, we create an object \c lBAKey of the class <tt>stdair::InventoryKey</tt>. +\skipline lBAKey +Thanks to that key, an object \c lBAInv of the class +<tt>stdair::InventoryKey</tt> can be created. +\skipline lBAInv +\line FacBom +Then, the content of that object is displayed on the standard output +(<tt>std::cout</tt>). +\skipline cout + +When this program is run, the output should look like: + +\include invobject.ref + +See the corresponding full program (\ref tut_invobject_cpp) for more details. + +\subsection tut03_rootinvobject Linking an inventory object with the BOM root object + +In this example we are linking an airline inventory object with the +root of the BOM tree. + +\dontinclude rootinvobject.cpp + +Now that we are able to build both a stdair::BomRoot and +stdair::Inventory objects, we shall see how to link them. +That operation is as simple as using the +<tt>stdair::FacBomManager::addToList()</tt> method: +\skipline addToList + +From the BomRoot object instance, the list of inventories can then be +retrieved... +\skipline lInventoryList +\line getList + +... and browsed: +\skipline const_iterator +\until } + +When this program is run, the output should look like: + +\include rootinvobject.ref + +See the corresponding full program (\ref tut_rootinvobject_cpp) for more +details. + +\section tut_full_examples Full Examples + More complete examples: -- \ref tutorial04_completeex +- \ref tut04_completeex -\note -\anchor N +\subsection tut04_completeex Constructing a complete BOM tree -(N) - The configuration script must have already been launched (at -least) once. To run the configuration script the first time, go to the -top directory (where the StdAir package has been un-packed), and issue -either of the following two commands, depending on whether the StdAir -project has been checked out from the Subversion repository or -downloaded as a tar-ball package from the Sourceforge Web site: - - <tt>./autogen.sh</tt> - - <tt>./configure</tt> +In this example we are constructing a complete BOM tree. +\dontinclude completeex.cpp + +When this program is run, the output should look like: + +\include completeex.ref + +See the corresponding full program (\ref tut_completeex_cpp) for more details. + */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |