printable.cpp

00001 
00002 /***************************************************************************
00003  *  printable.cpp - Printable interface
00004  *
00005  *  Created: Thu Oct 09 10:43:59 2008
00006  *  Copyright  2008  Daniel Beck
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023 
00024 #include <geometry/printable.h>
00025 
00026 namespace fawkes {
00027 
00028 /** @class fawkes::Printable <geometry/printable.h>
00029  * Interface class for printable objects. Printable objects can be
00030  * printed by means of the <<-operator.
00031  * 
00032  * @author Daniel Beck
00033  */
00034 
00035 /** @fn std::ostream& fawkes::Printable::print(std::ostream& stream) const
00036  * This method is called by the overloaded <<-operator.
00037  * @param stream the output stream
00038  * @return reference to the output stream
00039  */
00040 
00041 /** Constructor. */
00042 Printable::Printable()
00043 {
00044 }
00045 
00046 /** Destructor. */
00047 Printable::~Printable()
00048 {
00049 }
00050 
00051 } // end namespace fawkes
00052 
00053 /** Overloaded <<-operator that calls the print() method of the given
00054  * Printable object.
00055  * @param stream the output stream
00056  * @param p the Printable object
00057  * @return the output stream
00058  */
00059 std::ostream& operator<<(std::ostream& stream, const fawkes::Printable& p)
00060 {
00061   return p.print(stream);
00062 }
00063 

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1