[Liblas-commits] hg: Added missing <boost/cstdint.hpp>. Fully
qualified Boost int...
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Aug 18 10:19:02 EDT 2010
changeset edde2eddfca5 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=edde2eddfca5
summary: Added missing <boost/cstdint.hpp>. Fully qualified Boost integer types in headers. Use using directive in .cpp files.
diffstat:
include/liblas/detail/index/indexcell.hpp | 50 ++++++++++---------
include/liblas/detail/index/indexoutput.hpp | 8 +-
include/liblas/lasindex.hpp | 72 ++++++++++++++--------------
include/liblas/lasreader.hpp | 7 +-
src/detail/index/indexcell.cpp | 4 +
src/detail/index/indexoutput.cpp | 4 +
src/lasindex.cpp | 4 +
src/lasreader.cpp | 4 +-
8 files changed, 85 insertions(+), 68 deletions(-)
diffs (truncated from 392 to 300 lines):
diff -r 3ef3932dd20a -r edde2eddfca5 include/liblas/detail/index/indexcell.hpp
--- a/include/liblas/detail/index/indexcell.hpp Wed Aug 18 15:15:24 2010 +0100
+++ b/include/liblas/detail/index/indexcell.hpp Wed Aug 18 15:23:02 2010 +0100
@@ -43,16 +43,18 @@
#ifndef LIBLAS_DETAIL_INDEXCELL_HPP_INCLUDED
#define LIBLAS_DETAIL_INDEXCELL_HPP_INCLUDED
-
+// boost
+#include <boost/cstdint.hpp>
+// std
#include <map>
namespace liblas { namespace detail {
-typedef int16_t ElevExtrema;
-typedef uint32_t ElevRange;
-typedef uint8_t ConsecPtAccumulator;
-typedef std::map<uint32_t, ConsecPtAccumulator> IndexCellData;
-typedef std::map<uint32_t, IndexCellData> IndexSubCellData;
+typedef boost::int16_t ElevExtrema;
+typedef boost::uint32_t ElevRange;
+typedef boost::uint8_t ConsecPtAccumulator;
+typedef std::map<boost::uint32_t, ConsecPtAccumulator> IndexCellData;
+typedef std::map<boost::uint32_t, IndexCellData> IndexSubCellData;
class IndexCell
{
@@ -60,36 +62,36 @@
IndexCell();
private:
- uint32_t m_FileOffset;
- uint32_t m_NumPoints;
+ boost::uint32_t m_FileOffset;
+ boost::uint32_t m_NumPoints;
ElevExtrema m_MinZ, m_MaxZ;
IndexCellData m_PtRecords;
IndexSubCellData m_ZCellRecords;
IndexSubCellData m_SubCellRecords;
public:
- void SetFileOffset(uint32_t fos);
- void SetNumPoints(uint32_t nmp);
- uint32_t GetFileOffset(void) const;
- uint32_t GetNumRecords(void) const;
- uint32_t GetNumPoints(void) const;
- uint32_t GetNumSubCellRecords(void) const;
- uint32_t GetNumZCellRecords(void) const;
+ void SetFileOffset(boost::uint32_t fos);
+ void SetNumPoints(boost::uint32_t nmp);
+ boost::uint32_t GetFileOffset(void) const;
+ boost::uint32_t GetNumRecords(void) const;
+ boost::uint32_t GetNumPoints(void) const;
+ boost::uint32_t GetNumSubCellRecords(void) const;
+ boost::uint32_t GetNumZCellRecords(void) const;
ElevExtrema GetMinZ(void) const {return m_MinZ;};
ElevExtrema GetMaxZ(void) const {return m_MaxZ;};
- bool RoomToAdd(uint32_t a);
- void AddPointRecord(uint32_t a);
- void AddPointRecord(uint32_t a, uint8_t b);
- bool IncrementPointRecord(uint32_t a);
+ bool RoomToAdd(boost::uint32_t a);
+ void AddPointRecord(boost::uint32_t a);
+ void AddPointRecord(boost::uint32_t a, boost::uint8_t b);
+ bool IncrementPointRecord(boost::uint32_t a);
void RemoveMainRecords(void);
void RemoveAllRecords(void);
void UpdateZBounds(double TestZ);
ElevRange GetZRange(void) const;
- void AddZCell(uint32_t a, uint32_t b);
- bool IncrementZCell(uint32_t a, uint32_t b);
- void AddSubCell(uint32_t a, uint32_t b);
- bool IncrementSubCell(uint32_t a, uint32_t b);
- uint8_t GetPointRecordCount(uint32_t a);
+ void AddZCell(boost::uint32_t a, boost::uint32_t b);
+ bool IncrementZCell(boost::uint32_t a, boost::uint32_t b);
+ void AddSubCell(boost::uint32_t a, boost::uint32_t b);
+ bool IncrementSubCell(boost::uint32_t a, boost::uint32_t b);
+ boost::uint8_t GetPointRecordCount(boost::uint32_t a);
const IndexCellData::iterator GetFirstRecord(void);
const IndexCellData::iterator GetEnd(void);
const IndexSubCellData::iterator GetFirstSubCellRecord(void);
diff -r 3ef3932dd20a -r edde2eddfca5 include/liblas/detail/index/indexoutput.hpp
--- a/include/liblas/detail/index/indexoutput.hpp Wed Aug 18 15:15:24 2010 +0100
+++ b/include/liblas/detail/index/indexoutput.hpp Wed Aug 18 15:23:02 2010 +0100
@@ -58,14 +58,14 @@
liblas::Index *m_index;
liblas::VariableRecord m_indexVLRHeaderRecord, m_indexVLRCellRecord;
IndexVLRData m_indexVLRHeaderData, m_indexVLRCellPointData, m_indexVLRTempData;
- uint32_t m_VLRCommonDataSize, m_VLRDataSizeLocation, m_FirstCellLocation, m_LastCellLocation;
- uint32_t m_DataRecordSize, m_TempWritePos;
+ boost::uint32_t m_VLRCommonDataSize, m_VLRDataSizeLocation, m_FirstCellLocation, m_LastCellLocation;
+ boost::uint32_t m_DataRecordSize, m_TempWritePos;
bool m_FirstCellInVLR, m_SomeDataReadyToWrite;
protected:
bool InitiateOutput(void);
- bool OutputCell(liblas::detail::IndexCell *CellBlock, uint32_t CurCellX, uint32_t CurCellY);
- bool InitializeVLRData(uint32_t CurCellX, uint32_t CurCellY);
+ bool OutputCell(liblas::detail::IndexCell *CellBlock, boost::uint32_t CurCellX, boost::uint32_t CurCellY);
+ bool InitializeVLRData(boost::uint32_t CurCellX, boost::uint32_t CurCellY);
bool FinalizeOutput(void);
};
diff -r 3ef3932dd20a -r edde2eddfca5 include/liblas/lasindex.hpp
--- a/include/liblas/lasindex.hpp Wed Aug 18 15:15:24 2010 +0100
+++ b/include/liblas/lasindex.hpp Wed Aug 18 15:23:02 2010 +0100
@@ -42,13 +42,13 @@
#ifndef LIBLAS_LASINDEX_HPP_INCLUDED
#define LIBLAS_LASINDEX_HPP_INCLUDED
-
#include <liblas/lasreader.hpp>
#include <liblas/lasheader.hpp>
#include <liblas/lasbounds.hpp>
#include <liblas/lasvariablerecord.hpp>
#include <liblas/detail/index/indexcell.hpp>
-
+// boost
+#include <boost/cstdint.hpp>
// std
#include <stdexcept> // std::out_of_range
#include <cstdio> // file io
@@ -62,7 +62,7 @@
#define LIBLAS_INDEX_VERSIONMAJOR 1
#define LIBLAS_INDEX_VERSIONMINOR 0
-typedef std::vector<uint8_t> IndexVLRData;
+typedef std::vector<boost::uint8_t> IndexVLRData;
typedef std::vector<liblas::detail::IndexCell> IndexCellRow;
typedef std::vector<IndexCellRow> IndexCellDataBlock;
@@ -76,10 +76,10 @@
Index();
Index(liblas::Reader *reader, std::ostream *ofs = 0, const char *tmpfilenme = 0, const char *indexauthor = 0,
const char *indexcomment = 0, const char *indexdate = 0,
- double zbinht = 0.0, uint32_t maxmem = LIBLAS_INDEX_MAXMEMDEFAULT, int debugoutputlevel = 0, FILE *debugger = 0);
+ double zbinht = 0.0, boost::uint32_t maxmem = LIBLAS_INDEX_MAXMEMDEFAULT, int debugoutputlevel = 0, FILE *debugger = 0);
Index(std::istream *ifs, std::ostream *ofs = 0, const char *tmpfilenme = 0, const char *indexauthor = 0,
const char *indexcomment = 0, const char *indexdate = 0,
- double zbinht = 0.0, uint32_t maxmem = LIBLAS_INDEX_MAXMEMDEFAULT, int debugoutputlevel = 0, FILE *debugger = 0);
+ double zbinht = 0.0, boost::uint32_t maxmem = LIBLAS_INDEX_MAXMEMDEFAULT, int debugoutputlevel = 0, FILE *debugger = 0);
Index(IndexData const& ParamSrc);
~Index();
@@ -98,11 +98,11 @@
Bounds<double> m_bounds;
bool m_indexBuilt, m_tempFileStarted, m_readerCreated, m_readOnly, m_writestandaloneindex, m_forceNewIndex;
int m_debugOutputLevel;
- uint32_t m_pointRecordsCount, m_maxMemoryUsage, m_cellsX, m_cellsY, m_cellsZ, m_totalCells,
+ boost::uint32_t m_pointRecordsCount, m_maxMemoryUsage, m_cellsX, m_cellsY, m_cellsZ, m_totalCells,
m_tempFileWrittenBytes, m_DataVLR_ID;
- int32_t m_LowXCellCompletelyIn, m_HighXCellCompletelyIn, m_LowYCellCompletelyIn, m_HighYCellCompletelyIn,
+ boost::int32_t m_LowXCellCompletelyIn, m_HighXCellCompletelyIn, m_LowYCellCompletelyIn, m_HighYCellCompletelyIn,
m_LowZCellCompletelyIn, m_HighZCellCompletelyIn;
- int32_t m_LowXBorderCell, m_HighXBorderCell, m_LowYBorderCell, m_HighYBorderCell,
+ boost::int32_t m_LowXBorderCell, m_HighXBorderCell, m_LowYBorderCell, m_HighYBorderCell,
m_LowZBorderCell, m_HighZBorderCell;
double m_rangeX, m_rangeY, m_rangeZ, m_cellSizeZ, m_cellSizeX, m_cellSizeY;
double m_filterMinXCell, m_filterMaxXCell, m_filterMinYCell, m_filterMaxYCell, m_filterMinZCell, m_filterMaxZCell,
@@ -111,7 +111,7 @@
std::string m_indexAuthor;
std::string m_indexComment;
std::string m_indexDate;
- std::vector<uint32_t> m_filterResult;
+ std::vector<boost::uint32_t> m_filterResult;
std::ostream *m_ofs;
FILE *m_tempFile, *m_outputFile;
FILE *m_debugger;
@@ -122,20 +122,20 @@
bool BuildIndex(void);
bool LoadIndexVLR(VariableRecord const& vlr);
void SetCellFilterBounds(IndexData const& ParamSrc);
- bool FilterOneVLR(VariableRecord const& vlr, uint32_t& i, IndexData const& ParamSrc);
- bool VLRInteresting(int32_t MinCellX, int32_t MinCellY, int32_t MaxCellX, int32_t MaxCellY,
+ bool FilterOneVLR(VariableRecord const& vlr, boost::uint32_t& i, IndexData const& ParamSrc);
+ bool VLRInteresting(boost::int32_t MinCellX, boost::int32_t MinCellY, boost::int32_t MaxCellX, boost::int32_t MaxCellY,
IndexData const& ParamSrc);
- bool CellInteresting(int32_t x, int32_t y, IndexData const& ParamSrc);
- bool SubCellInteresting(int32_t SubCellID, int32_t XCellID, int32_t YCellID, IndexData const& ParamSrc);
- bool ZCellInteresting(int32_t ZCellID, IndexData const& ParamSrc);
- bool FilterOnePoint(int32_t x, int32_t y, int32_t z, int32_t PointID, int32_t LastPointID, bool &LastPtRead,
+ bool CellInteresting(boost::int32_t x, boost::int32_t y, IndexData const& ParamSrc);
+ bool SubCellInteresting(boost::int32_t SubCellID, boost::int32_t XCellID, boost::int32_t YCellID, IndexData const& ParamSrc);
+ bool ZCellInteresting(boost::int32_t ZCellID, IndexData const& ParamSrc);
+ bool FilterOnePoint(boost::int32_t x, boost::int32_t y, boost::int32_t z, boost::int32_t PointID, boost::int32_t LastPointID, bool &LastPtRead,
IndexData const& ParamSrc);
- bool IdentifyCell(Point const& CurPt, uint32_t& CurCellX, uint32_t& CurCellY) const;
- bool IdentifyCellZ(Point const& CurPt, uint32_t& CurCellZ) const;
- bool IdentifySubCell(Point const& CurPt, uint32_t x, uint32_t y, uint32_t& CurSubCell) const;
+ bool IdentifyCell(Point const& CurPt, boost::uint32_t& CurCellX, boost::uint32_t& CurCellY) const;
+ bool IdentifyCellZ(Point const& CurPt, boost::uint32_t& CurCellZ) const;
+ bool IdentifySubCell(Point const& CurPt, boost::uint32_t x, boost::uint32_t y, boost::uint32_t& CurSubCell) const;
bool PurgePointsToTempFile(IndexCellDataBlock& CellBlock);
bool LoadCellFromTempFile(liblas::detail::IndexCell *CellBlock,
- uint32_t CurCellX, uint32_t CurCellY);
+ boost::uint32_t CurCellX, boost::uint32_t CurCellY);
FILE *OpenTempFile(void);
void CloseTempFile(void);
bool SaveIndexInLASFile(void);
@@ -151,12 +151,12 @@
// debugging
bool OutputCellStats(IndexCellDataBlock& CellBlock) const;
- bool OutputCellGraph(std::vector<uint32_t> CellPopulation, uint32_t MaxPointsPerCell) const;
+ bool OutputCellGraph(std::vector<boost::uint32_t> CellPopulation, boost::uint32_t MaxPointsPerCell) const;
public:
bool IndexFailed(void) const {return (! m_indexBuilt);};
bool IndexReady(void) const {return (m_indexBuilt);};
- const std::vector<uint32_t>& Filter(IndexData const& ParamSrc);
+ const std::vector<boost::uint32_t>& Filter(IndexData const& ParamSrc);
double GetMinX(void) const {return m_bounds.min(0);};
double GetMaxX(void) const {return m_bounds.max(0);};
double GetMinY(void) const {return m_bounds.min(1);};
@@ -164,17 +164,17 @@
double GetMinZ(void) const {return m_bounds.min(2);};
double GetMaxZ(void) const {return m_bounds.max(2);};
Bounds<double> const& GetBounds(void) const {return m_bounds;};
- uint32_t GetPointRecordsCount(void) const {return m_pointRecordsCount;};
- uint32_t GetCellsX(void) const {return m_cellsX;};
- uint32_t GetCellsY(void) const {return m_cellsY;};
- uint32_t GetCellsZ(void) const {return m_cellsZ;};
- uint32_t GetDataVLR_ID(void) const {return m_DataVLR_ID;};
+ boost::uint32_t GetPointRecordsCount(void) const {return m_pointRecordsCount;};
+ boost::uint32_t GetCellsX(void) const {return m_cellsX;};
+ boost::uint32_t GetCellsY(void) const {return m_cellsY;};
+ boost::uint32_t GetCellsZ(void) const {return m_cellsZ;};
+ boost::uint32_t GetDataVLR_ID(void) const {return m_DataVLR_ID;};
double GetCellSizeZ(void) const {return m_cellSizeZ;};
FILE *GetDebugger(void) const {return m_debugger;};
bool GetReadOnly(void) const {return m_readOnly;};
bool GetStandaloneIndex(void) const {return m_writestandaloneindex;};
bool GetForceNewIndex(void) const {return m_forceNewIndex;};
- uint32_t GetMaxMemoryUsage(void) const {return m_maxMemoryUsage;};
+ boost::uint32_t GetMaxMemoryUsage(void) const {return m_maxMemoryUsage;};
Header *GetPointHeader(void) {return &m_pointheader;};
Header *GetIndexHeader(void) {return &m_idxheader;};
Reader *GetReader(void) const {return m_reader;};
@@ -184,7 +184,7 @@
const char *GetIndexAuthorStr(void) const;
const char *GetIndexCommentStr(void) const;
const char *GetIndexDateStr(void) const;
- void SetDataVLR_ID(uint32_t DataVLR_ID) {m_DataVLR_ID = DataVLR_ID;};
+ void SetDataVLR_ID(boost::uint32_t DataVLR_ID) {m_DataVLR_ID = DataVLR_ID;};
void SetIndexAuthorStr(const char *ias) {m_indexAuthor = ias;};
void SetIndexCommentStr(const char *ics) {m_indexComment = ics;};
void SetIndexDateStr(const char *ids) {m_indexDate = ids;};
@@ -197,10 +197,10 @@
void CalcRangeX(void) {m_rangeX = m_bounds.max(0) - m_bounds.min(0);};
void CalcRangeY(void) {m_rangeY = m_bounds.max(1) - m_bounds.min(1);};
void CalcRangeZ(void) {m_rangeZ = m_bounds.max(2) - m_bounds.min(2);};
- void SetPointRecordsCount(uint32_t prc) {m_pointRecordsCount = prc;};
- void SetCellsX(uint32_t cellsX) {m_cellsX = cellsX;};
- void SetCellsY(uint32_t cellsY) {m_cellsY = cellsY;};
- void SetCellsZ(uint32_t cellsZ) {m_cellsZ = cellsZ;};
+ void SetPointRecordsCount(boost::uint32_t prc) {m_pointRecordsCount = prc;};
+ void SetCellsX(boost::uint32_t cellsX) {m_cellsX = cellsX;};
+ void SetCellsY(boost::uint32_t cellsY) {m_cellsY = cellsY;};
+ void SetCellsZ(boost::uint32_t cellsZ) {m_cellsZ = cellsZ;};
};
class IndexData
@@ -212,7 +212,7 @@
IndexData(Index const& index);
bool SetInitialValues(std::istream *ifs = 0, Reader *reader = 0, std::ostream *ofs = 0, Reader *idxreader = 0, const char *tmpfilenme = 0, const char *indexauthor = 0,
const char *indexcomment = 0, const char *indexdate = 0, double zbinht = 0.0,
- uint32_t maxmem = LIBLAS_INDEX_MAXMEMDEFAULT, int debugoutputlevel = 0, bool readonly = 0, bool writestandaloneindex = 0,
+ boost::uint32_t maxmem = LIBLAS_INDEX_MAXMEMDEFAULT, int debugoutputlevel = 0, bool readonly = 0, bool writestandaloneindex = 0,
bool forcenewindex = 0, FILE *debugger = 0);
bool SetFilterValues(double LowFilterX, double HighFilterX, double LowFilterY, double HighFilterY, double LowFilterZ, double HighFilterZ);
bool SetFilterValues(Bounds<double> const& src);
@@ -238,7 +238,7 @@
const char *m_indexComment;
const char *m_indexDate;
double m_cellSizeZ;
- uint32_t m_maxMemoryUsage;
+ boost::uint32_t m_maxMemoryUsage;
int m_debugOutputLevel;
bool m_noFilterX, m_noFilterY, m_noFilterZ, m_readOnly, m_writestandaloneindex, m_forceNewIndex, m_indexValid;
FILE *m_debugger;
@@ -249,7 +249,7 @@
bool GetReadOnly(void) const {return m_readOnly;};
bool GetStandaloneIndex(void) const {return m_writestandaloneindex;};
bool GetForceNewIndex(void) const {return m_forceNewIndex;};
- uint32_t GetMaxMemoryUsage(void) const {return m_maxMemoryUsage;};
+ boost::uint32_t GetMaxMemoryUsage(void) const {return m_maxMemoryUsage;};
Reader *GetReader(void) const {return m_reader;};
int GetDebugOutputLevel(void) const {return m_debugOutputLevel;};
const char *GetTempFileName(void) const {return m_tempFileName;};
@@ -270,7 +270,7 @@
void SetIndexComment(const char *indexcomment) {m_indexComment = indexcomment;};
void SetIndexDate(const char *indexdate) {m_indexDate = indexdate;};
void SetCellSizeZ(double cellsizez) {m_cellSizeZ = cellsizez;};
- void SetMaxMem(uint32_t maxmem) {m_maxMemoryUsage = maxmem;};
+ void SetMaxMem(boost::uint32_t maxmem) {m_maxMemoryUsage = maxmem;};
void SetDebugOutputLevel(int debugoutputlevel) {m_debugOutputLevel = debugoutputlevel;};
void SetReadOnly(bool readonly) {m_readOnly = readonly;};
void SetStandaloneIndex(bool writestandaloneindex) {m_writestandaloneindex = writestandaloneindex;};
More information about the Liblas-commits
mailing list