[Liblas-commits] hg: 4 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Mon May 24 07:11:09 EDT 2010


changeset dc7f53a65088 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=dc7f53a65088
summary: box_calculator is required to be fully copyable, thus replaced extent non-const ref with copy. Removed use of old names with LAS prefix.

changeset 0bffc0cbf3ef in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=0bffc0cbf3ef
summary: Removed used of old names with LAS prefix

changeset 372c059d13ae in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=372c059d13ae
summary: Updated use of std::bitset for C++0x with long long type support

changeset 8f60d4abb7bb in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=8f60d4abb7bb
summary: Replaced old names using LAS prefix with new ones. Added a few missing casts. Cleaned warnings thrown by Visual C++ 10.0

diffstat:

 apps/las2las.c                         |   4 +-
 apps/lasinfo.c                         |   6 +-
 apps/lasmerge.c                        |  12 +++---
 include/liblas/capi/liblas.h           |   2 +-
 include/liblas/detail/utility.hpp      |   1 +
 include/liblas/exception.hpp           |   6 +-
 include/liblas/guid.hpp                |   2 +-
 include/liblas/iterator.hpp            |  32 ++++++++--------
 include/liblas/lasclassification.hpp   |   9 +++-
 src/detail/reader/header.cpp           |   2 +-
 src/las_c_api.cpp                      |   4 +-
 src/lasclassification.cpp              |   2 +-
 src/lasheader.cpp                      |   2 +-
 src/lasspatialreference.cpp            |   5 ++
 test/unit/common.cpp                   |  30 +++++++-------
 test/unit/common.hpp                   |  20 +++++-----
 test/unit/lasheader_test.cpp           |  56 ++++++++++++++--------------
 test/unit/laspoint_test.cpp            |  68 ++++++++++++++++------------------
 test/unit/lasreader_iterator_test.cpp  |  18 ++++----
 test/unit/lasreader_test.cpp           |  22 +++++-----
 test/unit/lasspatialreference_test.cpp |  50 ++++++++++++------------
 test/unit/lasvariablerecord_test.cpp   |  22 +++++-----
 test/unit/laswriter_test.cpp           |  40 ++++++++++----------
 23 files changed, 211 insertions(+), 204 deletions(-)

diffs (truncated from 1522 to 300 lines):

