Blender V5.0
id_map< K, T, Flags > Class Template Reference

#include <id_map.h>

Public Member Functions

 id_map (Scene *scene_)
 ~id_map ()
Tfind (const BL::ID &id)
Tfind (const K &key)
void set_recalc (const BL::ID &id)
void set_recalc (void *id_ptr)
bool check_recalc (const BL::ID &id)
bool has_recalc ()
void pre_sync ()
void add (const K &key, T *data)
bool update (T *data, const BL::ID &id)
bool update (T *data, const BL::ID &id, const BL::ID &parent)
bool add_or_update (T **r_data, const BL::ID &id)
bool add_or_update (T **r_data, const BL::ID &id, const K &key)
bool add_or_update (T **r_data, const BL::ID &id, const BL::ID &parent, const K &key)
bool is_used (const K &key)
void used (T *data)
void set_default (T *data)
void post_sync (bool do_delete=true)
const map< K, T * > & key_to_scene_data ()
bool test_flag (T *data, Flags val)
void set_flag (T *data, Flags val)
void clear_flag (T *data, Flags val)

Protected Attributes

map< K, T * > b_map
set< T * > used_set
map< T *, uintflags
set< void * > b_recalc
Scenescene

Detailed Description

template<typename K, typename T, typename Flags = uint>
class id_map< K, T, Flags >

Definition at line 24 of file id_map.h.

Constructor & Destructor Documentation

◆ id_map()

template<typename K, typename T, typename Flags = uint>
id_map< K, T, Flags >::id_map ( Scene * scene_)
inline

Definition at line 26 of file id_map.h.

References scene.

◆ ~id_map()

template<typename K, typename T, typename Flags = uint>
id_map< K, T, Flags >::~id_map ( )
inline

Definition at line 28 of file id_map.h.

References b_map, and scene.

Member Function Documentation

◆ add()

template<typename K, typename T, typename Flags = uint>
void id_map< K, T, Flags >::add ( const K & key,
T * data )
inline

Definition at line 81 of file id_map.h.

References assert, b_map, data, find(), K, T, and used().

Referenced by add_or_update().

◆ add_or_update() [1/3]

template<typename K, typename T, typename Flags = uint>
bool id_map< K, T, Flags >::add_or_update ( T ** r_data,
const BL::ID & id )
inline

Definition at line 104 of file id_map.h.

References add_or_update(), ptr, and T.

Referenced by add_or_update(), and add_or_update().

◆ add_or_update() [2/3]

template<typename K, typename T, typename Flags = uint>
bool id_map< K, T, Flags >::add_or_update ( T ** r_data,
const BL::ID & id,
const BL::ID & parent,
const K & key )
inline

Definition at line 112 of file id_map.h.

References add(), data, find(), K, scene, T, and update().

◆ add_or_update() [3/3]

template<typename K, typename T, typename Flags = uint>
bool id_map< K, T, Flags >::add_or_update ( T ** r_data,
const BL::ID & id,
const K & key )
inline

Definition at line 108 of file id_map.h.

References add_or_update(), K, and T.

◆ check_recalc()

template<typename K, typename T, typename Flags = uint>
bool id_map< K, T, Flags >::check_recalc ( const BL::ID & id)
inline

Definition at line 65 of file id_map.h.

References b_recalc, and ptr.

◆ clear_flag()

template<typename K, typename T, typename Flags = uint>
void id_map< K, T, Flags >::clear_flag ( T * data,
Flags val )
inline

Definition at line 190 of file id_map.h.

References data, flags, and T.

◆ find() [1/2]

template<typename K, typename T, typename Flags = uint>
T * id_map< K, T, Flags >::find ( const BL::ID & id)
inline

Definition at line 40 of file id_map.h.

References find(), ptr, and T.

Referenced by add(), add_or_update(), find(), and is_used().

◆ find() [2/2]

template<typename K, typename T, typename Flags = uint>
T * id_map< K, T, Flags >::find ( const K & key)
inline

Definition at line 45 of file id_map.h.

References b_map, data, K, and T.

◆ has_recalc()

template<typename K, typename T, typename Flags = uint>
bool id_map< K, T, Flags >::has_recalc ( )
inline

Definition at line 70 of file id_map.h.

References b_recalc.

◆ is_used()

template<typename K, typename T, typename Flags = uint>
bool id_map< K, T, Flags >::is_used ( const K & key)
inline

Definition at line 134 of file id_map.h.

References data, find(), K, T, and used_set.

◆ key_to_scene_data()

template<typename K, typename T, typename Flags = uint>
const map< K, T * > & id_map< K, T, Flags >::key_to_scene_data ( )
inline

Definition at line 174 of file id_map.h.

References b_map.

◆ post_sync()

template<typename K, typename T, typename Flags = uint>
void id_map< K, T, Flags >::post_sync ( bool do_delete = true)
inline

Definition at line 151 of file id_map.h.

References b_map, b_recalc, flags, scene, and used_set.

◆ pre_sync()

template<typename K, typename T, typename Flags = uint>
void id_map< K, T, Flags >::pre_sync ( )
inline

Definition at line 75 of file id_map.h.

References used_set.

◆ set_default()

template<typename K, typename T, typename Flags = uint>
void id_map< K, T, Flags >::set_default ( T * data)
inline

Definition at line 146 of file id_map.h.

References b_map, data, and T.

◆ set_flag()

template<typename K, typename T, typename Flags = uint>
void id_map< K, T, Flags >::set_flag ( T * data,
Flags val )
inline

Definition at line 185 of file id_map.h.

References data, flags, and T.

◆ set_recalc() [1/2]

template<typename K, typename T, typename Flags = uint>
void id_map< K, T, Flags >::set_recalc ( const BL::ID & id)
inline

Definition at line 55 of file id_map.h.

References b_recalc, and ptr.

◆ set_recalc() [2/2]

template<typename K, typename T, typename Flags = uint>
void id_map< K, T, Flags >::set_recalc ( void * id_ptr)
inline

Definition at line 60 of file id_map.h.

References b_recalc.

◆ test_flag()

template<typename K, typename T, typename Flags = uint>
bool id_map< K, T, Flags >::test_flag ( T * data,
Flags val )
inline

Definition at line 179 of file id_map.h.

References data, flags, and T.

◆ update() [1/2]

template<typename K, typename T, typename Flags = uint>
bool id_map< K, T, Flags >::update ( T * data,
const BL::ID & id )
inline

Definition at line 89 of file id_map.h.

References data, T, and update().

Referenced by add_or_update(), and update().

◆ update() [2/2]

template<typename K, typename T, typename Flags = uint>
bool id_map< K, T, Flags >::update ( T * data,
const BL::ID & id,
const BL::ID & parent )
inline

Definition at line 93 of file id_map.h.

References b_recalc, data, ptr, T, and used().

◆ used()

template<typename K, typename T, typename Flags = uint>
void id_map< K, T, Flags >::used ( T * data)
inline

Definition at line 140 of file id_map.h.

References data, T, and used_set.

Referenced by add(), and update().

Member Data Documentation

◆ b_map

template<typename K, typename T, typename Flags = uint>
map<K, T *> id_map< K, T, Flags >::b_map
protected

Definition at line 203 of file id_map.h.

Referenced by add(), find(), key_to_scene_data(), post_sync(), set_default(), and ~id_map().

◆ b_recalc

template<typename K, typename T, typename Flags = uint>
set<void *> id_map< K, T, Flags >::b_recalc
protected

Definition at line 206 of file id_map.h.

Referenced by check_recalc(), has_recalc(), post_sync(), set_recalc(), set_recalc(), and update().

◆ flags

template<typename K, typename T, typename Flags = uint>
map<T *, uint> id_map< K, T, Flags >::flags
protected

Definition at line 205 of file id_map.h.

Referenced by clear_flag(), post_sync(), set_flag(), and test_flag().

◆ scene

template<typename K, typename T, typename Flags = uint>
Scene* id_map< K, T, Flags >::scene
protected

Definition at line 207 of file id_map.h.

Referenced by add_or_update(), id_map(), post_sync(), and ~id_map().

◆ used_set

template<typename K, typename T, typename Flags = uint>
set<T *> id_map< K, T, Flags >::used_set
protected

Definition at line 204 of file id_map.h.

Referenced by is_used(), post_sync(), pre_sync(), and used().


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