Assimp  v4.1. (December 2018)
Assimp::Blender::ObjectCache< TOUT > Class Template Reference

The object cache - all objects addressed by pointers are added here. More...

Public Types

typedef std::map< Pointer, TOUT< ElemBase > > StructureCache
 

Public Member Functions

template<typename T >
void get (const Structure &s, TOUT< T > &out, const Pointer &ptr) const
 Check whether a specific item is in the cache. More...
 
 ObjectCache (const FileDatabase &db)
 
template<typename T >
void set (const Structure &s, const TOUT< T > &out, const Pointer &ptr)
 Add an item to the cache after the item has been fully read. More...
 

Detailed Description

template<template< typename > class TOUT>
class Assimp::Blender::ObjectCache< TOUT >

The object cache - all objects addressed by pointers are added here.

This avoids circular references and avoids object duplication.

Member Typedef Documentation

◆ StructureCache

template<template< typename > class TOUT>
typedef std::map< Pointer, TOUT<ElemBase> > Assimp::Blender::ObjectCache< TOUT >::StructureCache

Constructor & Destructor Documentation

◆ ObjectCache()

template<template< typename > class TOUT>
Assimp::Blender::ObjectCache< TOUT >::ObjectCache ( const FileDatabase db)
inline

Member Function Documentation

◆ get()

template<template< typename > class TOUT>
template<typename T >
void Assimp::Blender::ObjectCache< TOUT >::get ( const Structure s,
TOUT< T > &  out,
const Pointer ptr 
) const

Check whether a specific item is in the cache.

Parameters
sData type of the item
outOutput pointer. Unchanged if the cache doesn't know the item yet.
ptrItem address to look for.

◆ set()

template<template< typename > class TOUT>
template<typename T >
void Assimp::Blender::ObjectCache< TOUT >::set ( const Structure s,
const TOUT< T > &  out,
const Pointer ptr 
)

Add an item to the cache after the item has been fully read.

Do not insert anything that may be faulty or might cause the loading to abort.

Parameters
sData type of the item
outItem to insert into the cache
ptraddress (cache key) of the item.

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