Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Namespaces | Macros | Typedefs | Enumerations | Variables
dat.hpp File Reference
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <exception>
Include dependency graph for dat.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  Exception
class  Error< T >

Namespaces

namespace  grn
namespace  grn::dat

Macros

#define GRN_DAT_API
#define GRN_DAT_INT_TO_STR(value)   #value
#define GRN_DAT_LINE_TO_STR(line)   GRN_DAT_INT_TO_STR(line)
#define GRN_DAT_LINE_STR   GRN_DAT_LINE_TO_STR(__LINE__)
#define GRN_DAT_THROW(code, msg)
#define GRN_DAT_THROW_IF(code, cond)   (void)((!(cond)) || (GRN_DAT_THROW(code, #cond), 0))
#define GRN_DAT_DEBUG_THROW_IF(cond)
#define GRN_DAT_DEBUG_LOG(var)

Typedefs

typedef ::uint8_t UInt8
typedef ::uint16_t UInt16
typedef ::uint32_t UInt32
typedef ::uint64_t UInt64
typedef Error< PARAM_ERROR > ParamError
typedef Error< IO_ERROR > IOError
typedef Error< FORMAT_ERROR > FormatError
typedef Error< MEMORY_ERROR > MemoryError
typedef Error< SIZE_ERRORSizeError
typedef Error< UNEXPECTED_ERROR > UnexpectedError
typedef Error< STATUS_ERROR > StatusError

Enumerations

enum  ErrorCode {
  PARAM_ERROR = -1, IO_ERROR = -2, FORMAT_ERROR = -3, MEMORY_ERROR = -4,
  SIZE_ERROR = -5, UNEXPECTED_ERROR = -6, STATUS_ERROR = -7
}

Variables

const UInt8 MAX_UINT8 = static_cast<UInt8>(0xFFU)
const UInt16 MAX_UINT16 = static_cast<UInt16>(0xFFFFU)
const UInt32 MAX_UINT32 = static_cast<UInt32>(0xFFFFFFFFU)
const UInt64 MAX_UINT64 = static_cast<UInt64>(0xFFFFFFFFFFFFFFFFULL)
const UInt16 TERMINAL_LABEL = 0x100
const UInt16 MIN_LABEL = '\0'
const UInt16 MAX_LABEL = TERMINAL_LABEL
const UInt32 INVALID_LABEL = 0x1FF
const UInt32 LABEL_MASK = 0x1FF
const UInt32 ROOT_NODE_ID = 0
const UInt32 MAX_NODE_ID = 0x7FFFFFFF
const UInt32 MAX_NUM_NODES = MAX_NODE_ID + 1
const UInt32 INVALID_NODE_ID = MAX_NODE_ID + 1
const UInt32 MAX_OFFSET = MAX_NODE_ID
const UInt32 INVALID_OFFSET = 0
const UInt32 BLOCK_SIZE = 0x200
const UInt32 BLOCK_MASK = 0x1FF
const UInt32 MAX_BLOCK_ID = MAX_NODE_ID / BLOCK_SIZE
const UInt32 MAX_NUM_BLOCKS = MAX_BLOCK_ID + 1
const UInt32 MAX_FAILURE_COUNT = 4
const UInt32 MAX_BLOCK_COUNT = 16
const UInt32 MAX_BLOCK_LEVEL = 5
const UInt32 INVALID_LEADER = 0x7FFFFFFF
const UInt32 MIN_KEY_ID = 1
const UInt32 MAX_KEY_ID = MAX_NODE_ID
const UInt32 INVALID_KEY_ID = 0
const UInt32 MAX_KEY_LENGTH = (1U << 12) - 1
const UInt32 MAX_NUM_KEYS = (1U << 28) - 1
const UInt64 MIN_FILE_SIZE = 1 << 16
const UInt64 DEFAULT_FILE_SIZE = 1 << 20
const UInt64 MAX_FILE_SIZE = (UInt64)1 << 40
const double DEFAULT_NUM_NODES_PER_KEY = 4.0
const double DEFAULT_AVERAGE_KEY_LENGTH = 16.0
const UInt32 MAX_KEY_BUF_SIZE = 0x80000000U
const UInt32 MAX_TOTAL_KEY_LENGTH = 0xFFFFFFFFU
const UInt32 ID_RANGE_CURSOR = 0x00001
const UInt32 KEY_RANGE_CURSOR = 0x00002
const UInt32 PREFIX_CURSOR = 0x00004
const UInt32 PREDICTIVE_CURSOR = 0x00008
const UInt32 CURSOR_TYPE_MASK = 0x000FF
const UInt32 ASCENDING_CURSOR = 0x00100
const UInt32 DESCENDING_CURSOR = 0x00200
const UInt32 CURSOR_ORDER_MASK = 0x00F00
const UInt32 EXCEPT_LOWER_BOUND = 0x01000
const UInt32 EXCEPT_UPPER_BOUND = 0x02000
const UInt32 EXCEPT_EXACT_MATCH = 0x04000
const UInt32 CURSOR_OPTIONS_MASK = 0xFF000
const UInt32 REMOVING_FLAG = 1U << 0
const UInt32 INSERTING_FLAG = 1U << 1
const UInt32 UPDATING_FLAG = 1U << 2
const UInt32 CHANGING_MASK = REMOVING_FLAG | INSERTING_FLAG | UPDATING_FLAG
const UInt32 MKQ_SORT_THRESHOLD = 10

Macro Definition Documentation

#define GRN_DAT_API

Definition at line 41 of file dat.hpp.

#define GRN_DAT_DEBUG_LOG (   var)

Definition at line 249 of file dat.hpp.

#define GRN_DAT_DEBUG_THROW_IF (   cond)

Definition at line 248 of file dat.hpp.

#define GRN_DAT_INT_TO_STR (   value)    #value

Definition at line 231 of file dat.hpp.

#define GRN_DAT_LINE_STR   GRN_DAT_LINE_TO_STR(__LINE__)

Definition at line 233 of file dat.hpp.

#define GRN_DAT_LINE_TO_STR (   line)    GRN_DAT_INT_TO_STR(line)

Definition at line 232 of file dat.hpp.

#define GRN_DAT_THROW (   code,
  msg 
)
Value:
(throw grn::dat::Error<code>(__FILE__, __LINE__,\
__FILE__ ":" GRN_DAT_LINE_STR ": " #code ": " msg))

Definition at line 235 of file dat.hpp.

#define GRN_DAT_THROW_IF (   code,
  cond 
)    (void)((!(cond)) || (GRN_DAT_THROW(code, #cond), 0))

Definition at line 238 of file dat.hpp.