|
From: <den...@us...> - 2010-12-03 15:20:58
|
Revision: 386
http://stdair.svn.sourceforge.net/stdair/?rev=386&view=rev
Author: denis_arnaud
Date: 2010-12-03 15:20:52 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
[API] Fixed a few compilation errors with the new API.
Modified Paths:
--------------
trunk/stdair/batches/stdair.cpp
trunk/stdair/stdair/service/STDAIR_Service.cpp
trunk/stdair/stdair/sources.mk
trunk/stdair/test/stdair/StdairTestLib.cpp
Added Paths:
-----------
trunk/stdair/stdair/STDAIR_Service.hpp
Removed Paths:
-------------
trunk/stdair/stdair/stdair.hpp
Modified: trunk/stdair/batches/stdair.cpp
===================================================================
--- trunk/stdair/batches/stdair.cpp 2010-12-03 15:20:46 UTC (rev 385)
+++ trunk/stdair/batches/stdair.cpp 2010-12-03 15:20:52 UTC (rev 386)
@@ -15,8 +15,8 @@
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>
// StdAir
+#include <stdair/config/stdair-paths.hpp>
#include <stdair/stdair_types.hpp>
-#include <stdair/stdair.hpp>
#include <stdair/bom/BomManager.hpp>
#include <stdair/bom/BomRoot.hpp>
#include <stdair/bom/Inventory.hpp>
@@ -37,7 +37,7 @@
#include <stdair/bom/BookingClassTypes.hpp>
#include <stdair/factory/FacBomManager.hpp>
#include <stdair/service/Logger.hpp>
-#include <stdair/config/stdair-paths.hpp>
+#include <stdair/STDAIR_Service.hpp>
// //////// Constants //////
/** Default name and location for the log file. */
Copied: trunk/stdair/stdair/STDAIR_Service.hpp (from rev 378, trunk/stdair/stdair/stdair.hpp)
===================================================================
--- trunk/stdair/stdair/STDAIR_Service.hpp (rev 0)
+++ trunk/stdair/stdair/STDAIR_Service.hpp 2010-12-03 15:20:52 UTC (rev 386)
@@ -0,0 +1,123 @@
+/**
+ * @brief Handle on the StdAir library context
+ * @author Anh Quan Nguyen <qua...@us...>
+ * @date 20/01/2010
+ * @detail StdAir aims at providing a clean API, and the corresponding
+ * C++ implementation, for the basis of Airline IT Business Object
+ * Model (BOM), that is, to be used by several other Open Source
+ * projects, such as RMOL and OpenTREP<br>
+ * Install the StdAir library for Airline IT Standard C++ fundaments.
+ */
+#ifndef __STDAIR_STDAIR_HPP
+#define __STDAIR_STDAIR_HPP
+
+// //////////////////////////////////////////////////////////////////////
+// Import section
+// //////////////////////////////////////////////////////////////////////
+// StdAir
+#include <stdair/basic/BasLogParams.hpp>
+#include <stdair/basic/BasDBParams.hpp>
+
+namespace stdair {
+
+ /// Forward declarations
+ class BomRoot;
+
+ /**
+ * @brief Interface for the STDAIR Services
+ */
+ class STDAIR_Service {
+ public:
+ // ////////// Constructors and destructors //////////
+ /**
+ * @brief Default constructor.
+ */
+ STDAIR_Service ();
+
+ /**
+ * @brief Constructor.
+ * <br>The init() method is called; see the corresponding
+ * documentation for more details.
+ * <br>Moreover, a reference on an output stream is given, so
+ * that log outputs can be directed onto that stream.
+ * @param[in] const BasLogParams& Parameters for the output log stream.
+ */
+ STDAIR_Service (const BasLogParams&);
+
+ /**
+ * @brief Constructor.
+ * <br>The init() method is called; see the corresponding
+ * documentation for more details.
+ * <br>A reference on an output stream is given, so
+ * that log outputs can be directed onto that stream.
+ * <br>Moreover, database connection parameters are given, so
+ * that database requests can use the corresponding access.
+ * @param[in] const BasLogParams& Parameters for the output log stream.
+ * @param[in] const BasDBParams& Parameters for the database session.
+ */
+ STDAIR_Service (const BasLogParams&, const BasDBParams&);
+
+ /**
+ * @brief Destructor.
+ */
+ ~STDAIR_Service();
+
+ // ///////////////// Getters ///////////////////
+ /**
+ * @brief Get a reference on the BomRoot object.
+ * <br>If the service context has not been initialised, that
+ * method throws an exception (failing assertion).
+ * @param[out] BomRoot& Reference on the BomRoot.
+ */
+ BomRoot& getBomRoot () const {
+ return _bomRoot;
+ }
+
+ private:
+ // /////// Construction and Destruction helper methods ///////
+ /**
+ * @brief Default copy constructor.
+ * @param[in] const STDAIR_Service& Reference on the STDAIR_Service handler
+ * to be copied.
+ */
+ STDAIR_Service (const STDAIR_Service&);
+
+ /**
+ * @brief Initialise the log.
+ * @param[in] const BasLogParams& Parameters for the output log stream.
+ */
+ void logInit (const BasLogParams&);
+
+ /**
+ * @brief Initialise the database session.
+ * @param[in] const BasDBParams& Parameters for the database session.
+ */
+ void dbInit (const BasDBParams&);
+
+ /**
+ * @brief Initialise.
+ * <br>The static instance of the log service (Logger object) is created.
+ * <br>The static instance of the database session manager
+ * (DBSessionManager object) is created.
+ * <br>The static instance of the FacSupervisor object, itself referencing
+ * all the other objects (factories and BOM), is created.
+ * <br>As those three objects are static, there is no need to store them
+ * in any service context. However, some lock mechanism may be needed
+ * in order to secure the access to the corresponding resources.
+ */
+ void init ();
+
+ /**
+ * @brief Finalise.
+ */
+ void finalise ();
+
+ private:
+ // /////////////// Attributes ///////////////
+ /**
+ * @brief Root of the BOM tree.
+ */
+ BomRoot& _bomRoot;
+ };
+}
+#endif // __STDAIR_STDAIR_HPP
Modified: trunk/stdair/stdair/service/STDAIR_Service.cpp
===================================================================
--- trunk/stdair/stdair/service/STDAIR_Service.cpp 2010-12-03 15:20:46 UTC (rev 385)
+++ trunk/stdair/stdair/service/STDAIR_Service.cpp 2010-12-03 15:20:52 UTC (rev 386)
@@ -15,7 +15,7 @@
#include <stdair/service/FacSupervisor.hpp>
#include <stdair/service/Logger.hpp>
#include <stdair/service/DBSessionManager.hpp>
-#include <stdair/stdair.hpp>
+#include <stdair/STDAIR_Service.hpp>
namespace stdair {
Modified: trunk/stdair/stdair/sources.mk
===================================================================
--- trunk/stdair/stdair/sources.mk 2010-12-03 15:20:46 UTC (rev 385)
+++ trunk/stdair/stdair/sources.mk 2010-12-03 15:20:52 UTC (rev 386)
@@ -11,6 +11,6 @@
$(top_srcdir)/stdair/stdair_fare_types.hpp \
$(top_srcdir)/stdair/stdair_types.hpp \
$(top_srcdir)/stdair/stdair_service.hpp \
- $(top_srcdir)/stdair/stdair.hpp
+ $(top_srcdir)/stdair/STDAIR_Service.hpp
stdair_service_cc_sources =
Deleted: trunk/stdair/stdair/stdair.hpp
===================================================================
--- trunk/stdair/stdair/stdair.hpp 2010-12-03 15:20:46 UTC (rev 385)
+++ trunk/stdair/stdair/stdair.hpp 2010-12-03 15:20:52 UTC (rev 386)
@@ -1,123 +0,0 @@
-/**
- * @brief Handle on the StdAir library context
- * @author Anh Quan Nguyen <qua...@us...>
- * @date 20/01/2010
- * @detail StdAir aims at providing a clean API, and the corresponding
- * C++ implementation, for the basis of Airline IT Business Object
- * Model (BOM), that is, to be used by several other Open Source
- * projects, such as RMOL and OpenTREP<br>
- * Install the StdAir library for Airline IT Standard C++ fundaments.
- */
-#ifndef __STDAIR_STDAIR_HPP
-#define __STDAIR_STDAIR_HPP
-
-// //////////////////////////////////////////////////////////////////////
-// Import section
-// //////////////////////////////////////////////////////////////////////
-// StdAir
-#include <stdair/basic/BasLogParams.hpp>
-#include <stdair/basic/BasDBParams.hpp>
-
-namespace stdair {
-
- /// Forward declarations
- class BomRoot;
-
- /**
- * @brief Interface for the STDAIR Services
- */
- class STDAIR_Service {
- public:
- // ////////// Constructors and destructors //////////
- /**
- * @brief Default constructor.
- */
- STDAIR_Service ();
-
- /**
- * @brief Constructor.
- * <br>The init() method is called; see the corresponding
- * documentation for more details.
- * <br>Moreover, a reference on an output stream is given, so
- * that log outputs can be directed onto that stream.
- * @param[in] const BasLogParams& Parameters for the output log stream.
- */
- STDAIR_Service (const BasLogParams&);
-
- /**
- * @brief Constructor.
- * <br>The init() method is called; see the corresponding
- * documentation for more details.
- * <br>A reference on an output stream is given, so
- * that log outputs can be directed onto that stream.
- * <br>Moreover, database connection parameters are given, so
- * that database requests can use the corresponding access.
- * @param[in] const BasLogParams& Parameters for the output log stream.
- * @param[in] const BasDBParams& Parameters for the database session.
- */
- STDAIR_Service (const BasLogParams&, const BasDBParams&);
-
- /**
- * @brief Destructor.
- */
- ~STDAIR_Service();
-
- // ///////////////// Getters ///////////////////
- /**
- * @brief Get a reference on the BomRoot object.
- * <br>If the service context has not been initialised, that
- * method throws an exception (failing assertion).
- * @param[out] BomRoot& Reference on the BomRoot.
- */
- BomRoot& getBomRoot () const {
- return _bomRoot;
- }
-
- private:
- // /////// Construction and Destruction helper methods ///////
- /**
- * @brief Default copy constructor.
- * @param[in] const STDAIR_Service& Reference on the STDAIR_Service handler
- * to be copied.
- */
- STDAIR_Service (const STDAIR_Service&);
-
- /**
- * @brief Initialise the log.
- * @param[in] const BasLogParams& Parameters for the output log stream.
- */
- void logInit (const BasLogParams&);
-
- /**
- * @brief Initialise the database session.
- * @param[in] const BasDBParams& Parameters for the database session.
- */
- void dbInit (const BasDBParams&);
-
- /**
- * @brief Initialise.
- * <br>The static instance of the log service (Logger object) is created.
- * <br>The static instance of the database session manager
- * (DBSessionManager object) is created.
- * <br>The static instance of the FacSupervisor object, itself referencing
- * all the other objects (factories and BOM), is created.
- * <br>As those three objects are static, there is no need to store them
- * in any service context. However, some lock mechanism may be needed
- * in order to secure the access to the corresponding resources.
- */
- void init ();
-
- /**
- * @brief Finalise.
- */
- void finalise ();
-
- private:
- // /////////////// Attributes ///////////////
- /**
- * @brief Root of the BOM tree.
- */
- BomRoot& _bomRoot;
- };
-}
-#endif // __STDAIR_STDAIR_HPP
Modified: trunk/stdair/test/stdair/StdairTestLib.cpp
===================================================================
--- trunk/stdair/test/stdair/StdairTestLib.cpp 2010-12-03 15:20:46 UTC (rev 385)
+++ trunk/stdair/test/stdair/StdairTestLib.cpp 2010-12-03 15:20:52 UTC (rev 386)
@@ -13,8 +13,8 @@
#include <boost/type_traits/is_same.hpp>
// StdAir
#include <stdair/stdair_inventory_types.hpp>
-#include <stdair/stdair.hpp>
#include <stdair/service/Logger.hpp>
+#include <stdair/STDAIR_Service.hpp>
#include <test/stdair/StdairTestLib.hpp>
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|