RDB 2: riegl::rdb::Context Class Reference

| RDB 2

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
riegl::rdb::Context Class Reference

Library context. More...

`#include <context.hpp>`

## Public Member Functions
| Context (const std::string &logLevel="", const std::string &logPath="")
| Constructor. More...
| ~Context ()
| Destructor. More...
std::string | libraryName () const
| Returns library name. More...
std::string | libraryFilename () const
| Returns the name of the file the library was loaded from. More...
std::string | libraryVersion () const
| Returns library version string. More...
std::string | libraryLicense () const
| Returns library license text. More...
std::string | databaseFileTypeTitle () const
| Database file type title. More...
std::string | databaseFileTypeSuffix () const
| Database file type suffix. More...
bool | databaseFileTypeCheck (const std::string &location) const
| Check file type. More...

## Friends
class | Logger
struct | PointcloudData
class | pointcloud::CreateSettings
class | pointcloud::OpenSettings
class | pointcloud::PointAttributes
class | pointcloud::PointAttribute
class | pointcloud::QueryInsert
class | pointcloud::QueryUpdate
class | pointcloud::QueryRemove
class | pointcloud::QueryInvert
class | pointcloud::QueryFill
class | pointcloud::Transaction
class | pointcloud::Management
class | pointcloud::Changelog

## Detailed Description

Library context.

Examples:
  rdb-example-01-create-database.cpp, rdb-example-02-insert-points.cpp, rdb-example-03-select-points.cpp, rdb-example-04-update-points.cpp, rdb-example-05-remove-points.cpp, rdb-example-06-database-stat.cpp, rdb-example-07-fill-points.cpp, rdb-example-08-invert-points.cpp, rdb-example-09-cleanup-database.cpp, and rdb-example-10-attribute-groups.cpp.

Definition at line 75 of file context.hpp.

## Constructor & Destructor Documentation

riegl::rdb::Context::Context | ( | const std::string & | logLevel = `""`,
|  | const std::string & | logPath = `""`
| ) |  |
| explicit

Constructor.

Use logPath to specify the target folder for RDB log files. If not defined (empty string), then system's folder for temporary files is used (i.e. Windows: "C:\Users\*\AppData\Local\Temp", Linux: "/tmp"). If the given path does not exist, it is not created and logging is disabled.

Use logLevel to specify a filter for log messages. Allowed values are

Level | Description
--- | ---
TRACE | many debug messages
DEBUG | some debug messages
TEXT | general messages = default
INFO | hints, information
WARNING | warning messages
ERROR | error messages
FATAL | fatal errors
NONE | no log output at all

Whereas "TRACE" is the highest log level and means to output everything and "NONE" is the lowest level and means to output nothing. Example: if logLevel is set to "TEXT", debug messages are not output but info, warnings, errors and fatal errors are.

Both logPath and logLevel may also be given as environment variables "RDB_LOG_PATH" and "RDB_LOG_LEVEL". Please note that those variables are used only if empty strings are passed to the constructor.

Note
  When the context is deleted, the log file is also deleted but only if it does not contain WARNING, ERROR or FATAL messages. To keep the context from deleting the log file, append "!" to the logLevel, e.g. "TEXT!".

Parameters

  [in] | logLevel | log level (filter), see description
  [in] | logPath | target folder for RDB log files

riegl::rdb::Context::~Context | ( |  | ) |

Destructor.

## Member Function Documentation

bool riegl::rdb::Context::databaseFileTypeCheck | ( | const std::string & | location | ) | const

Check file type.

Returns
  true if the given location is a RDB 2 database file.

Examples:
  rdb-example-06-database-stat.cpp.

std::string riegl::rdb::Context::databaseFileTypeSuffix | ( |  | ) | const

Database file type suffix.

Returns
  "rdbx"

std::string riegl::rdb::Context::databaseFileTypeTitle | ( |  | ) | const

Database file type title.

Returns
  "RDB 2 Database File"

std::string riegl::rdb::Context::libraryFilename | ( |  | ) | const

Returns the name of the file the library was loaded from.

Since
  2.3.0

std::string riegl::rdb::Context::libraryLicense | ( |  | ) | const

Returns library license text.

std::string riegl::rdb::Context::libraryName | ( |  | ) | const

Returns library name.

std::string riegl::rdb::Context::libraryVersion | ( |  | ) | const

Returns library version string.

## Friends And Related Function Documentation

friend class Logger
| friend

Definition at line 169 of file context.hpp.

friend class pointcloud::Changelog
| friend

Definition at line 182 of file context.hpp.

friend class pointcloud::CreateSettings
| friend

Definition at line 171 of file context.hpp.

friend class pointcloud::Management
| friend

Definition at line 181 of file context.hpp.

friend class pointcloud::OpenSettings
| friend

Definition at line 172 of file context.hpp.

friend class pointcloud::PointAttribute
| friend

Definition at line 174 of file context.hpp.

friend class pointcloud::PointAttributes
| friend

Definition at line 173 of file context.hpp.

friend class pointcloud::QueryFill
| friend

Definition at line 179 of file context.hpp.

friend class pointcloud::QueryInsert
| friend

Definition at line 175 of file context.hpp.

friend class pointcloud::QueryInvert
| friend

Definition at line 178 of file context.hpp.

friend class pointcloud::QueryRemove
| friend

Definition at line 177 of file context.hpp.

friend class pointcloud::QueryUpdate
| friend

Definition at line 176 of file context.hpp.

friend class pointcloud::Transaction
| friend

Definition at line 180 of file context.hpp.

friend struct PointcloudData
| friend

Definition at line 170 of file context.hpp.

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

- riegl/rdb/context.hpp