From: <den...@us...> - 2010-02-18 18:28:48
|
Revision: 157 http://stdair.svn.sourceforge.net/stdair/?rev=157&view=rev Author: denis_arnaud Date: 2010-02-18 18:28:42 +0000 (Thu, 18 Feb 2010) Log Message: ----------- [Dev] Added a few display methods (it may be improved easily). Modified Paths: -------------- trunk/stdair/stdair/bom/TravelSolutionStruct.cpp trunk/stdair/stdair/bom/TravelSolutionStruct.hpp Modified: trunk/stdair/stdair/bom/TravelSolutionStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionStruct.cpp 2010-02-18 16:49:09 UTC (rev 156) +++ trunk/stdair/stdair/bom/TravelSolutionStruct.cpp 2010-02-18 18:28:42 UTC (rev 157) @@ -7,6 +7,7 @@ #include <ostream> #include <sstream> // StdAir +#include <stdair/bom/OutboundPath.hpp> #include <stdair/bom/TravelSolutionStruct.hpp> namespace stdair { @@ -53,7 +54,30 @@ // ////////////////////////////////////////////////////////////////////// const std::string TravelSolutionStruct::describe() const { - return ""; + std::ostringstream oStr; + if (_outboundPath_ptr != NULL) { + oStr << *_outboundPath_ptr; + } + + return oStr.str(); } + // ////////////////////////////////////////////////////////////////////// + const std::string TravelSolutionStruct::describeKey() const { + std::string oString; + if (_outboundPath_ptr != NULL) { + oString = _outboundPath_ptr->describeKey(); + } + return oString; + } + + // ////////////////////////////////////////////////////////////////////// + const std::string TravelSolutionStruct::describeShortKey() const { + std::string oString; + if (_outboundPath_ptr != NULL) { + oString = _outboundPath_ptr->describeShortKey(); + } + return oString; + } + } Modified: trunk/stdair/stdair/bom/TravelSolutionStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionStruct.hpp 2010-02-18 16:49:09 UTC (rev 156) +++ trunk/stdair/stdair/bom/TravelSolutionStruct.hpp 2010-02-18 18:28:42 UTC (rev 157) @@ -42,6 +42,14 @@ /** Display of the structure. */ const std::string describe() const; + /** Get a string describing the whole key (differentiating two objects + at any level). */ + const std::string describeKey() const; + + /** Get a string describing the short key (differentiating two objects + at the same level). */ + const std::string describeShortKey() const; + public: // //////////// Constructors & Destructor /////////////// This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |