Blender  V3.3
Public Member Functions | Protected Attributes | List of all members
id_map< K, T > 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 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 ()
 

Protected Attributes

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

Detailed Description

template<typename K, typename T>
class id_map< K, T >

Definition at line 23 of file id_map.h.

Constructor & Destructor Documentation

◆ id_map()

template<typename K , typename T >
id_map< K, T >::id_map ( Scene scene_)
inline

Definition at line 25 of file id_map.h.

◆ ~id_map()

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

Definition at line 29 of file id_map.h.

References id_map< K, T >::b_map, Scene::delete_nodes(), and id_map< K, T >::scene.

Member Function Documentation

◆ add()

template<typename K , typename T >
void id_map< K, T >::add ( const K key,
T data 
)
inline

◆ add_or_update() [1/3]

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

Definition at line 100 of file id_map.h.

References PointerRNA::owner_id, and ptr.

Referenced by id_map< K, T >::add_or_update().

◆ add_or_update() [2/3]

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

◆ add_or_update() [3/3]

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

Definition at line 104 of file id_map.h.

References id_map< K, T >::add_or_update().

◆ find() [1/2]

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

Definition at line 41 of file id_map.h.

References PointerRNA::owner_id, and ptr.

Referenced by id_map< K, T >::add(), id_map< K, T >::add_or_update(), and id_map< K, T >::is_used().

◆ find() [2/2]

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

Definition at line 46 of file id_map.h.

References id_map< K, T >::b_map, data, NULL, and T.

◆ has_recalc()

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

Definition at line 66 of file id_map.h.

References id_map< K, T >::b_recalc.

◆ is_used()

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

Definition at line 130 of file id_map.h.

References data, id_map< K, T >::find(), T, and id_map< K, T >::used_set.

◆ key_to_scene_data()

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

Definition at line 169 of file id_map.h.

References id_map< K, T >::b_map.

Referenced by BlenderSync::sync_recalc().

◆ post_sync()

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

◆ pre_sync()

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

Definition at line 71 of file id_map.h.

References id_map< K, T >::used_set.

◆ set_default()

template<typename K , typename T >
void id_map< K, T >::set_default ( T data)
inline

Definition at line 142 of file id_map.h.

References id_map< K, T >::b_map, data, and NULL.

◆ set_recalc() [1/2]

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

Definition at line 56 of file id_map.h.

References id_map< K, T >::b_recalc, PointerRNA::data, and ptr.

Referenced by BlenderSync::sync_recalc().

◆ set_recalc() [2/2]

template<typename K , typename T >
void id_map< K, T >::set_recalc ( void id_ptr)
inline

Definition at line 61 of file id_map.h.

References id_map< K, T >::b_recalc.

◆ update() [1/2]

template<typename K , typename T >
bool id_map< K, T >::update ( T data,
const BL::ID id 
)
inline

Definition at line 85 of file id_map.h.

References data.

Referenced by id_map< K, T >::add_or_update().

◆ update() [2/2]

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

Definition at line 89 of file id_map.h.

References id_map< K, T >::b_recalc, data, PointerRNA::data, ptr, and id_map< K, T >::used().

◆ used()

template<typename K , typename T >
void id_map< K, T >::used ( T data)
inline

Definition at line 136 of file id_map.h.

References data, and id_map< K, T >::used_set.

Referenced by id_map< K, T >::add(), and id_map< K, T >::update().

Member Data Documentation

◆ b_map

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

◆ b_recalc

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

◆ scene

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

◆ used_set

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

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