libLAS API Reference  1.8.1
Public Types | Public Member Functions | List of all members
liblas::VariableRecord Class Reference

Representation of variable-length record data. More...

#include <variablerecord.hpp>

Collaboration diagram for liblas::VariableRecord:
Collaboration graph

Public Types

enum  { eUserIdSize = 16, eDescriptionSize = 32 }
 

Public Member Functions

 VariableRecord ()
 Default constructor. More...
 
 VariableRecord (VariableRecord const &other)
 Copy constructor. More...
 
 ~VariableRecord ()
 
VariableRecordoperator= (VariableRecord const &rhs)
 Assignment operator. More...
 
uint16_t GetReserved () const
 Get record signature (LAS 1.0) or reserved bytes (LAS 1.1). More...
 
void SetReserved (uint16_t data)
 
std::string GetUserId (bool pad) const
 Get identifier of user which created the record. More...
 
void SetUserId (std::string const &id)
 
uint16_t GetRecordId () const
 Get identifier of record. More...
 
void SetRecordId (uint16_t id)
 
uint16_t GetRecordLength () const
 Get record length after the header. More...
 
void SetRecordLength (uint16_t length)
 
std::string GetDescription (bool pad) const
 Get text description of data in the record. More...
 
void SetDescription (std::string const &text)
 
std::vector< uint8_t > const & GetData () const
 Get the data for this VLR. More...
 
void SetData (std::vector< uint8_t > const &data)
 
bool equal (VariableRecord const &other) const
 Compare actual header object against the other. More...
 
std::size_t GetTotalSize () const
 Get the total size of the VLR in bytes. More...
 
liblas::property_tree::ptree GetPTree () const
 

Detailed Description

Representation of variable-length record data.

Member Enumeration Documentation

anonymous enum
Enumerator
eUserIdSize 
eDescriptionSize 

Constructor & Destructor Documentation

liblas::VariableRecord::VariableRecord ( )

Default constructor.

Zero-initialization of record data.

Exceptions
Nothrow
liblas::VariableRecord::VariableRecord ( VariableRecord const &  other)

Copy constructor.

Construction of new record object as a copy of existing one.

Exceptions
Nothrow
liblas::VariableRecord::~VariableRecord ( )

Member Function Documentation

bool liblas::VariableRecord::equal ( VariableRecord const &  other) const

Compare actual header object against the other.

Exceptions
Nothrow

Referenced by liblas::operator==().

std::vector<uint8_t> const& liblas::VariableRecord::GetData ( ) const

Get the data for this VLR.

std::string liblas::VariableRecord::GetDescription ( bool  pad) const

Get text description of data in the record.

The character data is up to 32 bytes long.

Exceptions
Nothrow
liblas::property_tree::ptree liblas::VariableRecord::GetPTree ( ) const
uint16_t liblas::VariableRecord::GetRecordId ( ) const

Get identifier of record.

The record ID is closely related to the user ID.

Exceptions
Nothrow
uint16_t liblas::VariableRecord::GetRecordLength ( ) const

Get record length after the header.

Exceptions
Nothrow
uint16_t liblas::VariableRecord::GetReserved ( ) const

Get record signature (LAS 1.0) or reserved bytes (LAS 1.1).

Exceptions
Nothrow
std::size_t liblas::VariableRecord::GetTotalSize ( ) const

Get the total size of the VLR in bytes.

std::string liblas::VariableRecord::GetUserId ( bool  pad) const

Get identifier of user which created the record.

The character data is up to 16 bytes long.

Exceptions
Nothrow
VariableRecord& liblas::VariableRecord::operator= ( VariableRecord const &  rhs)

Assignment operator.

Construction and initializition of record object by assignment of another one.

Exceptions
Nothrow
void liblas::VariableRecord::SetData ( std::vector< uint8_t > const &  data)
void liblas::VariableRecord::SetDescription ( std::string const &  text)
void liblas::VariableRecord::SetRecordId ( uint16_t  id)
void liblas::VariableRecord::SetRecordLength ( uint16_t  length)
void liblas::VariableRecord::SetReserved ( uint16_t  data)
void liblas::VariableRecord::SetUserId ( std::string const &  id)

The documentation for this class was generated from the following file: