From: <den...@us...> - 2010-12-03 15:20:53
|
Revision: 385 http://stdair.svn.sourceforge.net/stdair/?rev=385&view=rev Author: denis_arnaud Date: 2010-12-03 15:20:46 +0000 (Fri, 03 Dec 2010) Log Message: ----------- [Branch 0.9.0][API] Fixed a few compilation errors with the new API. Modified Paths: -------------- branches/stdair/0.9.0/main/batches/stdair.cpp branches/stdair/0.9.0/main/stdair/service/STDAIR_Service.cpp branches/stdair/0.9.0/main/stdair/sources.mk branches/stdair/0.9.0/main/test/stdair/StdairTestLib.cpp Added Paths: ----------- branches/stdair/0.9.0/main/stdair/STDAIR_Service.hpp Removed Paths: ------------- branches/stdair/0.9.0/main/stdair/stdair.hpp Modified: branches/stdair/0.9.0/main/batches/stdair.cpp =================================================================== --- branches/stdair/0.9.0/main/batches/stdair.cpp 2010-12-03 15:09:51 UTC (rev 384) +++ branches/stdair/0.9.0/main/batches/stdair.cpp 2010-12-03 15:20:46 UTC (rev 385) @@ -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: branches/stdair/0.9.0/main/stdair/STDAIR_Service.hpp (from rev 376, branches/stdair/0.9.0/main/stdair/stdair.hpp) =================================================================== --- branches/stdair/0.9.0/main/stdair/STDAIR_Service.hpp (rev 0) +++ branches/stdair/0.9.0/main/stdair/STDAIR_Service.hpp 2010-12-03 15:20:46 UTC (rev 385) @@ -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: branches/stdair/0.9.0/main/stdair/service/STDAIR_Service.cpp =================================================================== --- branches/stdair/0.9.0/main/stdair/service/STDAIR_Service.cpp 2010-12-03 15:09:51 UTC (rev 384) +++ branches/stdair/0.9.0/main/stdair/service/STDAIR_Service.cpp 2010-12-03 15:20:46 UTC (rev 385) @@ -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: branches/stdair/0.9.0/main/stdair/sources.mk =================================================================== --- branches/stdair/0.9.0/main/stdair/sources.mk 2010-12-03 15:09:51 UTC (rev 384) +++ branches/stdair/0.9.0/main/stdair/sources.mk 2010-12-03 15:20:46 UTC (rev 385) @@ -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: branches/stdair/0.9.0/main/stdair/stdair.hpp =================================================================== --- branches/stdair/0.9.0/main/stdair/stdair.hpp 2010-12-03 15:09:51 UTC (rev 384) +++ branches/stdair/0.9.0/main/stdair/stdair.hpp 2010-12-03 15:20:46 UTC (rev 385) @@ -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: branches/stdair/0.9.0/main/test/stdair/StdairTestLib.cpp =================================================================== --- branches/stdair/0.9.0/main/test/stdair/StdairTestLib.cpp 2010-12-03 15:09:51 UTC (rev 384) +++ branches/stdair/0.9.0/main/test/stdair/StdairTestLib.cpp 2010-12-03 15:20:46 UTC (rev 385) @@ -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. |