|
From: <den...@us...> - 2010-11-07 13:29:33
|
Revision: 364
http://stdair.svn.sourceforge.net/stdair/?rev=364&view=rev
Author: denis_arnaud
Date: 2010-11-07 13:29:26 +0000 (Sun, 07 Nov 2010)
Log Message:
-----------
[Doc] Improved the tutorials.
Modified Paths:
--------------
trunk/stdair/doc/local/authors.doc
trunk/stdair/doc/local/help_wanted.doc
trunk/stdair/doc/local/howto_release.doc
trunk/stdair/doc/local/index.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
Added 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
trunk/stdair/doc/tutorial/src/.deps/
trunk/stdair/doc/tutorial/src/makefile.tutorial
Removed Paths:
-------------
trunk/stdair/doc/tutorial/completeex.doc
trunk/stdair/doc/tutorial/invobject.doc
trunk/stdair/doc/tutorial/rootinvobject.doc
trunk/stdair/doc/tutorial/rootobject.doc
Property Changed:
----------------
trunk/stdair/doc/tutorial/src/
Modified: trunk/stdair/doc/local/authors.doc
===================================================================
--- trunk/stdair/doc/local/authors.doc 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/local/authors.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -2,14 +2,11 @@
\page authors People
-\section admins Project Admins
+\section admins Project Admins (and Developers)
- Denis Arnaud <den...@us...> (\ref N)
- Anh Quan Nguyen <qua...@us...> (\ref N)
-
-
-\section developers Developers
-
+- Gabrielle Sabatier <gsa...@us...> (\ref N)
- Christophe Lacombe <dd...@us...> (\ref N)
Modified: trunk/stdair/doc/local/help_wanted.doc
===================================================================
--- trunk/stdair/doc/local/help_wanted.doc 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/local/help_wanted.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -23,7 +23,7 @@
- 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 an e-mail and tell what you can do for
+- 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/howto_release.doc
===================================================================
--- trunk/stdair/doc/local/howto_release.doc 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/local/howto_release.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -41,23 +41,23 @@
\verbatim
cd ~/dev
cd stdairsvn/branches/stdair
-mkdir 0.2.0
-svn add 0.2.0
-svn ci -m "[Branch 0.2.0] Prepared the branch 0.2.0 to be copied from head of the trunk."
+mkdir 0.8.0
+svn add 0.8.0
+svn ci -m "[Branch 0.8.0] Prepared the branch 0.8.0 to be copied from head of the trunk."
\endverbatim
\section check_release_revision Check Subversion revision for the release
Check to which Subversion revision the release corresponds to. For instance
-the <a href="http://sourceforge.net/apps/trac/stdair/changeset/233/">StdAir
- release 0.2.0 corresponds to Subversion revision r233</a>.
+the <a href="http://sourceforge.net/apps/trac/stdair/changeset/360/">StdAir
+ release 0.8.0 corresponds to Subversion revision r360</a>.
The trunk <tt>configure.ac</tt> file specifies a fake release number, namely
99.99.99,
for current (head) development. When a release is made, two Subversion
revisions are committed with, as the sole change, the release number within
the <tt>configure.ac</tt> file:
- one revision is committed with the to-be-released version number (e.g.,
- 0.2.0) and commit message prefixed with "[Release x.y.z]",
+ 0.8.0) and commit message prefixed with "[Release x.y.z]",
- and another one with the release number back to 99.99.99 and message stating
"[Release] Back to working version (99.99.99)."
.
@@ -75,18 +75,18 @@
Create a release branch by copying the
<a href="https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair">source
tree</a> to be released, from the found revision (e.g.,
-<a href="http://sourceforge.net/apps/trac/stdair/changeset/233">r233</a>)
+<a href="http://sourceforge.net/apps/trac/stdair/changeset/360">r360</a>)
into the dedicated
-<a href="https://stdair.svn.sourceforge.net/svnroot/stdair/branches/stdair/0.2.0">'branches' sub-directory of the Subversion repository</a>, e.g.:
+<a href="https://stdair.svn.sourceforge.net/svnroot/stdair/branches/stdair/0.8.0">'branches' sub-directory of the Subversion repository</a>, e.g.:
\verbatim
-svn copy -r233 \
+svn copy -r360 \
https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair \
- https://stdair.svn.sourceforge.net/svnroot/stdair/branches/stdair/0.2.0/main \
- -m "[Release] Created the main 0.2.0 release branch, from revision r233."
+ https://stdair.svn.sourceforge.net/svnroot/stdair/branches/stdair/0.8.0/main \
+ -m "[Release] Created the main 0.8.0 release branch, from revision r360."
\endverbatim
Check the results:<br>
-\c firefox -new-tab \"<a href="http://sourceforge.net/apps/trac/stdair/browser/branches/stdair/0.2.0/main">http://sourceforge.net/apps/trac/stdair/browser/branches/stdair/0.2.0/main</a>\"
+\c firefox -new-tab \"<a href="http://sourceforge.net/apps/trac/stdair/browser/branches/stdair/0.8.0/main">http://sourceforge.net/apps/trac/stdair/browser/branches/stdair/0.8.0/main</a>\"
\section checkout_new_release Check-out the new release
@@ -95,7 +95,7 @@
may be made (for instance, on the RPM specification file):
\verbatim
cd ~/dev
-cd stdairsvn/branches/stdair/0.2.0
+cd stdairsvn/branches/stdair/0.8.0
svn up
cd main
\endverbatim
@@ -121,14 +121,14 @@
Create the distribution packages using the following command:<br>
\verbatim
cd ~/dev
-cd stdairsvn/branches/stdair/0.2.0/main
+cd stdairsvn/branches/stdair/0.8.0/main
./autogen.sh && make distcheck
\endverbatim
This will configure, compile and check the package. The output packages will
-be named, for instance, <tt>stdair-0.2.0.tar.gz</tt> and
-<tt>stdair-0.2.0.tar.bz2</tt>.
+be named, for instance, <tt>stdair-0.8.0.tar.gz</tt> and
+<tt>stdair-0.8.0.tar.bz2</tt>.
\section generate_rpm_packages Generation the RPM packages
@@ -137,7 +137,7 @@
<a href="http://fedoraproject.org">Fedora</a>/<a href="http://www.redhat.com">RedHat</a>):
\verbatim
cd ~/dev
-cd stdairsvn/branches/stdair/0.2.0/main
+cd stdairsvn/branches/stdair/0.8.0/main
./autogen.sh && make dist
\endverbatim
@@ -145,10 +145,10 @@
available in the system.
\verbatim
cp stdair.spec ~/dev/packages/SPECS \
- && cp stdair-0.2.0.tar.bz2 ~/dev/packages/SOURCES
+ && cp stdair-0.8.0.tar.bz2 ~/dev/packages/SOURCES
cd ~/dev/packages/SPECS
rpmbuild -ba stdair.spec
-rpmlint -i ../SPECS/stdair.spec ../SRPMS/stdair-0.2.0-1.fc13.src.rpm \
+rpmlint -i ../SPECS/stdair.spec ../SRPMS/stdair-0.8.0-1.fc13.src.rpm \
../RPMS/i686/stdair-*
\endverbatim
@@ -168,9 +168,9 @@
<tt>make dist-html</tt> and <tt>make dist-tex</tt>
The output documentation packages will be named, for instance:
-- <tt>stdair-doc-0.2.0.tar.gz</tt> and <tt>stdair-doc-0.2.0.tar.bz2</tt>
+- <tt>stdair-doc-0.8.0.tar.gz</tt> and <tt>stdair-doc-0.8.0.tar.bz2</tt>
for the HTML documentation.
-- <tt>stdair-pdf-0.2.0.tar.gz</tt> and <tt>stdair-pdf-0.2.0.tar.bz2</tt>
+- <tt>stdair-pdf-0.8.0.tar.gz</tt> and <tt>stdair-pdf-0.8.0.tar.bz2</tt>
for the PDF documentation.
@@ -187,7 +187,7 @@
- <a href="https://sourceforge.net/apps/trac/sourceforge/wiki/Shell%20service#Accessingyourfileswithothertools">synchronise them with rsync and SSH</a>:
\verbatim
cd ~/dev
-cd stdairsvn/branches/stdair/0.2.0/main
+cd stdairsvn/branches/stdair/0.8.0/main
rsync -aiv doc/html/ joe,st...@we...:htdocs/
\endverbatim
where \c -aiv options mean:
Modified: trunk/stdair/doc/local/index.doc
===================================================================
--- trunk/stdair/doc/local/index.doc 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/local/index.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -16,7 +16,7 @@
- \ref installation
- \ref linking
- \ref users_guide
-- \ref tutorial
+- \ref tutorials
- \ref verification
- \ref copyright
- \ref help_wanted
Copied: trunk/stdair/doc/tutorial/01_rootobject.doc (from rev 359, trunk/stdair/doc/tutorial/rootobject.doc)
===================================================================
--- trunk/stdair/doc/tutorial/01_rootobject.doc (rev 0)
+++ trunk/stdair/doc/tutorial/01_rootobject.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -0,0 +1,13 @@
+/*!
+\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
+
+*/
Copied: trunk/stdair/doc/tutorial/02_invobject.doc (from rev 359, trunk/stdair/doc/tutorial/invobject.doc)
===================================================================
--- trunk/stdair/doc/tutorial/02_invobject.doc (rev 0)
+++ trunk/stdair/doc/tutorial/02_invobject.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -0,0 +1,12 @@
+/*!
+\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
+
+*/
Copied: trunk/stdair/doc/tutorial/03_rootinvobject.doc (from rev 359, trunk/stdair/doc/tutorial/rootinvobject.doc)
===================================================================
--- trunk/stdair/doc/tutorial/03_rootinvobject.doc (rev 0)
+++ trunk/stdair/doc/tutorial/03_rootinvobject.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -0,0 +1,13 @@
+/*!
+\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
+
+*/
Copied: trunk/stdair/doc/tutorial/04_completeex.doc (from rev 359, trunk/stdair/doc/tutorial/completeex.doc)
===================================================================
--- trunk/stdair/doc/tutorial/04_completeex.doc (rev 0)
+++ trunk/stdair/doc/tutorial/04_completeex.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -0,0 +1,12 @@
+/*!
+\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
+
+*/
Deleted: trunk/stdair/doc/tutorial/completeex.doc
===================================================================
--- trunk/stdair/doc/tutorial/completeex.doc 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/tutorial/completeex.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -1,12 +0,0 @@
-/*!
-\page 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
-
-*/
Deleted: trunk/stdair/doc/tutorial/invobject.doc
===================================================================
--- trunk/stdair/doc/tutorial/invobject.doc 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/tutorial/invobject.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -1,12 +0,0 @@
-/*!
-\page 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/rootinvobject.doc
===================================================================
--- trunk/stdair/doc/tutorial/rootinvobject.doc 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/tutorial/rootinvobject.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -1,12 +0,0 @@
-/*!
-\page 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/rootobject.doc
===================================================================
--- trunk/stdair/doc/tutorial/rootobject.doc 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/tutorial/rootobject.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -1,12 +0,0 @@
-/*!
-\page rootobject Creating a Bom root object
-
-In this example we are constructing a Bom root object (i,e a root for all classes in the project):
-
-\include rootobject.cpp
-
-When you run this program, the output will look:
-
-\include rootobject.ref
-
-*/
Modified: trunk/stdair/doc/tutorial/sources.mk
===================================================================
--- trunk/stdair/doc/tutorial/sources.mk 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/tutorial/sources.mk 2010-11-07 13:29:26 UTC (rev 364)
@@ -1,5 +1,6 @@
doc_tutorial_sources = \
- $(top_srcdir)/doc/tutorial/invobject.doc \
- $(top_srcdir)/doc/tutorial/rootobject.doc \
- $(top_srcdir)/doc/tutorial/rootinvobject.doc \
- $(top_srcdir)/doc/tutorial/completeex.doc
+ $(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
Property changes on: trunk/stdair/doc/tutorial/src
___________________________________________________________________
Modified: svn:ignore
- Makefile
Makefile.in
+ Makefile
Makefile.in
rootobject
invobject
rootinvobject
completeex
Property changes on: trunk/stdair/doc/tutorial/src/.deps
___________________________________________________________________
Added: svn:ignore
+ *.Po
Modified: trunk/stdair/doc/tutorial/src/completeex.cpp
===================================================================
--- trunk/stdair/doc/tutorial/src/completeex.cpp 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/tutorial/src/completeex.cpp 2010-11-07 13:29:26 UTC (rev 364)
@@ -1,5 +1,6 @@
+// STL
+#include <cassert>
// StdAir
-#include <stdair/bom/BomManager.hpp>
#include <stdair/bom/BomRoot.hpp>
#include <stdair/bom/Inventory.hpp>
#include <stdair/bom/InventoryTypes.hpp>
@@ -17,14 +18,12 @@
#include <stdair/bom/FareFamilyTypes.hpp>
#include <stdair/bom/BookingClass.hpp>
#include <stdair/bom/BookingClassTypes.hpp>
+#include <stdair/bom/BomManager.hpp> // Utility class to display BOM objects
#include <stdair/factory/FacBomManager.hpp>
-//These lines are needed for use of cout and endl
-using std::cout;
-using std::endl;
+// /////////////////////// M A I N ///////////////////////////
+int main() {
-int main()
-{
// ///////////// Step 0.0: Initialisation ////////////
// Create the root of the Bom tree (i.e., a BomRoot object)
stdair::BomRoot& lBomRoot =
@@ -63,7 +62,7 @@
stdair::SegmentDate& lLHRSYDSegment =
stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey);
stdair::FacBomManager::instance().addToList (lBA15_20100610_FD,
- lLHRSYDSegment);
+ lLHRSYDSegment);
// Create a second SegmentDate (LHR-BKK) for BA's Inventory
const stdair::AirportCode_T lBKK ("BKK");
@@ -72,7 +71,7 @@
stdair::SegmentDate& lLHRBKKSegment =
stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey);
stdair::FacBomManager::instance().addToList (lBA15_20100610_FD,
- lLHRBKKSegment);
+ lLHRBKKSegment);
// Create a third SegmentDate (BKK-SYD) for BA's Inventory
lSegmentDateKey = stdair::SegmentDateKey (lBKK, lSYD);
@@ -80,7 +79,7 @@
stdair::SegmentDate& lBKKSYDSegment =
stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey);
stdair::FacBomManager::instance().addToList (lBA15_20100610_FD,
- lBKKSYDSegment);
+ lBKKSYDSegment);
// Step 0.4: Leg-date level
// Create a first LegDate (LHR) for BA's Inventory
@@ -105,19 +104,19 @@
stdair::SegmentCabin& lLHRBKKSegmentYCabin =
stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey);
stdair::FacBomManager::instance().addToList (lLHRBKKSegment,
- lLHRBKKSegmentYCabin);
+ lLHRBKKSegmentYCabin);
// Create a SegmentCabin (Y) of the Segment BKK-SYD;
stdair::SegmentCabin& lBKKSYDSegmentYCabin =
stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey);
stdair::FacBomManager::instance().addToList (lBKKSYDSegment,
- lBKKSYDSegmentYCabin);
+ lBKKSYDSegmentYCabin);
// Create a SegmentCabin (Y) of the Segment LHR-SYD;
stdair::SegmentCabin& lLHRSYDSegmentYCabin =
stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey);
stdair::FacBomManager::instance().addToList (lLHRSYDSegment,
- lLHRSYDSegmentYCabin);
+ lLHRSYDSegmentYCabin);
// Step 0.6: leg-cabin level
// Create a LegCabin (Y) for the Leg LHR-BKK on BA's Inventory
@@ -140,41 +139,44 @@
stdair::FareFamily& lLHRBKKSegmentYCabin1Family =
stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey);
stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin,
- lLHRBKKSegmentYCabin1Family);
+ lLHRBKKSegmentYCabin1Family);
// Create a FareFamily (1) for the Segment BKK-SYD, cabin Y on BA's Inv
stdair::FareFamily& lBKKSYDSegmentYCabin1Family =
stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey);
stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin,
- lBKKSYDSegmentYCabin1Family);
+ lBKKSYDSegmentYCabin1Family);
// Create a FareFamily (1) for the Segment LHR-SYD, cabin Y on BA's Inv
stdair::FareFamily& lLHRSYDSegmentYCabin1Family =
stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey);
stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin,
- lLHRSYDSegmentYCabin1Family);
+ lLHRSYDSegmentYCabin1Family);
// Step 0.8: booking class level
- // Create a BookingClass (Q) for the Segment LHR-BKK, cabin Y, fare family 1 on BA's Inv
+ // Create a BookingClass (Q) for the Segment LHR-BKK, cabin Y, fare
+ // family 1 on BA's Inv
const stdair::ClassCode_T lQ ("Q");
stdair::BookingClassKey lQBookingClassKey (lQ);
stdair::BookingClass& lLHRBKKSegmentYCabin1FamilyQClass =
stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey);
stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin1Family,
- lLHRBKKSegmentYCabin1FamilyQClass);
+ lLHRBKKSegmentYCabin1FamilyQClass);
- // Create a BookingClass (Q) for the Segment BKK-SYD, cabin Y, fare family 1 on BA's Inv
+ // Create a BookingClass (Q) for the Segment BKK-SYD, cabin Y, fare
+ // family 1 on BA's Inv
stdair::BookingClass& lBKKSYDSegmentYCabin1FamilyQClass =
stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey);
stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin1Family,
- lBKKSYDSegmentYCabin1FamilyQClass);
+ lBKKSYDSegmentYCabin1FamilyQClass);
- // Create a BookingClass (Q) for the Segment LHR-SYD, cabin Y, fare family 1 on BA's Inv
+ // Create a BookingClass (Q) for the Segment LHR-SYD, cabin Y, fare
+ // family 1 on BA's Inv
stdair::BookingClass& lLHRSYDSegmentYCabin1FamilyQClass =
stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey);
stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin1Family,
- lLHRSYDSegmentYCabin1FamilyQClass);
+ lLHRSYDSegmentYCabin1FamilyQClass);
// ////// AF ///////
// Step 0.2: Flight-date level
@@ -196,7 +198,7 @@
stdair::SegmentDate& lCDGSFOSegment =
stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey);
stdair::FacBomManager::instance().addToList (lAF102_20100320_FD,
- lCDGSFOSegment);
+ lCDGSFOSegment);
// Step 0.4: Leg-date level
// Create a LegDate (CDG) for AF's Inventory
@@ -211,7 +213,7 @@
stdair::SegmentCabin& lCDGSFOSegmentYCabin =
stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey);
stdair::FacBomManager::instance().addToList (lCDGSFOSegment,
- lCDGSFOSegmentYCabin);
+ lCDGSFOSegmentYCabin);
// Step 0.6: leg-cabin level
// Create a LegCabin (Y) for the Leg CDG-SFO on AF's Inventory
@@ -224,19 +226,20 @@
stdair::FareFamily& lCDGSFOSegmentYCabin1Family =
stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey);
stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin,
- lCDGSFOSegmentYCabin1Family);
+ lCDGSFOSegmentYCabin1Family);
// Step 0.8: booking class level
- // Create a BookingClass (Q) for the Segment CDG-SFO, cabin Y, fare family 1 on AF's Inv
+ // Create a BookingClass (Q) for the Segment CDG-SFO, cabin Y, fare
+ // family 1 on AF's Inv
stdair::BookingClass& lCDGSFOSegmentYCabin1FamilyQClass =
stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey);
stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin1Family,
- lCDGSFOSegmentYCabin1FamilyQClass);
+ lCDGSFOSegmentYCabin1FamilyQClass);
// /////////// Step 1.0: Display the BOM tree //////////
// 1.0. Bom root level
- cout << lBomRoot.describeKey() << endl;
+ std::cout << lBomRoot << std::endl;
// 1.1. Inventory level
const stdair::InventoryList_T& lInventoryList =
@@ -244,8 +247,9 @@
for (stdair::InventoryList_T::const_iterator itInv = lInventoryList.begin();
itInv != lInventoryList.end(); ++itInv) {
const stdair::Inventory* lInv_ptr = *itInv;
+ assert (lInv_ptr != NULL);
- cout << " " <<lInv_ptr->describeKey() << endl;
+ std::cout << " " << *lInv_ptr << std::endl;
// 1.2. FlightDate level
const stdair::FlightDateList_T& lFlightDateList =
@@ -253,8 +257,9 @@
for (stdair::FlightDateList_T::const_iterator itFD=lFlightDateList.begin();
itFD != lFlightDateList.end(); ++itFD) {
const stdair::FlightDate* lFD_ptr = *itFD;
+ assert (lFD_ptr != NULL);
- cout << " " << lFD_ptr->toString() << endl;
+ std::cout << " " << *lFD_ptr << std::endl;
// 1.4. LegDate level
const stdair::LegDateList_T& lLegDateList =
@@ -263,18 +268,20 @@
lLegDateList.begin();
itLD != lLegDateList.end(); ++itLD) {
const stdair::LegDate* lLD_ptr = *itLD;
+ assert (lLD_ptr != NULL);
- cout << " " << lLD_ptr->toString() << endl;
+ std::cout << " " << *lLD_ptr << std::endl;
// 1.6. LegCabin level
const stdair::LegCabinList_T& lLegCabinList =
- stdair::BomManager::getList<stdair::LegCabin> (*lLD_ptr);
+ stdair::BomManager::getList<stdair::LegCabin> (*lLD_ptr);
for (stdair::LegCabinList_T::const_iterator itLC =
lLegCabinList.begin();
itLC != lLegCabinList.end(); ++itLC) {
const stdair::LegCabin* lLC_ptr = *itLC;
-
- cout << " " << lLC_ptr->toString() << endl;
+ assert (lLC_ptr != NULL);
+
+ std::cout << " " << *lLC_ptr << std::endl;
}
}
@@ -285,8 +292,9 @@
lSegmentDateList.begin();
itSD != lSegmentDateList.end(); ++itSD) {
const stdair::SegmentDate* lSD_ptr = *itSD;
+ assert (lSD_ptr != NULL);
- cout << " " << lSD_ptr->toString() << endl;
+ std::cout << " " << *lSD_ptr << std::endl;
// 1.5. SegmentCabin level
const stdair::SegmentCabinList_T& lSegmentCabinList =
@@ -295,8 +303,9 @@
lSegmentCabinList.begin();
itSC != lSegmentCabinList.end(); ++itSC) {
const stdair::SegmentCabin* lSC_ptr = *itSC;
+ assert (lSC_ptr != NULL);
- cout << " " << lSC_ptr->toString() << endl;
+ std::cout << " " << *lSC_ptr << std::endl;
// 1.7. FareFamily level
const stdair::FareFamilyList_T& lFareFamilyList =
@@ -305,8 +314,9 @@
lFareFamilyList.begin();
itFF != lFareFamilyList.end(); ++itFF) {
const stdair::FareFamily* lFF_ptr = *itFF;
+ assert (lFF_ptr != NULL);
- cout << " " << lFF_ptr->toString() << endl;
+ std::cout << " " << *lFF_ptr << std::endl;
// 1.8. BookingClass level
const stdair::BookingClassList_T& lBookingClassList =
@@ -315,8 +325,9 @@
lBookingClassList.begin();
itBC != lBookingClassList.end(); ++itBC) {
const stdair::BookingClass* lBC_ptr = *itBC;
+ assert (lBC_ptr != NULL);
- cout << " " << lBC_ptr->toString() << endl;
+ std::cout << " " << *lBC_ptr << std::endl;
}
}
}
Modified: trunk/stdair/doc/tutorial/src/invobject.cpp
===================================================================
--- trunk/stdair/doc/tutorial/src/invobject.cpp 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/tutorial/src/invobject.cpp 2010-11-07 13:29:26 UTC (rev 364)
@@ -1,24 +1,21 @@
// StdAir
-#include <stdair/factory/FacBomManager.hpp>
#include <stdair/bom/BomRoot.hpp>
#include <stdair/bom/Inventory.hpp>
+#include <stdair/factory/FacBomManager.hpp>
-// These lines are needed for use of cout and endl
-using std::cout;
-using std::endl;
+// /////////////////////// M A I N ///////////////////////////
+int main() {
-int main()
-{
- // Create an inventory Key (i,e an airline code)
+ // Create an inventory key (i.e., an airline code)
const stdair::InventoryKey lBAKey ("BA");
// Create an inventory object whose airline code is BA
stdair::Inventory& lBAInv =
stdair::FacBom<stdair::Inventory>::instance().create (lBAKey);
- // Display the airline code
- cout << " Inventory: " << lBAInv.describeKey() << endl;
+ // Display the inventory object (including its key, i.e., the airline code)
+ std::cout << " Inventory: " << lBAInv << std::endl;
- // Exit program:
+ // Exit program
return 0;
}
Added: trunk/stdair/doc/tutorial/src/makefile.tutorial
===================================================================
--- trunk/stdair/doc/tutorial/src/makefile.tutorial (rev 0)
+++ trunk/stdair/doc/tutorial/src/makefile.tutorial 2010-11-07 13:29:26 UTC (rev 364)
@@ -0,0 +1,336 @@
+# Makefile inspired from the makefiles generated by the GNU Autotools (autoconf
+# automake, configure, libtool)
+LIBDIR=`test -d '/usr/lib64' && echo '/usr/lib64' || echo '/usr/lib'`
+ARCHI=`test -d '/usr/lib64' && echo 'x86_64' || echo 'x86'`
+
+#
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+build_triplet = $(ARCHI)-unknown-linux-gnu
+host_triplet = $(ARCHI)-unknown-linux-gnu
+DIST_COMMON = $(srcdir)/makefile.tutorial
+bin_PROGRAMS = rootobject$(EXEEXT) invobject$(EXEEXT) rootinvobject$(EXEEXT) completeex$(EXEEXT)
+subdir = tutorial/src
+PROGRAMS = $(bin_PROGRAMS)
+am_rootobject_OBJECTS = rootobject-rootobject.$(OBJEXT)
+rootobject_OBJECTS = $(am_rootobject_OBJECTS)
+rootobject_DEPENDENCIES =
+rootobject_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(rootobject_CXXFLAGS) $(CXXFLAGS) \
+ $(rootobject_LDFLAGS) $(LDFLAGS) -o $@
+am_invobject_OBJECTS = invobject-invobject.$(OBJEXT)
+invobject_OBJECTS = $(am_invobject_OBJECTS)
+invobject_DEPENDENCIES =
+invobject_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(invobject_CXXFLAGS) \
+ $(CXXFLAGS) $(invobject_LDFLAGS) $(LDFLAGS) -o $@
+am_rootinvobject_OBJECTS = rootinvobject-rootinvobject.$(OBJEXT)
+rootinvobject_OBJECTS = $(am_rootinvobject_OBJECTS)
+rootinvobject_DEPENDENCIES =
+rootinvobject_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(rootinvobject_CXXFLAGS) \
+ $(CXXFLAGS) $(rootinvobject_LDFLAGS) $(LDFLAGS) -o $@
+am_completeex_OBJECTS = completeex-completeex.$(OBJEXT)
+completeex_OBJECTS = $(am_completeex_OBJECTS)
+completeex_DEPENDENCIES =
+completeex_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(completeex_CXXFLAGS) $(CXXFLAGS) \
+ $(completeex_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. -I$(builddir)/src
+depcomp = $(SHELL) $(top_builddir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(rootobject_SOURCES) $(invobject_SOURCES) $(rootinvobject_SOURCES) \
+ $(completeex_SOURCES)
+AWK = gawk
+BOOST_ASIO_LIB = -lboost_system -lboost_thread-mt -lboost_date_time -lboost_regex -lboost_serialization
+BOOST_CFLAGS = -pthread -I/usr/include
+BOOST_DATE_TIME_LIB = -lboost_date_time
+BOOST_FILESYSTEM_LIB = -lboost_filesystem
+BOOST_IOSTREAMS_LIB = -lboost_iostreams
+BOOST_LIBS = -L$(LIBDIR)
+BOOST_MPI_LIB = -lboost_mpi -lboost_serialization $(BOOST_LIBS)/openmpi/lib -lmpi_cxx -lmpi
+BOOST_MPI_PYTHON_LIB = -lboost_mpi_python -lboost_serialization -lboost_python $(BOOST_LIBS) -lpython2.6 -lpthread -ldl -lutil -lm -lboost_mpi -lboost_serialization $(BOOST_LIBS)/openmpi/lib -lmpi_cxx -lmpi $(BOOST_LIBS)/openmpi/lib -lmpi_cxx -lmpi
+BOOST_PROGRAM_OPTIONS_LIB = -lboost_program_options
+BOOST_PYTHON_LIB = -lboost_python $(BOOST_LIBS) -lpython2.6 -lpthread -ldl -lutil -lm
+BOOST_REGEX_LIB = -lboost_regex
+BOOST_SERIALIZATION_LIB = -lboost_serialization
+BOOST_SIGNALS_LIB = -lboost_signals
+BOOST_SYSTEM_LIB = -lboost_system
+BOOST_THREAD_LIB = -lboost_thread-mt
+BOOST_UNIT_TEST_FRAMEWORK_LIB = -lboost_unit_test_framework
+BOOST_VERSION = 1_41
+BOOST_WSERIALIZATION_LIB = -lboost_wserialization
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS =
+CPPUNIT_CFLAGS =
+CPPUNIT_CONFIG = /usr/bin/cppunit-config
+CPPUNIT_LIBS = -lcppunit -ldl
+CPPUNIT_VERSION = 1.12.1
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -Wall
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /bin/grep -E
+EXEEXT =
+EXTRACC_CFLAGS = -I/home/dan/dev/deliveries/extracc-0.5.0/include
+EXTRACC_EXTRACPPUNIT_INCLUDE = include /home/dan/dev/deliveries/extracc-0.5.0/share/extracc/extracppunit/Makefile.common
+EXTRACC_LIBS = -L/home/dan/dev/deliveries/extracc-0.5.0/lib -lextracppunit
+EXTRACC_VERSION = 0.5.0
+FGREP = /bin/grep -F
+GENERIC_LIBRARY_VERSION = 99:99:99
+GREP = /bin/grep
+LD = /usr/bin/ld -m elf_$(ARCHI)
+LDFLAGS =
+LIBOBJS =
+LIBS =
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO =
+LN_S = ln -s
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/dan/dev/sim/airinvsvn/trunk/airinv/config/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT =
+OBJDUMP = objdump
+OBJEXT = o
+OPENMPI_CFLAGS = -I/usr/include/openmpi-$(ARCHI) -I/usr/include/openmpi-$(ARCHI)/openmpi -I/usr/include/openmpi-$(ARCHI)/64 -m64
+OPENMPI_LIBS = -L$(LIBDIR)/openmpi/lib -lmpi_cxx -lmpi
+OPENMPI_VERSION = 1.4.1
+OTOOL =
+OTOOL64 =
+PACKAGE = airinv
+PACKAGE_BUGREPORT = den...@us...
+PACKAGE_NAME = AIRINV
+PACKAGE_STRING = AIRINV 99.99.99
+PACKAGE_TARNAME = airinv
+PACKAGE_URL =
+PACKAGE_VERSION = 99.99.99
+PATH_SEPARATOR = :
+PERL = /usr/bin/perl
+PYTHON = /usr/bin/python
+PYTHON_ADD_LIBS = -lpthread -ldl -lutil -lm
+PYTHON_CFLAGS = -I/usr/include/python2.6
+PYTHON_LIBS = -L$(LIBDIR) -lpython2.6
+PYTHON_VERSION = 2.6.4
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE =
+SHELL = /bin/sh
+STDAIR_CFLAGS = -pthread -I/usr/include -I../../..
+STDAIR_LIBS = -L$(LIBDIR) -lboost_date_time -L../../../stdair/.libs -lstdair
+STDAIR_VERSION = 0.8.0
+STRIP = strip
+VERSION = 99.99.99
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN =
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = $(ARCHI)-unknown-linux-gnu
+build_alias =
+build_cpu = $(ARCHI)
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+exec_prefix = ${prefix}
+gs_ok = yes
+host = $(ARCHI)-unknown-linux-gnu
+host_alias =
+host_cpu = $(ARCHI)
+host_os = linux-gnu
+host_vendor = unknown
+includedir = ${prefix}/include
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+lt_ECHO = echo
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../../..
+top_builddir = ../../..
+top_srcdir = ../../..
+AM_CPPFLAGS = -I$(top_srcdir)
+
+#
+rootobject_SOURCES = rootobject.cpp
+rootobject_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS)
+rootobject_LDADD =
+rootobject_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS)
+
+invobject_SOURCES = invobject.cpp
+invobject_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS)
+invobject_LDADD =
+invobject_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS)
+
+rootinvobject_SOURCES = rootinvobject.cpp
+rootinvobject_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS)
+rootinvobject_LDADD =
+rootinvobject_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS)
+
+completeex_SOURCES = completeex.cpp
+completeex_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS)
+completeex_LDADD =
+completeex_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+rootobject$(EXEEXT): $(rootobject_OBJECTS) $(rootobject_DEPENDENCIES)
+ @rm -f rootobject$(EXEEXT)
+ $(rootobject_LINK) $(rootobject_OBJECTS) $(rootobject_LDADD) $(LIBS)
+invobject$(EXEEXT): $(invobject_OBJECTS) $(invobject_DEPENDENCIES)
+ @rm -f invobject$(EXEEXT)
+ $(invobject_LINK) $(invobject_OBJECTS) $(invobject_LDADD) $(LIBS)
+rootinvobject$(EXEEXT): $(rootinvobject_OBJECTS) $(rootinvobject_DEPENDENCIES)
+ @rm -f rootinvobject$(EXEEXT)
+ $(rootinvobject_LINK) $(rootinvobject_OBJECTS) $(rootinvobject_LDADD) $(LIBS)
+completeex$(EXEEXT): $(completeex_OBJECTS) $(completeex_DEPENDENCIES)
+ @rm -f completeex$(EXEEXT)
+ $(completeex_LINK) $(completeex_OBJECTS) $(completeex_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+.cpp.o:
+ source='$<' object='$@' libtool=no \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(CXXCOMPILE) -c -o $@ $<
+# $(CXXCOMPILE) -MT $@ -MD -MP -MF -c -o $@ $<
+
+.cpp.obj:
+ source='$<' object='$@' libtool=no \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+# $(CXXCOMPILE) -MT $@ -MD -MP -MF -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ source='$<' object='$@' libtool=yes \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(LTCXXCOMPILE) -c -o $@ $<
+# $(LTCXXCOMPILE) -MT $@ -MD -MP -MF -c -o $@ $<
+
+rootobject-rootobject.o: rootobject.cpp
+ source='rootobject.cpp' object='rootobject-rootobject.o' libtool=no \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -c -o rootobject-rootobject.o `test -f 'rootobject.cpp' || echo '$(srcdir)/'`rootobject.cpp
+# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -MT rootobject-rootobject.o -MD -MP -MF -c -o rootobject-rootobject.o `test -f 'rootobject.cpp' || echo '$(srcdir)/'`rootobject.cpp
+
+rootobject-rootobject.obj: rootobject.cpp
+ source='rootobject.cpp' object='rootobject-rootobject.obj' libtool=no \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -c -o rootobject-rootobject.obj `if test -f 'rootobject.cpp'; then $(CYGPATH_W) 'rootobject.cpp'; else $(CYGPATH_W) 'rootobject.cpp'; fi`
+# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -MT rootobject-rootobject.obj -MD -MP -MF -c -o rootobject-rootobject.obj `if test -f 'rootobject.cpp'; then $(CYGPATH_W) 'rootobject.cpp'; else $(CYGPATH_W) 'rootobject.cpp'; fi`
+
+invobject-invobject.o: invobject.cpp
+ source='invobject.cpp' object='invobject-invobject.o' libtool=no \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -c -o invobject-invobject.o `test -f 'invobject.cpp' || echo '$(srcdir)/'`invobject.cpp
+# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -MT invobject-invobject.o -MD -MP -MF -c -o invobject-invobject.o `test -f 'invobject.cpp' || echo '$(srcdir)/'`invobject.cpp
+
+invobject-invobject.obj: invobject.cpp
+ source='invobject.cpp' object='invobject-invobject.obj' libtool=no \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -c -o invobject-invobject.obj `if test -f 'invobject.cpp'; then $(CYGPATH_W) 'invobject.cpp'; else $(CYGPATH_W) '$(srcdir)/invobject.cpp'; fi`
+# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -MT invobject-invobject.obj -MD -MP -MF -c -o invobject-invobject.obj `if test -f 'invobject.cpp'; then $(CYGPATH_W) 'invobject.cpp'; else $(CYGPATH_W) '$(srcdir)/invobject.cpp'; fi`
+
+rootinvobject-rootinvobject.o: rootinvobject.cpp
+ source='rootinvobject.cpp' object='rootinvobject-rootinvobject.o' libtool=no \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -c -o rootinvobject-rootinvobject.o `test -f 'rootinvobject.cpp' || echo '$(srcdir)/'`rootinvobject.cpp
+# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -MT rootinvobject-rootinvobject.o -MD -MP -MF -c -o rootinvobject-rootinvobject.o `test -f 'rootinvobject.cpp' || echo '$(srcdir)/'`rootinvobject.cpp
+
+rootinvobject-rootinvobject.obj: rootinvobject.cpp
+ source='rootinvobject.cpp' object='rootinvobject-rootinvobject.obj' libtool=no \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -c -o rootinvobject-rootinvobject.obj `if test -f 'rootinvobject.cpp'; then $(CYGPATH_W) 'rootinvobject.cpp'; else $(CYGPATH_W) '$(srcdir)/rootinvobject.cpp'; fi`
+# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -MT rootinvobject-rootinvobject.obj -MD -MP -MF -c -o rootinvobject-rootinvobject.obj `if test -f 'rootinvobject.cpp'; then $(CYGPATH_W) 'rootinvobject.cpp'; else $(CYGPATH_W) '$(srcdir)/rootinvobject.cpp'; fi`
+
+completeex-completeex.o: completeex.cpp
+ source='completeex.cpp' object='completeex-completeex.o' libtool=no \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -c -o completeex-completeex.o `test -f 'completeex.cpp' || echo '$(srcdir)/'`completeex.cpp
+# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -MT completeex-completeex.o -MD -MP -MF -c -o completeex-completeex.o `test -f 'completeex.cpp' || echo '$(srcdir)/'`completeex.cpp
+
+completeex-completeex.obj: completeex.cpp
+ source='completeex.cpp' object='completeex-completeex.obj' libtool=no \
+ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -c -o completeex-completeex.obj `if test -f 'completeex.cpp'; then $(CYGPATH_W) 'completeex.cpp'; else $(CYGPATH_W) 'completeex.cpp'; fi`
+# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -MT completeex-completeex.obj -MD -MP -MF -c -o completeex-completeex.obj `if test -f 'completeex.cpp'; then $(CYGPATH_W) 'completeex.cpp'; else $(CYGPATH_W) 'completeex.cpp'; fi`
+
+mostlyclean-deps:
+ -rm -f $(DEPDIR)/*.Po
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+all-am: Makefile $(PROGRAMS)
+
+mostlyclean-generic:
+
+clean-generic:
+
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-deps
+
+.MAKE:
+
+.PHONY: all all-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+# DO NOT DELETE
Modified: trunk/stdair/doc/tutorial/src/rootinvobject.cpp
===================================================================
--- trunk/stdair/doc/tutorial/src/rootinvobject.cpp 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/tutorial/src/rootinvobject.cpp 2010-11-07 13:29:26 UTC (rev 364)
@@ -1,13 +1,12 @@
+// STL
+#include <cassert>
// StdAir
+#include <stdair/bom/BomRoot.hpp>
+#include <stdair/bom/Inventory.hpp>
#include <stdair/factory/FacBomManager.hpp>
-#include <stdair/bom/BomRoot.hpp>
-// These lines are needed for use of cout and endl
-using std::cout;
-using std::endl;
-
-int main()
-{
+// /////////////////////// 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();
@@ -20,20 +19,23 @@
// Link the inventory for the Airline BA with the root of the Bom tree
stdair::FacBomManager::instance().addToList (lBomRoot, lBAInv);
- // Display the Bomroot object code
- cout << lBomRoot.describeKey() << endl;
+ // Display the Bomroot object
+ std::cout << lBomRoot << std::endl;
// Store the list of airline inventory
const stdair::InventoryList_T& lInventoryList =
stdair::BomManager::getList<stdair::Inventory> (lBomRoot);
- // Skim through the airline inventory list
+
+ // Browse through the airline inventory list
for (stdair::InventoryList_T::const_iterator itInv = lInventoryList.begin();
- itInv != lInventoryList.end(); ++itInv) {
- const stdair::Inventory* lInv_ptr = *itInv;
- // Display the airline code
- cout << " Inventory: " << lInv_ptr->describeKey() << endl;
+ itInv != lInventoryList.end(); ++itInv) {
+ const stdair::Inventory* lInv_ptr = *itInv;
+ assert (lInv_ptr != NULL);
+
+ // Display the airline code
+ std::cout << " Inventory: " << *lInv_ptr << std::endl;
}
- // Exit program:
+ // Exit program
return 0;
}
Modified: trunk/stdair/doc/tutorial/src/rootobject.cpp
===================================================================
--- trunk/stdair/doc/tutorial/src/rootobject.cpp 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/tutorial/src/rootobject.cpp 2010-11-07 13:29:26 UTC (rev 364)
@@ -1,19 +1,16 @@
// StdAir
-#include <stdair/factory/FacBomManager.hpp>
#include <stdair/bom/BomRoot.hpp>
+#include <stdair/factory/FacBomManager.hpp>
-// These lines are needed for use of cout and endl
-using std::cout;
-using std::endl;
+// /////////////////////// M A I N ///////////////////////////
+int main() {
-int main()
-{
- // Create the root of the Bom tree (i.e., a BomRoot object)
+ // Create the root of the BOM tree (i.e., a BomRoot object)
stdair::BomRoot& lBomRoot =
stdair::FacBom<stdair::BomRoot>::instance().create();
- // Display the Bomroot object code
- cout << lBomRoot.describeKey() << endl;
+ // Display the Bomroot object
+ std::cout << lBomRoot << std::endl;
// Exit program:
return 0;
Modified: trunk/stdair/doc/tutorial/tutorial.doc
===================================================================
--- trunk/stdair/doc/tutorial/tutorial.doc 2010-11-06 12:49:07 UTC (rev 363)
+++ trunk/stdair/doc/tutorial/tutorial.doc 2010-11-07 13:29:26 UTC (rev 364)
@@ -1,18 +1,40 @@
/*!
-\page tutorial Tutorials
+\page tutorials Tutorials
\addindex Tutorial
This page contains some tutorial examples that will help you getting
started using StdAir. Most examples show how to construct some simple
-business managment objects. The source codes for these examples
-can be found in doc/tutorial/src.
+business objects, i.e., instances of the so-named Business Object
+Model (BOM).
+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
+directory, and issue the following command:
+
+\verbatim
+make -f makefile.tutorial
+\endverbatim
+
Examples of basic functionality:
-- \ref rootobject
-- \ref invobject
-- \ref rootinvobject
+- \ref tutorial01_rootobject
+- \ref tutorial02_invobject
+- \ref tutorial03_rootinvobject
More complete examples:
-- \ref completeex
+- \ref tutorial04_completeex
+\note
+\anchor N
+
+(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>
+
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|