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

latest yat

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.