Blender V4.3
uuid.cc File Reference
#include "BLI_assert.h"
#include "BLI_string.h"
#include "BLI_uuid.h"
#include <cstdio>
#include <cstring>
#include <ctime>
#include <random>
#include <sstream>
#include <string>
#include <tuple>

Go to the source code of this file.

Namespaces

namespace  blender
 

Functions

bUUID BLI_uuid_generate_random ()
 
bUUID BLI_uuid_nil ()
 
bool BLI_uuid_is_nil (bUUID uuid)
 
bool BLI_uuid_equal (const bUUID uuid1, const bUUID uuid2)
 
void BLI_uuid_format (char *buffer, const bUUID uuid)
 
bool BLI_uuid_parse_string (bUUID *uuid, const char *buffer)
 
std::ostream & operator<< (std::ostream &stream, bUUID uuid)
 
bool blender::operator== (const bUUID uuid1, const bUUID uuid2)
 
bool blender::operator!= (const bUUID uuid1, const bUUID uuid2)
 
bool blender::operator< (const bUUID uuid1, const bUUID uuid2)
 

Function Documentation

◆ BLI_uuid_equal()

bool BLI_uuid_equal ( bUUID uuid1,
bUUID uuid2 )

Compare two UUIDs, return true only if they are equal.

Definition at line 84 of file uuid.cc.

Referenced by BLI_uuid_is_nil(), blender::ed::asset_browser::file_set_asset_catalog_filter_settings(), blender::operator==(), and blender::bke::tests::TEST().

◆ BLI_uuid_format()

void BLI_uuid_format ( char * buffer,
bUUID uuid )

Format UUID as string. The buffer must be at least 37 bytes (36 bytes for the UUID + terminating 0). Use UUID_STRING_SIZE from DNA_uuid_types.h if you want to use a constant for this.

Definition at line 89 of file uuid.cc.

References BLI_assert, BLI_snprintf(), bUUID::clock_seq_hi_and_reserved, bUUID::clock_seq_low, bUUID::node, bUUID::time_hi_and_version, bUUID::time_low, bUUID::time_mid, UNUSED_VARS_NDEBUG, and UUID_STRING_SIZE.

Referenced by operator<<(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().

◆ BLI_uuid_generate_random()

bUUID BLI_uuid_generate_random ( void )

◆ BLI_uuid_is_nil()

◆ BLI_uuid_nil()

bUUID BLI_uuid_nil ( void )

◆ BLI_uuid_parse_string()

bool BLI_uuid_parse_string ( bUUID * uuid,
const char * buffer )

Parse a string as UUID. The string MUST be in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, as produced by BLI_uuid_format().

Return true if the string could be parsed, and false otherwise. In the latter case, the UUID may have been partially updated.

Definition at line 112 of file uuid.cc.

References bUUID::clock_seq_hi_and_reserved, bUUID::clock_seq_low, bUUID::node, bUUID::time_hi_and_version, bUUID::time_low, and bUUID::time_mid.

Referenced by blender::ed::asset::asset_catalog_delete_exec(), blender::asset_system::AssetCatalogDefinitionFile::parse_catalog_line(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().

◆ operator<<()

std::ostream & operator<< ( std::ostream & stream,
bUUID uuid )

Definition at line 131 of file uuid.cc.

References BLI_uuid_format().