[Liblas-commits] libpc: initial guess
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri Feb 11 11:28:40 EST 2011
details: http://hg.liblas.orglibpc/rev/a5e755ab126b
changeset: 34:a5e755ab126b
user: Michael P. Gerlek <mpg at flaxen.com>
date: Fri Feb 11 08:28:07 2011 -0800
description:
initial guess
Subject: libpc: applied astyle everywhere (mostly to fix indents)
details: http://hg.liblas.orglibpc/rev/8dfc2ec4ff27
changeset: 35:8dfc2ec4ff27
user: Michael P. Gerlek <mpg at flaxen.com>
date: Fri Feb 11 08:28:32 2011 -0800
description:
applied astyle everywhere (mostly to fix indents)
diffstat:
astylerc | 13 +
include/libpc/Bounds.hpp | 567 +++++++++++++++++++++-------------------
include/libpc/ColorFilter.hpp | 58 ++--
include/libpc/CropFilter.hpp | 56 ++--
include/libpc/FauxReader.hpp | 56 ++--
include/libpc/FauxWriter.hpp | 60 ++--
include/libpc/Field.hpp | 150 +++++----
include/libpc/Filter.hpp | 58 ++--
include/libpc/Header.hpp | 74 ++--
include/libpc/MosaicFilter.hpp | 56 ++--
include/libpc/PointData.hpp | 138 ++++----
include/libpc/PointLayout.hpp | 117 ++++---
include/libpc/Range.hpp | 92 +++---
include/libpc/Reader.hpp | 54 +-
include/libpc/Stage.hpp | 70 ++--
include/libpc/Utils.hpp | 88 +++---
include/libpc/Writer.hpp | 73 ++--
include/libpc/export.hpp | 46 +-
src/Bounds.cpp | 46 +-
src/ColorFilter.cpp | 186 ++++++------
src/CropFilter.cpp | 82 ++--
src/FauxReader.cpp | 130 ++++----
src/FauxWriter.cpp | 98 +++---
src/Field.cpp | 195 ++++++++------
src/Filter.cpp | 54 +-
src/Header.cpp | 110 +++---
src/MosaicFilter.cpp | 142 +++++-----
src/PointData.cpp | 206 +++++++-------
src/PointLayout.cpp | 178 ++++++------
src/Reader.cpp | 50 +-
src/Stage.cpp | 52 +-
src/Utils.cpp | 46 +-
src/Writer.cpp | 74 ++--
33 files changed, 1793 insertions(+), 1682 deletions(-)
diffs (truncated from 4841 to 300 lines):
diff -r 118599619883 -r 8dfc2ec4ff27 astylerc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/astylerc Fri Feb 11 08:28:32 2011 -0800
@@ -0,0 +1,13 @@
+# usage (for a single file):
+# AStyle.exe --options=astylerc include/libpc/Bounds.hpp
+#
+# usage (for directories):
+# AStyle.exe --options=astylerc --recursive "include/*.hpp" "src/*.cpp"
+
+--style=ansi
+
+--indent=spaces=4
+
+--convert-tabs
+
+--lineend=linux
diff -r 118599619883 -r 8dfc2ec4ff27 include/libpc/Bounds.hpp
--- a/include/libpc/Bounds.hpp Fri Feb 11 08:35:14 2011 -0600
+++ b/include/libpc/Bounds.hpp Fri Feb 11 08:28:32 2011 -0800
@@ -2,40 +2,40 @@
* $Id$
*
* Project: libLAS - http://liblas.org - A BSD library for LAS format data.
- * Purpose: LAS bounds class
+ * Purpose: LAS bounds class
* Author: Howard Butler, hobu.inc at gmail.com
*
******************************************************************************
* Copyright (c) 2010, Howard Butler
*
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following
+ *
+ * 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
+ *
+ * * 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
+ * * 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
+ * * 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
+ *
+ * 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.
****************************************************************************/
@@ -59,79 +59,79 @@
class LIBPC_DLL Bounds
{
public:
- typedef T value_type;
- typedef typename std::vector< Range<T> >::size_type size_type;
- typedef typename std::vector< Range<T> > RangeVec;
+ typedef T value_type;
+ typedef typename std::vector< Range<T> >::size_type size_type;
+ typedef typename std::vector< Range<T> > RangeVec;
private:
- RangeVec ranges;
-
+ RangeVec ranges;
+
public:
-Bounds<T>()
-{
- ranges.resize(0);
-}
+ Bounds<T>()
+ {
+ ranges.resize(0);
+ }
-Bounds(Bounds const& other)
- :
- ranges(other.ranges)
-{
-}
+ Bounds(Bounds const& other)
+ :
+ ranges(other.ranges)
+ {
+ }
-Bounds(RangeVec const& rngs)
- :
- ranges(rngs)
-{
-}
+ Bounds(RangeVec const& rngs)
+ :
+ ranges(rngs)
+ {
+ }
-Bounds( T minx,
- T miny,
- T minz,
- T maxx,
- T maxy,
- T maxz)
-{
- ranges.resize(3);
-
- ranges[0].minimum = minx;
- ranges[1].minimum = miny;
- ranges[2].minimum = minz;
+ Bounds( T minx,
+ T miny,
+ T minz,
+ T maxx,
+ T maxy,
+ T maxz)
+ {
+ ranges.resize(3);
- ranges[0].maximum = maxx;
- ranges[1].maximum = maxy;
- ranges[2].maximum = maxz;
-
+ ranges[0].minimum = minx;
+ ranges[1].minimum = miny;
+ ranges[2].minimum = minz;
+
+ ranges[0].maximum = maxx;
+ ranges[1].maximum = maxy;
+ ranges[2].maximum = maxz;
+
#ifdef DEBUG
- verify();
+ verify();
#endif
-}
+ }
-Bounds( T minx,
- T miny,
- T maxx,
- T maxy)
-{
+ Bounds( T minx,
+ T miny,
+ T maxx,
+ T maxy)
+ {
- ranges.resize(2);
+ ranges.resize(2);
- ranges[0].minimum = minx;
- ranges[1].minimum = miny;
+ ranges[0].minimum = minx;
+ ranges[1].minimum = miny;
- ranges[0].maximum = maxx;
- ranges[1].maximum = maxy;
-
+ ranges[0].maximum = maxx;
+ ranges[1].maximum = maxy;
+
#ifdef DEBUG
- verify();
+ verify();
#endif
-}
+ }
////Bounds( const Point& min, const Point& max)
////{
//// ranges.resize(3);
-////
+////
//// ranges[0].minimum = min.GetX();
//// ranges[1].minimum = min.GetY();
//// ranges[2].minimum = min.GetZ();
@@ -139,63 +139,67 @@
//// ranges[0].maximum = max.GetX();
//// ranges[1].maximum = max.GetY();
//// ranges[2].maximum = max.GetZ();
-////
+////
////#ifdef DEBUG
//// verify();
////#endif
////}
-T (min)(std::size_t const& index) const
-{
- if (ranges.size() <= index) {
- // std::ostringstream msg;
- // msg << "Bounds dimensions, " << ranges.size() <<", is less "
- // << "than the given index, " << index;
- // throw std::runtime_error(msg.str());
- return 0;
+ T (min)(std::size_t const& index) const
+ {
+ if (ranges.size() <= index)
+ {
+ // std::ostringstream msg;
+ // msg << "Bounds dimensions, " << ranges.size() <<", is less "
+ // << "than the given index, " << index;
+ // throw std::runtime_error(msg.str());
+ return 0;
+ }
+ return ranges[index].minimum;
}
- return ranges[index].minimum;
-}
-void (min)(std::size_t const& index, T v)
-{
- if (ranges.size() <= index) {
- ranges.resize(index + 1);
+ void (min)(std::size_t const& index, T v)
+ {
+ if (ranges.size() <= index)
+ {
+ ranges.resize(index + 1);
+ }
+ ranges[index].minimum = v;
}
- ranges[index].minimum = v;
-}
-T (max)(std::size_t const& index) const
-{
- if (ranges.size() <= index) {
- // std::ostringstream msg;
- // msg << "Bounds dimensions, " << ranges.size() <<", is less "
- // << "than the given index, " << index;
- // throw std::runtime_error(msg.str());
- return 0;
+ T (max)(std::size_t const& index) const
+ {
+ if (ranges.size() <= index)
+ {
+ // std::ostringstream msg;
+ // msg << "Bounds dimensions, " << ranges.size() <<", is less "
+ // << "than the given index, " << index;
+ // throw std::runtime_error(msg.str());
+ return 0;
+ }
+ return ranges[index].maximum;
}
- return ranges[index].maximum;
-}
-void (max)(std::size_t const& index, T v)
-{
- if (ranges.size() <= index) {
- ranges.resize(index + 1);
+ void (max)(std::size_t const& index, T v)
+ {
+ if (ranges.size() <= index)
+ {
+ ranges.resize(index + 1);
+ }
+ ranges[index].maximum = v;
}
More information about the Liblas-commits
mailing list