Ignore:
Timestamp:
Feb 26, 2010, 12:40:52 PM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
e65cc0
Parents:
33bc66
Message:

Added -Wall flag and fixed several small hickups

Location:
molecuilder/src/Views
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/Views/MethodStringView.cpp

    r33bc66 r98a2987  
    77
    88#include "MethodStringView.hpp"
     9
     10using namespace std;
    911
    1012MethodStringView::MethodStringView(boost::function<string()> _displayMethod) :
  • molecuilder/src/Views/MethodStringView.hpp

    r33bc66 r98a2987  
    1919{
    2020public:
    21   MethodStringView(boost::function<string()>);
     21  MethodStringView(boost::function<std::string()>);
    2222  virtual ~MethodStringView();
    2323
    24   virtual const string toString();
     24  virtual const std::string toString();
    2525
    2626private:
    27   boost::function<string()> displayMethod;
     27  boost::function<std::string()> displayMethod;
    2828};
    2929
  • molecuilder/src/Views/StreamStringView.cpp

    r33bc66 r98a2987  
    77
    88#include <sstream>
     9#include <iostream>
    910
    1011#include "StreamStringView.hpp"
    1112
    12 StreamStringView::StreamStringView(boost::function<void(ofstream *)> _displayMethod) :
     13using namespace std;
     14
     15StreamStringView::StreamStringView(boost::function<void(ostream *)> _displayMethod) :
    1316StringView(),
    1417displayMethod(_displayMethod)
    15 {
    16   // TODO Auto-generated constructor stub
    17 
    18 }
     18{}
    1919
    2020StreamStringView::~StreamStringView()
    21 {
    22   // TODO Auto-generated destructor stub
    23 }
     21{}
    2422
    2523const string StreamStringView::toString() {
    2624  stringstream s;
    27   displayMethod((ofstream *)&s);
     25  displayMethod(dynamic_cast<ostream *>(&s));
    2826  return s.str();
    2927}
  • molecuilder/src/Views/StreamStringView.hpp

    r33bc66 r98a2987  
    1010
    1111#include <boost/function.hpp>
     12#include <iostream>
    1213
    1314#include "Views/StringView.hpp"
     
    2425{
    2526public:
    26   StreamStringView(boost::function<void(ofstream *)>);
     27  StreamStringView(boost::function<void(std::ostream *)>);
    2728  virtual ~StreamStringView();
    2829
    29   virtual const string toString();
     30  virtual const std::string toString();
    3031
    3132private:
    32   boost::function<void(ofstream *)> displayMethod;
     33  boost::function<void(std::ostream *)> displayMethod;
    3334};
    3435
  • molecuilder/src/Views/StringView.hpp

    r33bc66 r98a2987  
    1212#include "Views/View.hpp"
    1313
    14 using namespace std;
    15 
    1614/**
    1715 * View to show something as a string
     
    2624  virtual ~StringView();
    2725
    28   virtual const string toString()=0;
     26  virtual const std::string toString()=0;
    2927};
    3028
Note: See TracChangeset for help on using the changeset viewer.