diff -r 44d6ba098ff9 -r 8f60d4abb7bb apps/las2las.c
--- a/apps/las2las.c	Sun May 23 07:46:07 2010 +0300
+++ b/apps/las2las.c	Mon May 24 12:13:52 2010 +0100
@@ -538,7 +538,7 @@
 
     if (!p) {
         if (LASError_GetLastErrorNum()) 
-            LASError_Print("Not able to fetch a point.  LASReader is invalid");
+            LASError_Print("Not able to fetch a point.  Reader is invalid");
         else
             LASError_Print("File does not contain any points to read.");
         exit(1);
@@ -1023,7 +1023,7 @@
     p = LASReader_GetNextPoint(reader);
     if (!p) {
         if (LASError_GetLastErrorNum()) 
-            LASError_Print("Not able to fetch a point.  LASReader is invalid");
+            LASError_Print("Not able to fetch a point.  Reader is invalid");
         else
             LASError_Print("File does not contain any points to read.");
         exit(1);
diff -r 44d6ba098ff9 -r 8f60d4abb7bb apps/lasinfo.c
--- a/apps/lasinfo.c	Sun May 23 07:46:07 2010 +0300
+++ b/apps/lasinfo.c	Mon May 24 12:13:52 2010 +0100
@@ -236,7 +236,7 @@
 
     header = LASReader_GetHeader(reader);
     if (!header) { 
-        LASError_Print("Could not get LASHeader ");
+        LASError_Print("Could not get Header ");
         exit(1);
     } 
 
@@ -291,7 +291,7 @@
         if (! header) {
             header = LASReader_GetHeader(reader);
             if (!header) { 
-                LASError_Print("Could not get LASHeader ");
+                LASError_Print("Could not get Header ");
                 exit(1);
             } 
         } 
@@ -313,7 +313,7 @@
             if (! header) {
                 header = LASReader_GetHeader(reader);
                 if (!header) { 
-                    LASError_Print("Could not get LASHeader ");
+                    LASError_Print("Could not get Header ");
                     exit(1);
                 }
             } 
diff -r 44d6ba098ff9 -r 8f60d4abb7bb apps/lasmerge.c
--- a/apps/lasmerge.c	Sun May 23 07:46:07 2010 +0300
+++ b/apps/lasmerge.c	Mon May 24 12:13:52 2010 +0100
@@ -266,13 +266,13 @@
     {
         reader = LASReader_Create(file_names_in[i]);
         if (!reader) { 
-                LASError_Print("Could not get LASReader "); 
+                LASError_Print("Could not get Reader "); 
                 exit(1);
             } 
       
             header = LASReader_GetHeader(reader);
             if (!header) { 
-                LASError_Print("Could not get LASHeader "); 
+                LASError_Print("Could not get Header "); 
                 exit(1);
             } 
 
@@ -413,7 +413,7 @@
 
     writer = LASWriter_Create(file_name_out, merged_header, LAS_MODE_WRITE);
     if (!writer) { 
-        LASError_Print("Could not create LASWriter "); 
+        LASError_Print("Could not create Writer "); 
         exit(1);
     } 
 
@@ -424,12 +424,12 @@
     {
         reader = LASReader_Create(file_names_in[i]);
         if (!reader) { 
-            LASError_Print("Could not get LASReader ");
+            LASError_Print("Could not get Reader ");
             exit(1);
         } 
         header = LASReader_GetHeader(reader);
         if (!header) { 
-            LASError_Print("Could not get LASHeader ");
+            LASError_Print("Could not get Header ");
             exit(1);
         } 
 
@@ -484,7 +484,7 @@
       
         header = LASReader_GetHeader(reader);
         if (!header) { 
-            LASError_Print("Could not get LASHeader ");
+            LASError_Print("Could not get Header ");
             exit(1);
         } 
 
diff -r 44d6ba098ff9 -r 8f60d4abb7bb include/liblas/capi/liblas.h
--- a/include/liblas/capi/liblas.h	Sun May 23 07:46:07 2010 +0300
+++ b/include/liblas/capi/liblas.h	Mon May 24 12:13:52 2010 +0100
@@ -497,7 +497,7 @@
 */
 LAS_DLL LASHeaderH LASHeader_Create(void);
 
-/** Destroys/deletes a LASHeader instance
+/** Destroys/deletes a Header instance
 */
 LAS_DLL void LASHeader_Destroy(LASHeaderH hHeader);
 
diff -r 44d6ba098ff9 -r 8f60d4abb7bb include/liblas/detail/utility.hpp
--- a/include/liblas/detail/utility.hpp	Sun May 23 07:46:07 2010 +0300
+++ b/include/liblas/detail/utility.hpp	Mon May 24 12:13:52 2010 +0100
@@ -83,6 +83,7 @@
 template <typename T, std::size_t N>
 inline std::size_t static_array_size(T (&t)[N])
 {
+    ::liblas::detail::ignore_unused_variable_warning(t);
     return (sizeof(t) / sizeof(t[0]));
 }
 
diff -r 44d6ba098ff9 -r 8f60d4abb7bb include/liblas/exception.hpp
--- a/include/liblas/exception.hpp	Sun May 23 07:46:07 2010 +0300
+++ b/include/liblas/exception.hpp	Mon May 24 12:13:52 2010 +0100
@@ -49,7 +49,7 @@
 namespace liblas {
 
 /// Exception reporting invalid point data.
-/// It's usually thrown by LASPoint::Validate function.
+/// It's usually thrown by Point::Validate function.
 class invalid_point_data : public std::runtime_error
 {
 public:
@@ -59,8 +59,8 @@
     {}
 
     /// Return flags identifying invalid point data members.
-    /// Flags are composed with composed with LASPoint::DataMemberFlag.
-    /// Testing flags example: bool timeValid = e.who() & LASPoint::eTime;
+    /// Flags are composed with composed with Point::DataMemberFlag.
+    /// Testing flags example: bool timeValid = e.who() & Point::eTime;
     unsigned int who() const
     {
         return m_who;
diff -r 44d6ba098ff9 -r 8f60d4abb7bb include/liblas/guid.hpp
--- a/include/liblas/guid.hpp	Sun May 23 07:46:07 2010 +0300
+++ b/include/liblas/guid.hpp	Mon May 24 12:13:52 2010 +0100
@@ -81,7 +81,7 @@
 /// Definition of Globally Unique Identifier type.
 /// The GUID is a 16-byte (128-bit) number.
 /// This class is used to represent value stored as Project Identifier
-/// in public header block (see LASHeader) of a LAS file.
+/// in public header block (see Header) of a LAS file.
 /// All files in a unique project should have the same value of
 /// the Project Identifier. It is used together with File Source ID to
 /// uniquely identify every LAS, globally.
diff -r 44d6ba098ff9 -r 8f60d4abb7bb include/liblas/iterator.hpp
--- a/include/liblas/iterator.hpp	Sun May 23 07:46:07 2010 +0300
+++ b/include/liblas/iterator.hpp	Mon May 24 12:13:52 2010 +0100
@@ -49,7 +49,7 @@
 
 namespace liblas {
 
-/// Input iterator associated with liblas::LASReader.
+/// Input iterator associated with liblas::Reader.
 /// It allows to read LAS file records in similar way to elements of STL container,
 /// as well as apply STL algorithms that accept pair of input iterators.
 /// \sa About Input Iterator at http://www.sgi.com/tech/stl/InputIterator.html
@@ -72,7 +72,7 @@
 
     /// Initializes iterator pointing to beginning of LAS file sequence.
     /// No ownership transfer of reader object occurs.
-    reader_iterator(liblas::LASReader& reader)
+    reader_iterator(liblas::Reader& reader)
         : m_reader(&reader)
     {
         assert(0 != m_reader);
@@ -80,7 +80,7 @@
     }
 
     /// Dereference operator.
-    /// It is implemented in terms of LASReader::GetPoint function.
+    /// It is implemented in terms of Reader::GetPoint function.
     reference operator*() const
     {
         assert(0 != m_reader);
@@ -88,14 +88,14 @@
     }
 
     /// Pointer-to-member operator.
-    /// It is implemented in terms of LASReader::GetPoint function.
+    /// It is implemented in terms of Reader::GetPoint function.
     pointer operator->() const
     {
         return &(operator*());
     }
 
     /// Pre-increment opertor.
-    /// Moves iterator to next record by calling LASReader::ReadNextPoint.
+    /// Moves iterator to next record by calling Reader::ReadNextPoint.
     reader_iterator& operator++()
     {
         assert(0 != m_reader);
@@ -104,7 +104,7 @@
     }
 
     /// Post-increment opertor.
-    /// Moves iterator to next record by calling LASReader::ReadNextPoint.
+    /// Moves iterator to next record by calling Reader::ReadNextPoint.
     reader_iterator operator++(int)
     {
         reader_iterator tmp(*this);
@@ -113,7 +113,7 @@
     }
 
     /// Compare passed iterator to this.
-    /// Determine if both iterators apply to the same instance of LASReader class.
+    /// Determine if both iterators apply to the same instance of Reader class.
     bool equal(reader_iterator const& rhs) const
     {
         return m_reader == rhs.m_reader;
@@ -129,7 +129,7 @@
         }
     }
 
-    liblas::LASReader* m_reader;
+    liblas::Reader* m_reader;
 };
 
 /// Equality operator implemented in terms of reader_iterator::equal
@@ -146,7 +146,7 @@
     return (!(lhs == rhs));
 }
 
-/// Output iterator associated with liblas::LASWriter.
+/// Output iterator associated with liblas::Writer.
 /// It allows to store a sequence of records into LAS file.
 /// \sa About Output Iterator at http://www.sgi.com/tech/stl/OutputIterator.html
 ///
@@ -164,14 +164,14 @@
     /// Initialize iterator with given writer.
     /// The writer position is not changed.
     /// No ownership transfer of writer object occurs.
-    writer_iterator(liblas::LASWriter& writer)
+    writer_iterator(liblas::Writer& writer)
         : m_writer(&writer)
     {
         assert(0 != m_writer);
     }
 
     /// Dereference assignment operator.
-    /// Implemented in terms of LASWriter::WritePoint function.
+    /// Implemented in terms of Writer::WritePoint function.
     writer_iterator& operator=(reference value) 
     {
         assert(0 != m_writer);
@@ -205,16 +205,16 @@
 
 private:
 
-    liblas::LASWriter* m_writer;
+    liblas::Writer* m_writer;
 };
 
 // Declare specializations for user's convenience
 
-/// Public specialization of LASReader input iterator for liblas::LASPoint type.
-typedef reader_iterator<LASPoint> lasreader_iterator;
+/// Public specialization of Reader input iterator for liblas::Point type.
+typedef reader_iterator<Point> lasreader_iterator;
 
-/// Public specialization of LASWriter output iterator for liblas::LASPoint type.
-typedef writer_iterator<LASPoint> laswriter_iterator;
+/// Public specialization of Writer output iterator for liblas::Point type.
+typedef writer_iterator<Point> laswriter_iterator;
 
 } // namespace liblas
 
diff -r 44d6ba098ff9 -r 8f60d4abb7bb include/liblas/lasclassification.hpp
--- a/include/liblas/lasclassification.hpp	Sun May 23 07:46:07 2010 +0300
+++ b/include/liblas/lasclassification.hpp	Mon May 24 12:13:52 2010 +0100
@@ -2,7 +2,7 @@
  * $Id$
  *
  * Project:  libLAS - http://liblas.org - A BSD library for LAS format data.
- * Purpose:  Definition of LASClassification type.
+ * Purpose:  Definition of Classification type.
  * Author:   Mateusz Loskot, mateusz at loskot.net
  *
  ******************************************************************************
@@ -145,8 +145,13 @@
     /// Returns index of ASPRS classification as defined in the lookup table.
     uint8_t GetClass() const
     {
+#if (defined(_MSC_VER) && _MSC_VER >=1600)


More information about the Liblas-commits mailing list