[Liblas-commits] hg: rename Reader::seek to Reader::Seek to bring name in line wi...

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Dec 7 09:29:12 EST 2010


changeset 34d5d9cb5d36 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=34d5d9cb5d36
summary: rename Reader::seek to Reader::Seek to bring name in line with other method names

diffstat:

 include/liblas/lasreader.hpp |   2 +-
 src/las_c_api.cpp            |   2 +-
 src/lasindex.cpp             |  36 ++++++++++++++++++------------------
 src/lasreader.cpp            |   2 +-
 test/unit/lasreader_test.cpp |  10 ++++------
 5 files changed, 25 insertions(+), 27 deletions(-)

diffs (156 lines):

diff -r 2a87e6c492ac -r 34d5d9cb5d36 include/liblas/lasreader.hpp
--- a/include/liblas/lasreader.hpp	Mon Dec 06 16:28:23 2010 -0600
+++ b/include/liblas/lasreader.hpp	Tue Dec 07 08:29:07 2010 -0600
@@ -112,7 +112,7 @@
     /// Move to the specified point to start 
     /// ReadNextPoint operations
     /// @exception may throw std::exception
-    bool seek(std::size_t n);
+    bool Seek(std::size_t n);
 
     /// Provides index-based access to point records.
     /// The operator is implemented in terms of ReadPointAt method
diff -r 2a87e6c492ac -r 34d5d9cb5d36 src/las_c_api.cpp
--- a/src/las_c_api.cpp	Mon Dec 06 16:28:23 2010 -0600
+++ b/src/las_c_api.cpp	Tue Dec 07 08:29:07 2010 -0600
@@ -349,7 +349,7 @@
 
     try {
         liblas::Reader *reader = ((liblas::Reader*) hReader);
-        if (reader->seek((std::size_t) position)) 
+        if (reader->Seek((std::size_t) position)) 
             return LE_None;
         else 
             return LE_Failure;
diff -r 2a87e6c492ac -r 34d5d9cb5d36 src/lasindex.cpp
--- a/src/lasindex.cpp	Mon Dec 06 16:28:23 2010 -0600
+++ b/src/lasindex.cpp	Tue Dec 07 08:29:07 2010 -0600
@@ -689,17 +689,17 @@
 				if (ParamSrc.m_iterator && (m_filterResult.size() >= ParamSrc.m_iterator->m_chunkSize))
 					break;
 			} // while
