Changeset 1579:94ea2e8f3d8c


Ignore:
Timestamp:
02/13/10 08:36:41 (6 months ago)
Author:
Howard Butler <hobu.inc@…>
Branch:
default
Message:

actually use ReaderI and WriterI for pimpls for LASReader/LASWriter

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • include/liblas/lasreader.hpp

    r1577 r1579  
    143143    void Init(); // throws on error 
    144144 
    145     const std::auto_ptr<detail::ReaderImpl> m_pimpl; 
     145    const std::auto_ptr<ReaderI> m_pimpl; 
    146146    LASHeader m_header; 
    147147    LASPoint* m_point; 
     
    151151    // read from the istream 
    152152    bool bCustomHeader; 
     153 
     154    std::istream& m_ifs; 
    153155     
    154156}; 
  • include/liblas/laswriter.hpp

    r1577 r1579  
    4747#include <liblas/laspoint.hpp> 
    4848#include <liblas/detail/fwd.hpp> 
     49#include <liblas/interfaces.hpp> 
    4950 
    5051// std 
     
    99100    LASWriter& operator=(LASWriter const& rhs); 
    100101 
    101     const std::auto_ptr<detail::WriterImpl> m_pimpl; 
     102    const std::auto_ptr<WriterI> m_pimpl; 
    102103 
    103104    LASHeader m_header; 
    104105    detail::PointRecord m_record; 
     106    std::ostream& m_ofs; 
     107 
    105108}; 
    106109 
  • src/lasreader.cpp

    r1568 r1579  
    6161    m_point(0), 
    6262    m_empty_point(new LASPoint()), 
    63     bCustomHeader(false) 
     63    bCustomHeader(false), 
     64    m_ifs(ifs) 
    6465{ 
    6566    Init(); 
     
    7071    m_point(0), 
    7172    m_empty_point(new LASPoint()), 
    72     bCustomHeader(false) 
     73    bCustomHeader(false), 
     74    m_ifs(ifs) 
    7375 
    7476{ 
     
    164166std::istream& LASReader::GetStream() const 
    165167{ 
    166     return m_pimpl->GetStream(); 
     168    return m_ifs; 
    167169} 
    168170 
  • src/laswriter.cpp

    r1573 r1579  
    5555 
    5656LASWriter::LASWriter(std::ostream& ofs, LASHeader const& header) : 
    57     m_pimpl(detail::WriterFactory::Create(ofs, header)), m_header(header) 
     57    m_pimpl(detail::WriterFactory::Create(ofs, header)), m_header(header), 
     58    m_ofs(ofs) 
    5859{ 
    5960    m_pimpl->WriteHeader(m_header); 
     
    8687std::ostream& LASWriter::GetStream() const 
    8788{ 
    88     return m_pimpl->GetStream(); 
     89    return m_ofs; 
    8990} 
    9091 
Note: See TracChangeset for help on using the changeset viewer.