00001 // /////////////////////////////////////////////////////////////////////////// 00002 // xrb_datafilelocation.cpp by Victor Dods, created 2006/07/15 00003 // /////////////////////////////////////////////////////////////////////////// 00004 // Unless a different license was explicitly granted in writing by the 00005 // copyright holder (Victor Dods), this software is freely distributable under 00006 // the terms of the GNU General Public License, version 2. Any works deriving 00007 // from this work must also be released under the GNU GPL. See the included 00008 // file LICENSE for details. 00009 // /////////////////////////////////////////////////////////////////////////// 00010 00011 #include "xrb_datafilelocation.hpp" 00012 00013 #include <sstream> 00014 00015 namespace Xrb 00016 { 00017 00018 DataFileLocation const DataFileLocation::ms_invalid; 00019 00020 std::string DataFileLocation::Text () const 00021 { 00022 std::ostringstream buffer; 00023 buffer << m_path << ":" << m_line; 00024 return buffer.str(); 00025 } 00026 00027 std::ostream &operator << (std::ostream &stream, DataFileLocation const &file_location) 00028 { 00029 ASSERT1(file_location.IsValid()); 00030 return stream << file_location.Text(); 00031 } 00032 00033 } // end of namespace Xrb