liblas::guid Class Reference
Definition of Globally Unique Identifier type. More...
#include <guid.hpp>
Public Member Functions | |
| guid () | |
| Default constructor initializes GUID as null. | |
| guid (char const *const str) | |
| Initializes from textual representation of valid GUID. | |
| template<typename ch, typename char_traits, typename alloc> | |
| guid (std::basic_string< ch, char_traits, alloc > const &str) | |
| Initializes from textual representation of valid GUID. | |
| guid (liblas::uint32_t const &d1, liblas::uint16_t const &d2, liblas::uint16_t const &d3, liblas::uint8_t const(&d4)[8]) | |
| Initializes from 4-fields structure. | |
| guid (guid const &rhs) | |
| Copy constructor. | |
| ~guid () | |
| Destructor. | |
| guid & | operator= (guid const &rhs) |
| Assignment operator. | |
| bool | operator== (guid const &rhs) const |
| Equality operator. | |
| bool | operator!= (guid const &rhs) const |
| Inequality operator. | |
| bool | operator< (guid const &rhs) const |
| Less-than operator. | |
| bool | operator> (guid const &rhs) const |
| More-than operator. | |
| bool | operator<= (guid const &rhs) const |
| Less-than-or-equal-to operator. | |
| bool | operator>= (guid const &rhs) const |
| More-than-or-equal-to operator. | |
| bool | is_null () const |
| Test if the GUID object is null GUID or not. | |
| std::string | to_string () const |
| Generate textual representation of the GUID number. | |
| template<typename ch, typename char_traits, typename alloc> | |
| std::basic_string< ch, char_traits, alloc > | to_basic_string () const |
| Generic generator of textual representation of the GUID number. | |
| size_t | byte_count () const |
| Size of the GUID number in bytes. | |
| template<typename ByteOutputIterator> | |
| void | output_bytes (ByteOutputIterator out) const |
| Send bytes of GUID data to sequenec of bytes using given output iterator. | |
| void | output_data (liblas::uint32_t &d1, liblas::uint16_t &d2, liblas::uint16_t &d3, liblas::uint8_t(&d4)[8]) const |
| Separate bytes of GUID data to distinct buffers. | |
Static Public Member Functions | |
| static guid const & | null () |
| Null GUID number generator. | |
| static guid | create () |
| Random GUID number generator. | |
| static guid | create (guid const &namespace_guid, char const *name, int name_length) |
| Create GUID number based on calculation of SHA1 has for given name. | |
| static bool | get_showbraces (std::ios_base &iosbase) |
| Return flag indicating if bracket text form of GUID on output is set. | |
| static void | set_showbraces (std::ios_base &iosbase, bool showbraces) |
| Request to bracket text form of GUID on output. | |
| static std::ios_base & | showbraces (std::ios_base &iosbase) |
| Request to bracket text form of GUID on output. | |
| static std::ios_base & | noshowbraces (std::ios_base &iosbase) |
Friends | |
| std::ostream & | operator<< (std::ostream &os, guid const &g) |
| Overloaded output stream operator for guid type. | |
| std::istream & | operator>> (std::istream &is, guid &g) |
| Overloaded input stream operator for guid type. | |
Detailed Description
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. 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.
- See also:
- About GUID in Wikipedia http://en.wikipedia.org/wiki/Globally_Unique_Identifier
Definition at line 88 of file guid.hpp.
Constructor & Destructor Documentation
| liblas::guid::guid | ( | ) | [inline] |
Default constructor initializes GUID as null.
- Exceptions:
-
nothrow
- Postcondition:
- guid::is_null() == true.
| liblas::guid::guid | ( | char const *const | str | ) | [inline, explicit] |
Initializes from textual representation of valid GUID.
- Parameters:
-
str - non-null pointer to string with GUID text.
- Exceptions:
-
std::invalid_argument if construction failed.
- Postcondition:
- guid::is_null() == false.
| liblas::guid::guid | ( | std::basic_string< ch, char_traits, alloc > const & | str | ) | [inline, explicit] |
Initializes from textual representation of valid GUID.
- Parameters:
-
str - string with GUID text.
- Exceptions:
-
std::invalid_argument if construction failed.
- Postcondition:
- guid::is_null() == false.
| liblas::guid::guid | ( | liblas::uint32_t const & | d1, | |
| liblas::uint16_t const & | d2, | |||
| liblas::uint16_t const & | d3, | |||
| liblas::uint8_t const & | d4[8] | |||
| ) | [inline] |
Initializes from 4-fields structure.
- Parameters:
-
d1 - field of first 32 bits of GUID number. d2 - field of subsequent 16 bits of GUID number. d3 - third field of 16 bits of GUID number. d4 - last 64 bits of GUID number.
- Exceptions:
-
std::invalid_argument if construction failed.
- Postcondition:
- guid::is_null() == false.
| liblas::guid::guid | ( | guid const & | rhs | ) | [inline] |
| liblas::guid::~guid | ( | ) | [inline] |
Member Function Documentation
| bool liblas::guid::operator== | ( | guid const & | rhs | ) | const [inline] |
| bool liblas::guid::operator!= | ( | guid const & | rhs | ) | const [inline] |
| bool liblas::guid::operator< | ( | guid const & | rhs | ) | const [inline] |
| bool liblas::guid::operator> | ( | guid const & | rhs | ) | const [inline] |
| bool liblas::guid::operator<= | ( | guid const & | rhs | ) | const [inline] |
| bool liblas::guid::operator>= | ( | guid const & | rhs | ) | const [inline] |
| bool liblas::guid::is_null | ( | ) | const [inline] |
| std::string liblas::guid::to_string | ( | ) | const [inline] |
Generate textual representation of the GUID number.
Specialization for std::string type.
- Returns:
- string with textual representation of GUID
- Exceptions:
-
std::runtime_error - thrown on GUID to string conversion failure
- Postcondition:
- guid::to_string().empty() == false.
| std::basic_string<ch, char_traits, alloc> liblas::guid::to_basic_string | ( | ) | const [inline] |
Generic generator of textual representation of the GUID number.
- Exceptions:
-
std::runtime_error - thrown on GUID to string conversion failure
- Postcondition:
- guid::to_basic_string().empty() == false.
| size_t liblas::guid::byte_count | ( | ) | const [inline] |
| void liblas::guid::output_bytes | ( | ByteOutputIterator | out | ) | const [inline] |
| void liblas::guid::output_data | ( | liblas::uint32_t & | d1, | |
| liblas::uint16_t & | d2, | |||
| liblas::uint16_t & | d3, | |||
| liblas::uint8_t & | d4[8] | |||
| ) | const [inline] |
Separate bytes of GUID data to distinct buffers.
- Parameters:
-
d1 - buffer for first 32 bits of GUID number. d2 - buffer for 16 bits of second chunk of GUID number. d3 - buffer for 16 bits of third chunk of GUID number. d4 - buffer for last 64 bits of GUID number.
- Exceptions:
-
nothrow
| static guid const& liblas::guid::null | ( | ) | [inline, static] |
| static guid liblas::guid::create | ( | ) | [inline, static] |
| static bool liblas::guid::get_showbraces | ( | std::ios_base & | iosbase | ) | [inline, static] |
Return flag indicating if bracket text form of GUID on output is set.
- Exceptions:
-
nothrow
Definition at line 324 of file guid.hpp.
Referenced by liblas::operator<<().
Here is the caller graph for this function:

| static void liblas::guid::set_showbraces | ( | std::ios_base & | iosbase, | |
| bool | showbraces | |||
| ) | [inline, static] |
Request to bracket text form of GUID on output.
- Exceptions:
-
nothrow
Definition at line 331 of file guid.hpp.
Referenced by noshowbraces(), and showbraces().
Here is the caller graph for this function:

| static std::ios_base& liblas::guid::showbraces | ( | std::ios_base & | iosbase | ) | [inline, static] |
Request to bracket text form of GUID on output.
- Exceptions:
-
nothrow
Definition at line 338 of file guid.hpp.
References set_showbraces().
Here is the call graph for this function:

| static std::ios_base& liblas::guid::noshowbraces | ( | std::ios_base & | iosbase | ) | [inline, static] |
Definition at line 343 of file guid.hpp.
References set_showbraces().
Here is the call graph for this function:

Friends And Related Function Documentation
| std::ostream& operator<< | ( | std::ostream & | os, | |
| guid const & | g | |||
| ) | [friend] |
| std::istream& operator>> | ( | std::istream & | is, | |
| guid & | g | |||
| ) | [friend] |
The documentation for this class was generated from the following file:


