Blender V5.3
blender::recents Namespace Reference

Classes

class  Section

Functions

void init ()
void init_async ()
void ensure_init ()
bool save ()
static std::string recents_file_path (const bool create_folder=false)
static void recents_print_errors (const std::vector< toml::error_info > &errors)
static const toml::value & defaults_get ()
static toml::value & current_get ()
static void recents_init_impl ()
static const toml::value * recents_find_in (const toml::value &root, const std::string &section_name, const std::string &item_key)
static void recents_format_inline_tables (toml::value &value)
template std::string Section::get< std::string > (const std::string &item_key) const
template void Section::set< std::string > (const std::string &item_key, const std::string &value)
template std::vector< int > Section::get< std::vector< int > > (const std::string &item_key) const
template void Section::set< std::vector< int > > (const std::string &item_key, const std::vector< int > &value)
template std::vector< double > Section::get< std::vector< double > > (const std::string &item_key) const
template void Section::set< std::vector< double > > (const std::string &item_key, const std::vector< double > &value)
template std::vector< float > Section::get< std::vector< float > > (const std::string &item_key) const
template void Section::set< std::vector< float > > (const std::string &item_key, const std::vector< float > &value)
template std::vector< std::map< std::string, std::string > > Section::get< std::vector< std::map< std::string, std::string > > > (const std::string &item_key) const
template void Section::set< std::vector< std::map< std::string, std::string > > > (const std::string &item_key, const std::vector< std::map< std::string, std::string > > &value)

Variables

constexpr toml::spec version = toml::spec::v(1, 0, 0)
static Mutex recents_mutex
static Mutex recents_init_mutex
static std::atomic< bool > recents_ready {false}
static std::condition_variable_any recents_init_cv
static std::once_flag recents_init_once

Function Documentation

◆ current_get()

toml::value & blender::recents::current_get ( )
static

Definition at line 78 of file recents.cc.

Referenced by init().

◆ defaults_get()

const toml::value & blender::recents::defaults_get ( )
static

Definition at line 64 of file recents.cc.

References defaults_get().

Referenced by defaults_get().

◆ ensure_init()

void blender::recents::ensure_init ( )

Definition at line 129 of file recents.cc.

References lock, recents_init_mutex, and recents_ready.

Referenced by save(), and blender::bke::tests::RecentsTest::SetUp().

◆ init()

void blender::recents::init ( )

Definition at line 119 of file recents.cc.

References current_get(), lock, recents_mutex, and version.

Referenced by blender::bke::tests::TEST_F().

◆ init_async()

void blender::recents::init_async ( )

Definition at line 124 of file recents.cc.

References recents_print_errors().

Referenced by blender::WM_init().

◆ recents_file_path()

std::string blender::recents::recents_file_path ( const bool create_folder = false)
static

◆ recents_find_in()

const toml::value * blender::recents::recents_find_in ( const toml::value & root,
const std::string & section_name,
const std::string & item_key )
static

Definition at line 182 of file recents.cc.

References blender::G.

Referenced by recents_format_inline_tables().

◆ recents_format_inline_tables()

void blender::recents::recents_format_inline_tables ( toml::value & value)
static

Write arrays of tables as one inline table per line, instead of [[section.key]] blocks: key = [\n { a = 1, b = 2 },\n].

Definition at line 267 of file recents.cc.

References recents_find_in(), and blender::v.

Referenced by blender::recents::Section::set().

◆ recents_init_impl()

void blender::recents::recents_init_impl ( )
static

Definition at line 84 of file recents.cc.

References recents_print_errors(), and version.

Referenced by save().

◆ recents_print_errors()

void blender::recents::recents_print_errors ( const std::vector< toml::error_info > & errors)
static

Definition at line 56 of file recents.cc.

References recents_print_errors().

Referenced by init_async(), recents_init_impl(), and recents_print_errors().

◆ save()

◆ Section::get< std::string >()

template std::string blender::recents::Section::get< std::string > ( const std::string & item_key) const

◆ Section::get< std::vector< double > >()

template std::vector< double > blender::recents::Section::get< std::vector< double > > ( const std::string & item_key) const

◆ Section::get< std::vector< float > >()

template std::vector< float > blender::recents::Section::get< std::vector< float > > ( const std::string & item_key) const

◆ Section::get< std::vector< int > >()

template std::vector< int > blender::recents::Section::get< std::vector< int > > ( const std::string & item_key) const

◆ Section::get< std::vector< std::map< std::string, std::string > > >()

template std::vector< std::map< std::string, std::string > > blender::recents::Section::get< std::vector< std::map< std::string, std::string > > > ( const std::string & item_key) const

◆ Section::set< std::string >()

template void blender::recents::Section::set< std::string > ( const std::string & item_key,
const std::string & value )

◆ Section::set< std::vector< double > >()

template void blender::recents::Section::set< std::vector< double > > ( const std::string & item_key,
const std::vector< double > & value )

◆ Section::set< std::vector< float > >()

template void blender::recents::Section::set< std::vector< float > > ( const std::string & item_key,
const std::vector< float > & value )

◆ Section::set< std::vector< int > >()

template void blender::recents::Section::set< std::vector< int > > ( const std::string & item_key,
const std::vector< int > & value )

◆ Section::set< std::vector< std::map< std::string, std::string > > >()

template void blender::recents::Section::set< std::vector< std::map< std::string, std::string > > > ( const std::string & item_key,
const std::vector< std::map< std::string, std::string > > & value )

Variable Documentation

◆ recents_init_cv

std::condition_variable_any blender::recents::recents_init_cv
static

Definition at line 39 of file recents.cc.

Referenced by save().

◆ recents_init_mutex

Mutex blender::recents::recents_init_mutex
static

Definition at line 37 of file recents.cc.

Referenced by ensure_init(), and save().

◆ recents_init_once

std::once_flag blender::recents::recents_init_once
static

Definition at line 40 of file recents.cc.

Referenced by save().

◆ recents_mutex

Mutex blender::recents::recents_mutex
static

Definition at line 36 of file recents.cc.

Referenced by init().

◆ recents_ready

std::atomic<bool> blender::recents::recents_ready {false}
static

Definition at line 38 of file recents.cc.

Referenced by ensure_init(), and save().

◆ version

toml::spec blender::recents::version = toml::spec::v(1, 0, 0)
constexpr

Definition at line 33 of file recents.cc.

Referenced by init(), and recents_init_impl().