-			if (PointsScannedThisTime >= PointsToIgnore)
-			{
-				PointsScannedCurVLR += PointsScannedThisTime - PointsToIgnore;
-				if (PointsScannedCurVLR >= PointsThisRecord)
-					VLRDone = true;
-				if (ParamSrc.m_iterator)
-				{
-					ParamSrc.m_iterator->m_totalPointsScanned += PointsScannedThisTime - PointsToIgnore;
-					ParamSrc.m_iterator->m_ptsScannedCurVLR = PointsScannedCurVLR;
-				} // if
-			} // if
+			if (PointsScannedThisTime >= PointsToIgnore)
+			{
+				PointsScannedCurVLR += PointsScannedThisTime - PointsToIgnore;
+				if (PointsScannedCurVLR >= PointsThisRecord)
+					VLRDone = true;
+				if (ParamSrc.m_iterator)
+				{
+					ParamSrc.m_iterator->m_totalPointsScanned += PointsScannedThisTime - PointsToIgnore;
+					ParamSrc.m_iterator->m_ptsScannedCurVLR = PointsScannedCurVLR;
+				} // if
+			} // if
 		} // if
 		else if (ParamSrc.m_iterator)
 		{
@@ -923,7 +923,7 @@
 		{
 			// seek and read
 			assert(static_cast<boost::uint32_t>(PointID) < m_pointRecordsCount);
-			PtRead = (m_reader->seek(PointID) && m_reader->ReadNextPoint());
+			PtRead = (m_reader->Seek(PointID) && m_reader->ReadNextPoint());
 		} // if
 		if (PtRead)
 		{
@@ -966,7 +966,7 @@
 				{
 					// seek and read
 					assert(static_cast<boost::uint32_t>(PointID) < m_pointRecordsCount);
-					PtRead = (m_reader->seek(PointID) && m_reader->ReadNextPoint());
+					PtRead = (m_reader->Seek(PointID) && m_reader->ReadNextPoint());
 				} // if
 				if (PtRead)
 				{
@@ -1010,7 +1010,7 @@
 				{
 					// seek and read
 					assert(static_cast<boost::uint32_t>(PointID) < m_pointRecordsCount);
-					PtRead = (m_reader->seek(PointID) && m_reader->ReadNextPoint());
+					PtRead = (m_reader->Seek(PointID) && m_reader->ReadNextPoint());
 				} // if
 				if (PtRead)
 				{
@@ -1035,7 +1035,7 @@
 	m_versionMinor = LIBLAS_INDEX_VERSIONMINOR;
 	
 	// reset to beginning of point data records in case points had been examined before index is built
-	m_reader->seek(0);
+	m_reader->Seek(0);
 	// need the header to get number of point records
     m_pointRecordsCount = m_pointheader.GetPointRecordsCount();
     // get the bounds of the data and scale factors in case they are needed for point translation
@@ -1199,7 +1199,7 @@
 							{
 								// get the actual point from the las file
 								assert(MapIt->first < m_pointRecordsCount);
-								if (m_reader->seek(MapIt->first) && m_reader->ReadNextPoint())
+								if (m_reader->Seek(MapIt->first) && m_reader->ReadNextPoint())
 								{
 									boost::uint32_t FirstPt = 0, LastCellZ = static_cast<boost::uint32_t>(~0);
 									boost::uint32_t LastSubCell = static_cast<boost::uint32_t>(~0);
@@ -1562,7 +1562,7 @@
 {
 	try {
 		Writer writer(*m_ofs, m_idxheader);
-		m_reader->seek(0);
+		m_reader->Seek(0);
 		while (m_reader->ReadNextPoint())
 		{
 			Point CurPt = m_reader->GetPoint();
@@ -1581,7 +1581,7 @@
 	try {
 		Writer writer(*m_ofs, m_idxheader);
 		/* test block - uncommenting this makes it just like above version with included points
-		m_reader->seek(0);
+		m_reader->Seek(0);
 		while (m_reader->ReadNextPoint())
 		{
 			Point CurPt = m_reader->GetPoint();
diff -r 2a87e6c492ac -r 34d5d9cb5d36 src/lasreader.cpp
--- a/src/lasreader.cpp	Mon Dec 06 16:28:23 2010 -0600
+++ b/src/lasreader.cpp	Tue Dec 07 08:29:07 2010 -0600
@@ -193,7 +193,7 @@
     return false;
 }
 
-bool Reader::seek(std::size_t n)
+bool Reader::Seek(std::size_t n)
 {
     try
     {
diff -r 2a87e6c492ac -r 34d5d9cb5d36 test/unit/lasreader_test.cpp
--- a/test/unit/lasreader_test.cpp	Mon Dec 06 16:28:23 2010 -0600
+++ b/test/unit/lasreader_test.cpp	Tue Dec 07 08:29:07 2010 -0600
@@ -154,17 +154,15 @@
         liblas::Reader reader(ifs);
 
         // read 1st point
-	reader.ReadNextPoint();
+        reader.ReadNextPoint();
         test_file10_point1(reader.GetPoint());
         
-	// seek to 4th point
-        reader.seek(4);
+        // seek to 4th point
+        reader.Seek(4);
 
-	// read 4th point
+        // read 4th point
         test_file10_point4(reader[3]);
 
     }
-
-    // Test GetStream method
 }
 


More information about the Liblas-commits mailing list