Changeset 1397 for trunk


Ignore:
Timestamp:
Jul 25, 2011, 4:05:22 AM (9 years ago)
Author:
Peter Johansson
Message:

latest yat

Location:
trunk/yat
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/ColumnStream.cc

    r1336 r1397  
    1 // $Id: ColumnStream.cc 2384 2010-12-22 14:03:36Z peter $
     1// $Id: ColumnStream.cc 2526 2011-07-25 02:03:35Z peter $
    22
    33/*
    44  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    5   Copyright (C) 2010 Peter Johansson
     5  Copyright (C) 2010, 2011 Peter Johansson
    66
    77  This file is part of yat, http://dev.thep.lu.se/yat
     
    2424
    2525#include <cassert>
    26 #include <iostream>
     26#include <ostream>
    2727
    2828namespace theplu{
     
    3131
    3232  ColumnStream::ColumnStream(std::ostream& os, size_t columns)
    33     : activated_(0),os_(os)
     33    : activated_(0), margins_(columns), os_(os), width_(columns, 8)
    3434  {
    35     margins_=std::vector<size_t>(columns);
    3635    buffer_.reserve(columns);
    3736    while (buffer_.size()<columns)
    3837      buffer_.push_back(new std::stringstream);
    39     width_=std::vector<size_t>(columns, 8);
    4038  }
    4139
     
    4543    for (size_t i=0; i<buffer_.size(); ++i)
    4644      delete buffer_[i];
     45  }
     46
     47
     48  size_t ColumnStream::columns(void) const
     49  {
     50    return buffer_.size();
    4751  }
    4852
  • trunk/yat/ColumnStream.h

    r1336 r1397  
    22#define _theplu_yat__utility_column_stream_
    33
    4 // $Id: ColumnStream.h 2384 2010-12-22 14:03:36Z peter $
     4// $Id: ColumnStream.h 2526 2011-07-25 02:03:35Z peter $
    55
    66/*
    77  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2009, 2010 Peter Johansson
     8  Copyright (C) 2009, 2010, 2011 Peter Johansson
    99
    1010  This file is part of yat, http://dev.thep.lu.se/yat
     
    2323  along with yat. If not, see <http://www.gnu.org/licenses/>.
    2424*/
    25 #include <fstream>
     25
    2626#include <iosfwd>
    2727#include <sstream>
     
    8787    void fill(size_t, size_t);
    8888    bool writeline(size_t i);
    89     inline size_t columns(void) const { return buffer_.size(); }
     89    size_t columns(void) const;
    9090   
    9191
  • trunk/yat/CommandLine.cc

    r1351 r1397  
    1 // $Id: CommandLine.cc 2458 2011-04-03 15:14:46Z peter $
     1// $Id: CommandLine.cc 2526 2011-07-25 02:03:35Z peter $
    22
    33/*
    44  Copyright (C) 2007 Jari Häkkinen, Peter Johansson, Markus Ringnér
    55  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    6   Copyright (C) 2009, 2010 Peter Johansson
     6  Copyright (C) 2009, 2010, 2011 Peter Johansson
    77
    88  This file is part of the yat library, http://dev.thep.lu.se/yat
  • trunk/yat/Exception.cc

    r1351 r1397  
    1 // $Id: Exception.cc 2459 2011-04-03 15:42:44Z peter $
     1// $Id: Exception.cc 2526 2011-07-25 02:03:35Z peter $
    22
    33/*
    4   Copyright (C) 2010 Peter Johansson
     4  Copyright (C) 2010, 2011 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
  • trunk/yat/Exception.h

    r1351 r1397  
    22#define _theplu_yat_utility_exception_
    33
    4 // $Id: Exception.h 2459 2011-04-03 15:42:44Z peter $
     4// $Id: Exception.h 2526 2011-07-25 02:03:35Z peter $
    55
    66/*
    77  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2010 Peter Johansson
     8  Copyright (C) 2010, 2011 Peter Johansson
    99
    1010  This file is part of the yat library, http://dev.thep.lu.se/yat
Note: See TracChangeset for help on using the changeset viewer.