xapian-core  1.4.27
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Uuid Class Reference

#include <uuids.h>

Public Member Functions

 Uuid ()
 
void generate ()
 
void parse (const char *in)
 
void parse (const std::string &in)
 
void clear ()
 
bool is_null () const
 
std::string to_string () const
 
const char * data () const
 
void assign (const char *p)
 

Static Public Attributes

static constexpr unsigned BINARY_SIZE = 16
 The size of a UUID in bytes. More...
 
static constexpr unsigned STRING_SIZE = 36
 The size of a UUID string in bytes (not including trailing '\0'). More...
 

Private Attributes

unsigned char uuid_data [BINARY_SIZE]
 The UUID data. More...
 

Detailed Description

Definition at line 28 of file uuids.h.

Constructor & Destructor Documentation

◆ Uuid()

Uuid::Uuid ( )
inline

Definition at line 36 of file uuids.h.

References generate(), and parse().

Member Function Documentation

◆ assign()

void Uuid::assign ( const char *  p)
inline

Definition at line 64 of file uuids.h.

References uuid_data.

Referenced by GlassVersion::read().

◆ clear()

void Uuid::clear ( )
inline

Definition at line 45 of file uuids.h.

References uuid_data.

Referenced by test_uuid1().

◆ data()

const char* Uuid::data ( ) const
inline

Definition at line 60 of file uuids.h.

References uuid_data.

Referenced by ChertVersion::get_uuid(), GlassVersion::get_uuid(), test_uuid1(), and GlassVersion::write().

◆ generate()

void Uuid::generate ( )

Definition at line 63 of file uuids.cc.

References close(), Xapian::InMemory::open(), and rare.

Referenced by GlassVersion::create(), test_uuid1(), and Uuid().

◆ is_null()

bool Uuid::is_null ( ) const
inline

Definition at line 50 of file uuids.h.

References to_string(), and uuid_data.

Referenced by test_uuid1().

◆ parse() [1/2]

void Uuid::parse ( const char *  in)

Definition at line 111 of file uuids.cc.

References hex_decode(), and UUID_GAP_MASK.

Referenced by test_uuid1(), and Uuid().

◆ parse() [2/2]

void Uuid::parse ( const std::string &  in)
inline

Definition at line 42 of file uuids.h.

References parse().

Referenced by parse().

◆ to_string()

string Uuid::to_string ( ) const

Member Data Documentation

◆ BINARY_SIZE

constexpr unsigned Uuid::BINARY_SIZE = 16
static

The size of a UUID in bytes.

Definition at line 31 of file uuids.h.

Referenced by GlassVersion::read(), test_uuid1(), and GlassVersion::write().

◆ STRING_SIZE

constexpr unsigned Uuid::STRING_SIZE = 36
static

The size of a UUID string in bytes (not including trailing '\0').

Definition at line 34 of file uuids.h.

◆ uuid_data

unsigned char Uuid::uuid_data[BINARY_SIZE]
private

The UUID data.

Definition at line 68 of file uuids.h.

Referenced by assign(), clear(), data(), and is_null().


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