Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

at_source_locator.h

Go to the documentation of this file.
00001 //
00002 // The Austria library is copyright (c) Gianni Mariani 2004.
00003 // 
00004 // Grant Of License.  Grants to LICENSEE the non-exclusive right to use the Austria
00005 // library subject to the terms of the LGPL.
00006 // 
00007 // A copy of the license is available in this directory or one may be found at this URL:
00008 //      http://www.gnu.org/copyleft/lesser.txt
00009 // 
00018 #ifndef x_at_source_locator_h_x
00019 #define x_at_source_locator_h_x 1
00020 
00021 #include "at_exports.h"
00022 #include <iostream>
00023 
00024 // Austria namespace
00025 namespace at
00026 {
00027 
00028 // ======== SourceLocator_Basic ===========================================
00035 class AUSTRIA_EXPORT SourceLocator_Basic
00036 {
00037     public:
00038 
00049     SourceLocator_Basic(
00050         const char                                  * i_filename,
00051         int                                           i_lineno
00052     )
00053       : m_filename( i_filename ),
00054         m_lineno( i_lineno )
00055     {
00056     }
00057 
00061     const char                                      * m_filename;
00062 
00066     int                                               m_lineno;
00067 };
00068 
00069 }; // namespace
00070 
00071 namespace std {
00072 
00073 using namespace at;
00074 
00075 // ======== basic_ostream<i_char_type, i_traits>& operator << =========
00084 template<
00085     typename        i_char_type,
00086     class           i_traits
00087 >                   
00088 basic_ostream<i_char_type, i_traits>& operator << (
00089     basic_ostream<i_char_type, i_traits>            & i_ostream,
00090     const SourceLocator_Basic                    & i_value
00091 ) {
00092     return i_ostream << i_value.m_filename << ':' << i_value.m_lineno;
00093     
00094 } // end basic_ostream<i_char_type, i_traits>& operator <<
00095 
00096 } // namespace std
00097 
00098 
00099 #endif // x_at_source_locator_h_x
00100 
00101 

Generated for Austria by doxygen and MakeXS at Sun Oct 24 17:35:34 PDT 2004