[Liblas-commits] hg: remove LASFile,
it was useless and not being used
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri Jan 29 10:05:04 EST 2010
changeset 38451089c06a in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=38451089c06a
summary: remove LASFile, it was useless and not being used
diffstat:
include/Makefile.am | 2 -
include/liblas/detail/file.hpp | 90 ------------------
include/liblas/lasfile.hpp | 85 -----------------
src/Makefile.am | 4 +-
src/detail/file.cpp | 195 -----------------------------------------
src/las_c_api.cpp | 1 -
src/lasfile.cpp | 116 ------------------------
7 files changed, 1 insertions(+), 492 deletions(-)
diffs (truncated from 553 to 300 lines):
diff -r addf137144ca -r 38451089c06a include/Makefile.am
--- a/include/Makefile.am Fri Jan 29 08:49:06 2010 -0600
+++ b/include/Makefile.am Fri Jan 29 09:00:25 2010 -0600
@@ -8,7 +8,6 @@
liblas/lasclassification.hpp \
liblas/lascolor.hpp \
liblas/laserror.hpp \
- liblas/lasfile.hpp \
liblas/lasheader.hpp \
liblas/laspoint.hpp \
liblas/lasreader.hpp \
@@ -21,7 +20,6 @@
liblas/capi/las_version.h \
liblas/capi/las_config.h \
liblas/detail/endian.hpp \
- liblas/detail/file.hpp \
liblas/detail/fwd.hpp \
liblas/detail/reader.hpp \
liblas/detail/reader10.hpp \
diff -r addf137144ca -r 38451089c06a include/liblas/detail/file.hpp
--- a/include/liblas/detail/file.hpp Fri Jan 29 08:49:06 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/******************************************************************************
- * $Id$
- *
- * Project: libLAS - http://liblas.org - A BSD library for LAS format data.
- * Purpose: A composite class to handle read/write operations
- * Author: Mateusz Loskot, mateusz at loskot.net
- *
- ******************************************************************************
- * Copyright (c) 2008, Mateusz Loskot
- * Copyright (c) 2008, Howard Butler
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following
- * conditions are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of the Martin Isenburg or Iowa Department
- * of Natural Resources nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- ****************************************************************************/
-
-#ifndef LIBLAS_DETAIL_FILE_HPP_INCLUDED
-#define LIBLAS_DETAIL_FILE_HPP_INCLUDED
-
-#include <liblas/lasreader.hpp>
-#include <liblas/laswriter.hpp>
-#include <memory>
-#include <string>
-#include <fstream>
-#include <iostream>
-#include <stdexcept>
-#include <cassert>
-
-namespace liblas { namespace detail {
-
-class FileImpl
-{
-public:
-
- FileImpl(std::string const& filename);
- FileImpl(std::string const& filename, LASHeader const& header, int mode);
- ~FileImpl();
-
- std::string GetName() const;
- int GetMode() const;
- LASHeader const& GetHeader() const;
- LASReader& GetReader();
- LASWriter& GetWriter();
-
-private:
-
- // Blocked copying operations, declared but not defined.
- FileImpl(FileImpl const& other);
- FileImpl& operator=(FileImpl const& rhs);
-
- int m_mode;
- std::string m_filename;
- std::istream* m_istrm;
- std::ostream* m_ostrm;
- LASReader* m_reader;
- LASWriter* m_writer;
- LASHeader m_header;
-
- void throw_no_file_error() const;
-};
-
-}} // namespace liblas::detail
-
-#endif // LIBLAS_DETAIL_FILE_HPP_INCLUDED
diff -r addf137144ca -r 38451089c06a include/liblas/lasfile.hpp
--- a/include/liblas/lasfile.hpp Fri Jan 29 08:49:06 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/******************************************************************************
- * $Id$
- *
- * Project: libLAS - http://liblas.org - A BSD library for LAS format data.
- * Purpose: A composite class to handle read/write operations
- * Author: Mateusz Loskot, mateusz at loskot.net
- *
- ******************************************************************************
- * Copyright (c) 2008, Mateusz Loskot
- * Copyright (c) 2008, Howard Butler
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following
- * conditions are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of the Martin Isenburg or Iowa Department
- * of Natural Resources nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- ****************************************************************************/
-
-#ifndef LIBLAS_LASFILE_HPP_INCLUDED
-#define LIBLAS_LASFILE_HPP_INCLUDED
-
-#include <liblas/detail/file.hpp> // complete type required
-#include <liblas/detail/sharedptr.hpp>
-#include <string>
-#include <cassert>
-
-namespace liblas {
-
-/// \todo to be documented
-class LASFile
-{
-public:
-
- enum Mode
- {
- eRead = 0,
- eWrite = 1,
- eAppend = 2
- };
-
- LASFile();
- LASFile(std::string const& filename);
- LASFile(std::string const& filename, LASHeader const& header, Mode mode);
- LASFile(LASFile const& other);
- LASFile& operator=(LASFile const& rhs);
-
- bool IsNull() const;
- std::string GetName() const;
- Mode GetMode() const;
- LASHeader const& GetHeader() const;
- LASReader& GetReader();
- LASWriter& GetWriter();
-
-private:
-
- detail::SharedPtr<detail::FileImpl> m_pimpl;
-};
-
-} // namespace liblas
-
-#endif // LIBLAS_LASFILE_HPP_INCLUDED
diff -r addf137144ca -r 38451089c06a src/Makefile.am
--- a/src/Makefile.am Fri Jan 29 08:49:06 2010 -0600
+++ b/src/Makefile.am Fri Jan 29 09:00:25 2010 -0600
@@ -34,7 +34,6 @@
lasvariablerecord.cpp \
lasreader.cpp \
laswriter.cpp \
- lasfile.cpp \
las_c_api.cpp \
lasspatialreference.cpp \
lasformat.cpp \
@@ -45,8 +44,7 @@
detail/writer.cpp \
detail/writer10.cpp \
detail/writer11.cpp \
- detail/writer12.cpp \
- detail/file.cpp
+ detail/writer12.cpp
if GDAL_IS_CONFIG
liblas_la_SOURCES += gt_wkt_srs.cpp gt_citation.cpp tifvsi.cpp
diff -r addf137144ca -r 38451089c06a src/detail/file.cpp
--- a/src/detail/file.cpp Fri Jan 29 08:49:06 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,195 +0,0 @@
-/******************************************************************************
- * $Id$
- *
- * Project: libLAS - http://liblas.org - A BSD library for LAS format data.
- * Purpose: A composite class to handle read/write operations
- * Author: Mateusz Loskot, mateusz at loskot.net
- *
- ******************************************************************************
- * Copyright (c) 2008, Mateusz Loskot
- * Copyright (c) 2008, Howard Butler
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following
- * conditions are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of the Martin Isenburg or Iowa Department
- * of Natural Resources nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- ****************************************************************************/
-
-#include <liblas/detail/file.hpp>
-#include <liblas/lasreader.hpp>
-#include <liblas/laswriter.hpp>
-#include <string>
-#include <iostream>
-#include <fstream>
-#include <stdexcept>
-#include <cassert>
-
-namespace liblas { namespace detail {
-
-FileImpl::FileImpl(std::string const& filename)
- : m_mode(0), m_filename(filename),
- m_istrm(0), m_ostrm(0), m_reader(0), m_writer(0)
-{
- if (filename == "stdin")
- {
- m_istrm = &std::cin;
- }
- else
- {
- std::ios::openmode const mode = std::ios::in | std::ios::binary;
- m_istrm = new std::ifstream(m_filename.c_str(), mode);
-
- if (!m_istrm->good())
- {
- delete m_istrm;
- throw_no_file_error();
- }
- }
-
More information about the Liblas-commits
mailing list